[Vm-dev] ImageSegment, objects header and addresses
K. K. Subramaniam
kksubbu.ml at gmail.com
Tue Jul 27 16:10:10 UTC 2010
On Tuesday 27 Jul 2010 8:02:29 pm Mariano Martinez Peck wrote:
> Now....the line I don't understand is this:
>
> self longAt: oop put: newOop + HeaderTypeFree.
>
> Because 'self longAt: oop'
> will answer the object header of oop. And there, it stores a number (the
> offset). Is this possible?
>
> In addition, it not only stores the offset, by it plus the flag
> HeaderTypeFree.
>
> I really don't understand how you can plus an offset and the flag. What is
> the result? how should I interpret that?
A oop is an offset. Since every oop is aligned to a 4-word boundary the least
significant two bits are always zero. So these two bits are re-used for a
typecode (0..3).
HTH .. Subbu
More information about the Vm-dev
mailing list