GIJ _Jv_InterpMethod::run question
Bryce McKinlay
mckinlay@redhat.com
Wed Jul 12 14:47:00 GMT 2006
Kyle Galloway wrote:
> Thanks for the info. From what I can see, however, this is the
> variable for the Class object as in SomeClass.class. What I am
> looking for is the Object variable, an actual reference to the
> instance of the class that invoked the method. So for example:
>
> SomeClass a = new SomeClass();
> a.someMethod();
>
> I am looking for the instance a, not the class SomeClass.
The first argument to a non-static method is "this", ie the object it is
being invoked on. In the interpreter, the arguments are passed to
_Jv_InterpMethod::run in "args". So, to see the current "this" inside a
call to a.someMethod(), you can look at:
args[0].ptr
Bryce
More information about the Java
mailing list