specialObjectsOop

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

specialObjectsOop

Ang BeePeng
In Squeak VM source, what is "specialObjectsOop"? It is read from an image file.

Thanks.

Ang Beepeng
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] specialObjectsOop

Bert Freudenberg

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 -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] specialObjectsOop

Ang BeePeng
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 -
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] specialObjectsOop

Ang BeePeng
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
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] specialObjectsOop

Eliot Miranda-2


On Wed, Aug 5, 2009 at 8:57 AM, Ang Beepeng <[hidden email]> 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.





Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: specialObjectsOop

ccrraaiigg
In reply to this post by Ang BeePeng

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