[Vm-dev] CompiledMethod header bits index 29 (flag bit)
Stefan Marr
smalltalk at stefan-marr.de
Wed Mar 7 09:57:48 UTC 2012
Hi Eliot:
On 07 Mar 2012, at 01:47, Eliot Miranda wrote:
> But the flag is really useful for VM/image communication.
Right, that's what I want to use it for.
Flagged methods will allow me to mark exit points from a special interpretation mode.
In that special mode, I enforce certain additional semantics, but need to be able to disable that to get back to the normal mode.
The flag seems to be a convenient way to do that.
> This is related to the above. I've just added support to Squeak trunk for accessing the sign bit in the method header and using this as an additional flag.
Ehm, I am not completely with you. I think, I misunderstand something here, which header word exactly?
I looked through the diff of VMMaker.oscog-eem.146 and see this line:
^(objectMemory integerValueOf: (self headerOf: aMethodObj)) < 0
Isn't that the mark bit for the GC? Or am I confusing something?
#headerOf: should be the first word of every object, right?
And at least in the RoarVM (I doubt that this is different from the standard interpreter), MarkBit is defined as (1 << 31), isn't that exactly the sign bit?
Thanks
Stefan
--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: +32 2 629 3525
More information about the Vm-dev
mailing list