Keeping oops across primitives

Hans-Martin Mosner hmm at heeg.de
Tue Jun 6 19:31:49 UTC 2006


Andreas Raab wrote:

> Why not NULL terminated? I'm planning on using NULL as the "undefined 
> entry" in the oop array. Since this code is managed by some other C 
> code that seems preferrable to nil (although the plugin could store 
> nil just as well). But it probably will be valuable for the C code to 
> be able to say "clear this entry" via storing NULL and having the VM 
> skip this is fairly simple.

Perhaps it would be easier for the VM if you'd use an immediate value 
for the undefined entry so that all entries were valid oops?
I don't know how exactly the code for this would be merged into the 
existing GC stuff, but to me at least it feels like it would be easiest 
if there were as few as possible special cases, and the GC already 
distinguishes between immediate values and object pointers.

Cheers,
Hans-Martin



More information about the Vm-dev mailing list