Package jminusminus
Class CLArithmeticInstruction
java.lang.Object
jminusminus.CLInstruction
jminusminus.CLArithmeticInstruction
Representation for ARITHMETIC1 and ARITHMETIC2 instructions.
-
Field Summary
Fields inherited from class jminusminus.CLInstruction
instructionInfo, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits -
Constructor Summary
ConstructorsConstructorDescriptionCLArithmeticInstruction(int opcode, int pc) Constructs a CLArithmeticInstruction object for ARITHMETIC1 instructions.CLArithmeticInstruction(int opcode, int pc, int localVariableIndex, int constVal, boolean isWidened) Constructs a CLArithmeticInstruction object for IINC instruction. -
Method Summary
Methods inherited from class jminusminus.CLInstruction
byteAt, isValid, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits
-
Constructor Details
-
CLArithmeticInstruction
public CLArithmeticInstruction(int opcode, int pc) Constructs a CLArithmeticInstruction object for ARITHMETIC1 instructions.- Parameters:
opcode- the opcode for this instruction.pc- index of this instruction within the code array of a method.
-
CLArithmeticInstruction
public CLArithmeticInstruction(int opcode, int pc, int localVariableIndex, int constVal, boolean isWidened) Constructs a CLArithmeticInstruction object for IINC instruction.- Parameters:
opcode- the opcode for this instruction.pc- index of this instruction within the code array of a method.localVariableIndex- index of the local variable to increment.constVal- increment value.isWidened- whether this instruction is preceeded by the WIDE (widening) instruction.
-
-
Method Details
-
toBytes
Returns the bytecode for this instruction.- Specified by:
toBytesin classCLInstruction- Returns:
- the bytecode for this instruction.
-