gcj uses reflection for every INVOKEINTERFACE?
Adam Megacz
adam@megacz.com
Sat Feb 28 04:58:00 GMT 2004
Per Bothner <per@bothner.com> writes:
> > 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?
> I.e. you'd still need to generate the _JV_Method entries, but it
> miht be possible to drop the method names and signatures?
Precisely. The latter are what really matters spacewise.
> > JvInvokeInterface then checks something->class, which has a jmethod[]
> > associated with it. It scans through that array to find an 'i' such
> I.e. it's now no longer constant time.
Well, IIRC you could use this technique to construct a constant time
table (using the same algorithm, just substituting pointer equality
for string-comparison) when the class is loaded.
- a
More information about the Java
mailing list