hotspot-dev Digest, Vol 26, Issue 2
danhicks at ieee.org
Mon Jun 8 14:09:14 PDT 2009
> Date: Sun, 7 Jun 2009 21:20:45 -0700 (PDT)
> From: "Colin(Du Li)" <dawn2004 at gmail.com>
> Subject: Who and when do put receiver onto the stack in bytecode
> To: hotspot-dev at openjdk.java.net
> Message-ID: <23918031.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> Hi, I have a question about the c++ interpreter.
> For an "invokevirtual" method, the operand stack is like:
> ..., objectref, [arg1, [arg2 ...]]
> I know the arguments are put onto the stack by some "load" instructions
> explicitly. But, how is the objectref (receiver object) put onto the stack?
> Who did that and when?
> Thanks a lot!
The objectref can be loaded any number of ways -- any way an object
reference can get onto the stack. For instance, it could be loaded with
a getstatic operation, it could be an argument passed on the call to the
current method, or it could be an exception object that was implicitly
placed in the stack by the exception handling mechanism.
The Java interpreter, from this point of view, is no different from any
other "stack machine", such as the Burroughs B5000 series, the UCSD
Pascal p-machine, and Adobe PostScript.
I don't trust a man who uses the word evil eighteen times in ten minutes. If you're half evil, nothing soothes you more than to think the person you are opposed to is totally evil. --Norman Mailer
More information about the hotspot-dev