Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > Re: Questions a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 789 of 808
Post > Topic >>

Re: Questions about Java VM spec

by Joshua Cranmer <Pidgeot18@[EMAIL PROTECTED] > Sep 21, 2007 at 01:48 AM

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
 




 5 Posts in Topic:
Questions about Java VM spec
Joshua Cranmer <Pidgeo  2007-09-20 01:01:54 
Re: Questions about Java VM spec
Roedy Green <see_websi  2007-09-20 06:52:02 
Re: Questions about Java VM spec
Joshua Cranmer <Pidgeo  2007-09-21 01:48:32 
Re: Questions about Java VM spec
Roedy Green <see_websi  2007-09-21 02:38:51 
Re: Questions about Java VM spec
Roedy Green <see_websi  2007-09-20 06:52:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 5 19:17:15 CDT 2008.