Content deleted Content added
m Removing empty ref tags |
clean up, typo(s) fixed: For example → For example, using AWB |
||
Line 1:
'''Java bytecode''' is the [[instruction set]] of the [[Java virtual machine]]. Each [[bytecode]] is composed of one, or in some cases two bytes that represent the instruction ([[opcode]]), along with zero or more bytes for passing parameters.
Of the 255 possible byte-long [[opcode]]s, {{as of|2015|lc=y}}, 198 are in use (~77%), 54 are reserved for future use, and 3 instructions (~1%) are set aside as permanently unimplemented.<ref name="reserved_opcodes">[http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.2 VM Spec - Reserved Opcodes]</ref>
Line 46:
For example, "iadd" will add two integers, while "dadd" will add two doubles. The "const", "load", and "store" instructions may also take a suffix of the form "_''n''", where ''n'' is a number from 0–3 for "load" and "store". The maximum ''n'' for "const" differs by type.
The "const" instructions push a value of the specified type onto the stack. For example, "iconst_5" will push an integer 5, while "dconst_1" will push a double 1. There is also an "aconst_null", which pushes "null". The ''n'' for the "load" and "store" instructions specifies the ___location in the variable table{{clarify|date=October 2010}} to load from or store to. The "aload_0" instruction pushes the object in variable 0 onto the stack (this is usually the "this" object). "istore_1" stores the integer on the top of the stack into variable 1. For variables with higher numbers the suffix is dropped and operands must be used.
== Example ==
Line 113:
*[[MIDletPascal]]
*[[JavaFX Script]] code is also compiled to Java bytecode
*[[
== Execution ==
|