This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: interface dispatch


Godmar Back <gback@cs.utah.edu> writes:

> In an earlier discussion, I pointed out that the correct way to compile
> 
> interface A {}
> f(A x) {
> 	x.equals(...)
> }
> 
> is by using "invokeinterface" as opposed to "invokevirtual", and that the
> correct run-time semantics is
> 
> 	checkcast A
> 	invokevirtual "equals"

Yes, you said that, but I really want to see an explanation
before I buy it.  My understanding is that checkcast are
only needed when a source cast is needed.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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