[Vm-dev] Re: [squeak-dev] uncompacting classes
squeak at stefan-marr.de
Thu Dec 1 09:27:16 UTC 2011
On 01 Dec 2011, at 10:03, Mariano Martinez Peck wrote:
> That' would be very nice to have :)
Well, it is a bit of work, I suppose.
You will need to adapt the image reading and spread them wider into your memory, adding that extra space in front of every object.
That also means you'll have to correct all the pointers in the objects.
That's all kind of trivial with an object table you haven't got, I think.
Perhaps, someone has code for that lying around on a dusty shelf?
Afterwards, if I remember correctly, it is mostly heap traversal that needs to be adapted.
We have all pointers still pointing to the real objects, and only the GC and traversal routines do know about the preheader. They just skip it. (Depending on what you want to put into the header, you might want to make the GC aware of that. I actually keep pointer there, and I think, that is currently not taken into account by the GC. oops...)
From there, you can just access it at a negative offset, almost like a normal object field (be careful with the variable width object header).
Here some hints in our code:
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
Phone: +32 2 629 2974
Fax: +32 2 629 3525
More information about the Vm-dev