'From Squeak 1.18 of December 12, 1996 on 15 March 1997 at 11:41:07 pm'! !Object methodsFor: 'system primitives'! immediateValue "Return the value of the immediate receiver as a SmallInteger. If the receiver is not immediate, return nil" ^nil! ! !Behavior methodsFor: 'instance creation'! newWithImmediateValue: anInteger "Primitive. Answer an instance of the receiver (which is a class) with the immediate value given by anInteger. This only succeeds if the class is registered as a class having immediate instances." self primitiveFailed! ! !SystemDictionary methodsFor: 'special objects'! recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "The Special Objects Array is an array of object pointers used by the Smalltalk virtual machine. Its contents are critical and unchecked, so don't even think of playing here unless you know what you are doing." | newArray smallFrameSize largeFrameSize cca | newArray _ Array new: 39. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (Smalltalk associationAt: #Processor). "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: String. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. newArray at: 10 put: Float. newArray at: 11 put: MethodContext. newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. newArray at: 18 put: (self specialObjectsArray at: 18) "(low space Semaphore)". newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "*unused*" "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #(+ 1 - 1 < 1 > 1 <= 1 >= 1 = 1 ~= 1 * 1 / 1 \\ 1 @ 1 bitShift: 1 // 1 bitAnd: 1 bitOr: 1 at: 1 at:put: 2 size 0 next 0 nextPut: 1 atEnd 0 == 1 class 0 blockCopy: 1 value 0 value: 1 do: 1 new 0 new: 1 x 0 y 0 ). "An array of the 255 Characters in ascii order." newArray at: 25 put: ((0 to: 255) collect: [:ascii | Character value: ascii]). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. "An array of up to 31 classes whose instances will have compact headers" cca _ self compactClassesArray. cca size < 47 ifTrue: ["immediate classes" cca _ cca, (Array new: 16)]. newArray at: 29 put: cca. newArray at: 30 put: (self specialObjectsArray at: 30) "(delay Semaphore)". newArray at: 31 put: (self specialObjectsArray at: 31) "(user input Semaphore)". "Prototype instances that can be copied for fast initialization" newArray at: 32 put: (Float new: 2). newArray at: 33 put: (LargePositiveInteger new: 4). newArray at: 34 put: Point new. smallFrameSize _ (CompiledMethod newBytes: 0 nArgs: 0 nTemps: 0 nStack: 0 nLits: 0 primitive: 0) frameSize. largeFrameSize _ (CompiledMethod newBytes: 0 nArgs: 0 nTemps: 0 nStack: smallFrameSize+1 nLits: 0 primitive: 0) frameSize. newArray at: 35 put: (MethodContext new: smallFrameSize). newArray at: 36 put: (MethodContext new: largeFrameSize). newArray at: 37 put: (BlockContext new: smallFrameSize). newArray at: 38 put: (BlockContext new: largeFrameSize). newArray at: 39 put: Array new. "coming soon... Socket Semaphores" "Now replace the interpreter's reference in one atomic operation" self specialObjectsArray become: newArray! !