In Squeak VM source, what is "specialObjectsOop"? It is read from an image file.
Thanks.
Ang Beepeng
On 05.08.2009, at 17:13, Ang Beepeng wrote:
In Squeak VM source, what is "specialObjectsOop"? It is read from an image file.
You have discovered the interface between the VM and the Image. Some objects must be known to the VM, and the specialObjects array holds them:
Smalltalk specialObjectsArray
For example, the first three entries are nil, true, and false - the VM needs nil to initialize instance variables of new objects, and the booleans for conditional jumps.
Also see #recreateSpecialObjectsArray
- Bert -
Hi, thanks for ur reply.
I was at these lines, in C and Smalltalk.
sched = longAt(((longAt((specialObjectsOop + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord));
sched := self fetchPointer: ValueIndex ofObject: (self splObj: SchedulerAssociation).
How to relate SchedulerAssociation with specialObjects?
Thanks.
Ang Beepeng
Bert Freudenberg wrote:
You have discovered the interface between the VM and the Image. Some objects must be known to the VM, and the specialObjects array holds them:
Smalltalk specialObjectsArray
For example, the first three entries are nil, true, and false - the VM needs nil to initialize instance variables of new objects, and the booleans for conditional jumps.
Also see #recreateSpecialObjectsArray
- Bert -
The specialObject number four itself is a scheduler, therefore those coding. Is that right?
Thanks.
Ang Beepeng
Ang Beepeng wrote:
Hi, thanks for ur reply.
I was at these lines, in C and Smalltalk.
sched = longAt(((longAt((specialObjectsOop + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord));
sched := self fetchPointer: ValueIndex ofObject: (self splObj: SchedulerAssociation).
How to relate SchedulerAssociation with specialObjects?
Thanks.
Ang Beepeng
On Wed, Aug 5, 2009 at 8:57 AM, Ang Beepeng beepeng86@yahoo.com wrote:
The specialObject number four itself is a scheduler, therefore those coding. Is that right?
Yes. Compare ObjectMemory class>>initializeSpecialObjectIndices with SystemDictionary>>recreateSpecialObjectsArray
Thanks.
Ang Beepeng
Ang Beepeng wrote:
Hi, thanks for ur reply.
I was at these lines, in C and Smalltalk.
sched = longAt(((longAt((specialObjectsOop + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord));
sched := self fetchPointer: ValueIndex ofObject: (self splObj: SchedulerAssociation).
How to relate SchedulerAssociation with specialObjects?
Thanks.
Ang Beepeng
-- View this message in context: http://www.nabble.com/specialObjectsOop-tp24829823p24831356.html Sent from the Squeak - Dev mailing list archive at Nabble.com.
Hi--
The specialObject number four itself is a scheduler, therefore those coding. Is that right?
Right, the SchedulerAssociation class variable of class ObjectMemory is a numerical index into the special objects array. The object at that location is one of the associations in the so-called "system dictionary"; the value of that association is the active instance of class ProcessorScheduler.
You can see this most readily by browsing "class var refs..." of ObjectMemory and choosing SchedulerAssociation.
-C
squeak-dev@lists.squeakfoundation.org