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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj uses reflection for every INVOKEINTERFACE?


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


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