This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Questions about GC, _Jv_MarkObj() and reflection data.
- From: Andrew Haley <aph at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 7 Feb 2006 16:30:18 +0000
- Subject: Re: Questions about GC, _Jv_MarkObj() and reflection data.
- References: <43E83636.7020500@avtrex.com>
David Daney writes:
> I think my patch for removing most reflection data is almost working
> (yeah!).
>
> My last problem seems to be with classes that use _Jv_MarkObj().
> Currently I emit no reflection data for non-static fields. However this
> does not work if the GC descriptor has a value of 2 (which appears to
> mean to use _Jv_MarkObj()), as _Jv_MarkObj uses the field reflection
> data to tell if a field contains a reference.
>
> Lets just say I was a little mystified until I realized the GC was
> freeing referenced objects and allocating objects of a different type in
> their place.
>
> The obvious solution is to generate reflection data for non-static
> fields that contain references. But I wanted to do a sanity check
> before proceeding.
Well, all you *really* need is a bitmap, but OK.
> Currently in make_class_data (in class.c) the call to get_dispatch_table
> (which creates the vtable and thus the GC descriptor) is done after all
> the reflection data is generated.
> My plan is to move it before the field and method arrays are built.
> Then it should be fairly simple to extract the GC descriptor from
> the dispatch table tree and use that to decide if field reflection
> data is needed for reference fields.
>
> Does anyone foresee a problem with doing it this way?
I can't forsee any, no.
Andrew.