extending every header by a word

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

extending every header by a word

Rob Withers
 
I am looking into what changes will be required for me to add a word to
every header.  I am hoping someone can give me a 5 minute overview to
confirm/extend what I have learned from A Tour of the Squeak OE.

I see on page 20 of the Tour of the Sq OE the layout of an object in memory,
with headers.  The first decision is where does the new vatHeader go, and
since it will go on every header, I think I will put it just before the
baseHeader, such that headers look like:

type: 3
<vatHeader>
<baseHeader>

type: 1
<classHeader>
<vatHeader>
<baseHeader>

type: 0
<sizeHeader>
<classHeader>
<vatHeader>
<baseHeader>

So looking into the code, I see the BaseHeaderSize running around all over
the place, but please correct me, this is just to account for the fact that
an oop points to the first header word, so it gets sized and stripped in
various situations.  I am hoping this should not be affected by a header
size increase.

I have just started looking, but I see that I will need to change the
#classHeader:, #sizeHeader, add #vatHeader:, and anywhere that writes to the
classHeader and sizeHeader, like:
#allocate:headerSize:h1:h2:h3:doFill:with:.  This is by no means exhaustive.
Is there anything in particular you can point me to consider or warn me of?

many thanks,
Rob


Reply | Threaded
Open this post in threaded view
|

Re: extending every header by a word

Michael Haupt-3
 
Hi Rob,

On 11/1/07, Rob Withers <[hidden email]> wrote:
> Is there anything in particular you can point me to consider or warn me of?

this is just one thing that immediately pops up in my mind... you will
have to convert *all* objects in the *entire* image before you will be
able to use them again.

Best,

Michael
Reply | Threaded
Open this post in threaded view
|

Re: extending every header by a word

Rob Withers
In reply to this post by Rob Withers
 
Hi Michael,
I was reading your mind. :)  The very first thing I did was to subclass SystemTracer2 and pry it apart to see what I needed to do.  I will set the vatId to 1 and a few other flags in that new header.  I think I have my SystemTracer specified, but I have to wait until I get the vm together, before I can trace the image and test it.
 
I also think I have a grasp on what needed to change in the vm...not so bad, for now.  I just need to make all senders of the instantiation protocols use the new ones which specify a vat header.
 
Thanks,
Rob
 
----- Original Message ----
From: Michael Haupt [hidden email]

Hi Rob,

On 11/1/07, Rob Withers <[hidden email]> wrote:
> Is there anything in particular you can point me to consider or warn me of?

this is just one thing that immediately pops up in my mind... you will
have to convert *all* objects in the *entire* image before you will be
able to use them again.

Best,

Michael