[Pkg] The Trunk: Kernel-eem.883.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Nov 19 20:13:25 UTC 2014


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.883.mcz

==================== Summary ====================

Name: Kernel-eem.883
Author: eem
Time: 19 November 2014, 12:12:39.345 pm
UUID: 2ccdf2d6-38ff-4d1a-87c8-c411b596a068
Ancestors: Kernel-nice.882

Add class inst vars to hold SmallInteger class>>minVal
and maxVal.  Add SmallInteger to the front of the
start-up list.  Update SmallInteger's class comment
with 64-bit info.

=============== Diff against Kernel-nice.882 ===============

Item was changed:
  Integer subclass: #SmallInteger
  	instanceVariableNames: ''
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Kernel-Numbers'!
+ SmallInteger class
+ 	instanceVariableNames: 'minVal maxVal'!
  
+ !SmallInteger commentStamp: 'eem 11/19/2014 12:01' prior: 0!
+ My instances are at least 31-bit numbers, stored in twos complement form. The allowable range in 32-bits is approximately +- 1 10^9 (+- 1billion).  In 64-bits my instances are 61-bit numbers, stored in twos complement form. The allowable range is approximately +- 1^18 (+- 1 quintillion).   The actual values are computed at start-up.  See SmallInteger minVal, maxVal.!
+ SmallInteger class
+ 	instanceVariableNames: 'minVal maxVal'!
- !SmallInteger commentStamp: '<historical>' prior: 0!
- My instances are 31-bit numbers, stored in twos complement form. The allowable range is approximately +- 1 billion (see SmallInteger minVal, maxVal).!

Item was added:
+ ----- Method: SmallInteger class>>initialize (in category 'class initialization') -----
+ initialize
+ 	SmalltalkImage current addToStartUpList: self before: Delay.
+ 	self startUp: true!

Item was added:
+ ----- Method: SmallInteger class>>startUp: (in category 'class initialization') -----
+ startUp: resuming
+ 	"The image is either being newly started (resuming is true), or it's just been snapshotted.
+ 	 If this has just been a snapshot, skip all the startup stuff."
+ 	| next val |
+ 	resuming ifFalse: [^self].
+ 	val := -32768. "Assume at least 16 bits"
+ 	[next := val + val.
+ 	 next class == self] whileTrue:
+ 		[val := next].
+ 	minVal := val.
+ 	maxVal := -1 - val!



More information about the Packages mailing list