This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: Linker & Verifier fixes (really GC mark procedures)
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> I did a little work on the gcjx branch in this area. But it has
Tom> never been tested. Anyway the idea was that the compiler could emit
Tom> real mark descriptors for Class, by special-casing it a bit in
Tom> boehm.c.
I looked at this today. We can't scan Class using a bitmap descriptor
yet, because its layout is wrong for this. The descriptor overflows
and we have to fall back to procedural scanning.
We could still do better than we do today, I think. For instance we
could scan Class conservatively, and make sure to allocate
Class-related structures via the GC (using conservative scanning or
introducing new mark kinds as desired).
Not only would this clean up the ugly and potentially problematic code
in _Jv_MarkObj, but it would remove some leaks (that occur if a Class
is GCd) we currently have. Also I suspect conservative scanning is
faster than what we're doing now (this might go for other classes as
well).
I've started a patch to do this, but it isn't complete.
Tom