The code segments in the class file use the JVM instruction set. This instruction set includes commands typically found in most stack-based assemblers. Such commands including floating point, integer, and pointer operations, as well as common control instructions. However, the key difference between the JVM and a typical assembler is that additional instructions, specific to object oriented interfaces, are included. Figure 1.1 lists a few such instructions.
To pass arguments to method calls, an operand stack is used. Items are pushed onto the operand stack before a method is invoked. Upon completion, the return value of the method is left on the operand stack. The JVM verifier, discussed in the next section, prohibits using the operand stack for any other purpose.
Copyright © 2000, 2001 Bradley M. Kuhn.
Verbatim copying and distribution of this entire thesis is permitted in any medium, provided this notice is preserved.