gcj uses reflection for every INVOKEINTERFACE?

Bryce McKinlay bryce@mckinlay.net.nz
Mon Mar 1 21:10:00 GMT 2004


On Feb 27, 2004, at 5:48 PM, Adam Megacz wrote:

> In other words, what if instead of using the method name, signature,
> and interface-name to identify the method when building the
> constant-time tables, we instead use the address of the _Jv_Method of
> the interface's method?

> JvInvokeInterface then checks something->class, which has a jmethod[]
> associated with it.  It scans through that array to find an 'i' such
> that
>
>   something->class->methods[i]->overrides == &__ZN_com_megacz_A_foo_V
>
>   or
>
>   something->class->methods[i]->overrides->overrides == 
> &__ZN_com_megacz_A_foo_V

I think this could work. However it seems to me the "overrides" field 
itself must be an array, since a method could override definitions in 
both super-classes and interfaces, or implement the same method 
signature defined in multiple interfaces.

Regards

Bryce



More information about the Java mailing list