Mikhail Fursov wrote:
> On 10/7/06, Weldon Washburn <[EMAIL PROTECTED]> wrote:
>>
>> #3 might have originally been put in the JIT/GC interface because the JIT
>> developers liked it. I can't think of a reason why a GC would prefer
>> this
>> interface over #2 above.
>
> If it could be JIT developers decision we would like not to distinguish
> between bases and mptrs at all.:) I mean to keep only
> 'enumerate(base_or_mptr)' method
> I'm not sure the code JIT generates will be much better in this case, but
> JIT internals will become simpler.
Sorry, as I am already lost in #2, #3 and other denotations, my comment
may turn out to be irrelevant, but I think it is worth noting, that
JIT enumeration interface is actually passed through VM like JIT<->VM<->GC:
JIT calls VM funtion vm_enumerate_root_interior_pointer_with_base(slot,base,...)
vmcore\src\gc\root_set_enum_common.cpp
183 void vm_enumerate_root_interior_pointer_with_base(void **slot_root, void
**slot_base, Boolean is_pinned)
184 {
185 int offset =
(int)(POINTER_SIZE_INT)(*((Byte**)slot_root)-*((Byte**)slot_base));
186 gc_add_root_set_entry_interior_pointer(slot_root, offset, is_pinned);
187 }
And VM in turn calls GC function
gc_add_root_set_entry_interior_pointer(slot,offset,...)
IMHO, the best solution would be to use (slot,offset) everywhere,
and pre-compute and cache offsets before enumerating the base pointer.
Or even enumerate base pointer *after* all interior pointers that depend on it.
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]