interface dispatch
Per Bothner
per@bothner.com
Thu Oct 21 23:29:00 GMT 1999
Godmar Back <gback@cs.utah.edu> writes:
> First, I should note that the interface dispatch (i.e., the code that
> invokes an interface on a given run-time object) cannot be as simple
> as the proposed LOOKUP_INTERFACE macro:
> ...
> This code only reliably looks up the interface if the run-time object
> indeed implements the interface, which cannot be determined at compile-time.
If by "compile-time" you mean when the Java sourc code is compiled
to either bytecode or native code, then it seems to me this *is*
determined at compile-time by javac and gcj.
If by "compile-time" you mean when bytecode is compiled to native
code (either by gcj or a jit), then it depends on your verifier.
It certainly is not determined by the verifier as described in
the JVM spec, nor by Sun's verifier, nor by the verifier in Gcj.
However, I do believe that can be verified by a smarter
verifier that uses union type; as a proof of concept, I believe
Kresten Krab Thorup's verifier does use union types.
More on your other comments when I've had a chance to think about
them..
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
More information about the Java
mailing list