_Jv_LookupInterfaceMethod
Bryce McKinlay
bryce@albatross.co.nz
Wed Dec 1 02:28:00 GMT 1999
OK, so how difficult is it going to be to change, in the compiler, the
definition of _Jv_LookupInterfaceMethod from:
(jclass klass, _Jv_Utf8Const *name, _Jv_Utf8Const *signature)
to:
(jclass klass, jclass iface, int method_idx)
I have mostly implemented (in the runtime) Per Bothner's constant-time
dispatch and type checking algorithms, but it really needs this change
to tie it all together. If someone do it (or give me explicit
instructions on how ;-), then we'll get a *huge* performance increase on
interface invocations.
Also, I noticed this comment in the code:
/* We expand invokeinterface here. _Jv_LookupInterfaceMethod() will
ensure that the selected method exists, is public and not
abstract nor static. */
Are these checks really the job of _Jv_LookupInterfaceMethod()? It seems
to me that this is really the job of the compiler (or perhaps verifier
in the case of interpreted classes). Couldn't I just do this when
building the interface dispatch tables, and eliminate the extra
overhead?
regards
[ bryce ]
More information about the Java
mailing list