argument of invokevirtual
- From: "Toby Kim" <toby.kim@xxxxxxxxx>
- Date: 22 Aug 2006 06:57:24 -0700
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
.
- Follow-Ups:
- Re: argument of invokevirtual
- From: Thomas Hawtin
- Re: argument of invokevirtual
- From: Chris Uppal
- Re: argument of invokevirtual
- Prev by Date: JVM & IE7
- Next by Date: Re: argument of invokevirtual
- Previous by thread: JVM & IE7
- Next by thread: Re: argument of invokevirtual
- Index(es):