<br><br><div class="gmail_quote">On Tue, Jul 27, 2010 at 6:10 PM, K. K. Subramaniam <span dir="ltr"><<a href="http://kksubbu.ml">kksubbu.ml</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Tuesday 27 Jul 2010 8:02:29 pm Mariano Martinez Peck wrote:<br>
> Now....the line I don't understand is this:<br>
><br>
> self longAt: oop put: newOop + HeaderTypeFree.<br>
><br>
> Because 'self longAt: oop'<br>
> will answer the object header of oop. And there, it stores a number (the<br>
> offset). Is this possible?<br>
><br>
> In addition, it not only stores the offset, by it plus the flag<br>
> HeaderTypeFree.<br>
><br>
> I really don't understand how you can plus an offset and the flag. What is<br>
> the result? how should I interpret that?<br></div></blockquote><div><br>Hi Subbu.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
</div>A oop is an offset. Since every oop is aligned to a 4-word boundary </blockquote><div><br>ok.....each oop is 4-word -> 32 bits, 4 bytes. I am right? One is used to mark SmalltalkIntegers. But here, that doesn't matter. <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">the least<br>
significant two bits are always zero. </blockquote><div><br>why? I don't understand this. Why the last two bits are always zero? because ImageSegment assumes that the size of the segment will be much smaller?<br><br>
<br>Sorry if this is a very newbie question.<br><br>yes, I noticed this<br><br> "type field values"<br> HeaderTypeSizeAndClass := 0.<br> HeaderTypeClass := 1.<br> HeaderTypeFree := 2.<br> HeaderTypeShort := 3.<br>
<br>in initializeObjectHeaderConstants<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">So these two bits are re-used for a<br>
typecode (0..3).<br>
<br></blockquote><div><br>Thanks for the help <br><br>Mariano<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
HTH .. Subbu<br>
</blockquote></div><br>