Talk About Network



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 > argument of inv...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 713 of 803
Post > Topic >>

argument of invokevirtual

by "Toby Kim" <toby.kim@[EMAIL PROTECTED] > Aug 22, 2006 at 06:57 AM

Hi.
While I'm writing codes on call graph construction of Java programs,
I've got a question.
I'm wondering how the class name in the argument of invokevirtual is
determined.
Is it the name of a class containing the method definition?

The code snippet (1) is compiled into the bytecode (2).
Neither printStackTrace() nor equals() are not defined in the
AWTException.
But the class name of the first invokevirtual is AWTException,
whereas the class name of the second invokevirtual is Object. Why is
that?
I'd appreciate it if you'd let me know how the class name of
invokevirtual is determined.

(1)
java.awt.AWTException e1 = new java.awt.AWTException("1");
java.awt.AWTException e2 = new java.awt.AWTException("2");
e1.printStackTrace();
e1.equals(e2);

(2)
aload_1
invokevirtual   #6; //Method java/awt/AWTException.printStackTrace:()V
aload_1
aload_2
invokevirtual   #7; //Method
java/lang/Object.equals:(Ljava/lang/Object;)Z


Thanks.

Regards,
Toby Kim




 3 Posts in Topic:
argument of invokevirtual
"Toby Kim" <  2006-08-22 06:57:24 
Re: argument of invokevirtual
Thomas Hawtin <usenet@  2006-08-22 17:09:06 
Re: argument of invokevirtual
"Chris Uppal" &  2006-08-22 16:25:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Mon May 12 2:14:40 CDT 2008.