This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj uses reflection for every INVOKEINTERFACE?
- From: Tom Tromey <tromey at redhat dot com>
- To: Adam Megacz <adam at megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: 26 Feb 2004 08:28:20 -0700
- Subject: Re: gcj uses reflection for every INVOKEINTERFACE?
- References: <E1AwE2V-0008Nu-00@megacz.com>
- Reply-to: tromey at redhat dot com
>>>>> "Adam" == Adam Megacz <adam@megacz.com> writes:
Adam> It looks like _Jv_LookupInterfaceMethodIdx() is getting called every
Adam> time a method overriding an interface method is invoked... is this
Adam> true? Is there any way around this?
This is the constant-time interface dispatch. If you look at
_Jv_LookupInterfaceMethodIdx you'll see it is quite small.
I think there's no way around doing some kind of lookup for interface
method dispatch.
As I recall the interface tables are built at runtime. So, yeah, you
probably need some reflection info around for all this to work.
Tom