Roedy Green wrote:
> On Thu, 20 Sep 2007 01:01:54 GMT, Joshua Cranmer
> <Pidgeot18@[EMAIL PROTECTED]
> wrote, quoted or indirectly quoted someone who
> said :
>
>> 3. What is the difference in purpose between invokevirtual and
>> invokeinterface ?
>
> One is used to invoke when you have a reference to an object. The
> other is when you have a reference to an interface.
>
> With an object reference the offset of the method in the class is
> known. With an interface it may vary depending on which class is
> implementing the interface.
If I am understanding this correctly, then the two opcodes only differ
in functionality when it comes to locating the function pointer to call
in the vtable structure. That would mean that at logical level, the
method resolution lookup is identical.
(Hmmm... trying to put down in words the concept I envision in my head
is much more difficult than I thought it would be.)
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth


|