This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -fvtable-gc


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

Richard>   (1) How to indicate (without a linker warning) that the object
Richard>       implements some sort of "reflector" that can invoke any 
Richard>       class method.  Mozilla implements such a thing.

libgcj does this too.  In Java there is a package, java.lang.reflect,
whose classes can be used to do all kinds of reflective operations,
including looking up and calling any method at runtime.

As a result Java classes have a bunch of metadata associated with
them.  For instance each method for a class has a bit of info in the
Class object.

We'd like to support -fvtable-gc for Java though.  Our idea is that if
you use -fvtable-gc then you will get reduced reflection data and you
won't be able to fully use reflection.  Perhaps there would also be a
way to disable reflection (and all the reflection data, which consumes
space) entirely.

I'm don't know what needs to happen to gcj to make this work.  I don't
know anything about -fvtable-gc.  Still, if this is being redesigned,
it would be convenient for us if the needs of Java are taken into
account.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]