Package jminusminus
Class CLLoadStoreInstruction
java.lang.Object
jminusminus.CLInstruction
jminusminus.CLLoadStoreInstruction
Representation for LOAD_STORE1, LOAD_STORE2, LOAD_STORE3 and LOAD_STORE4 instructions.
-
Field Summary
Fields inherited from class jminusminus.CLInstruction
instructionInfo, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits
-
Constructor Summary
ConstructorDescriptionCLLoadStoreInstruction
(int opcode, int pc) Constructs a CLLoadStoreInstruction object for LOAD_STORE1 instructions.CLLoadStoreInstruction
(int opcode, int pc, int constVal) Constructs a CLLoadStoreInstruction object for LOAD_STORE3 and LOAD_STORE4 instructions.CLLoadStoreInstruction
(int opcode, int pc, int localVariableIndex, boolean isWidened) Constructs a CLLoadStoreInstruction object for LOAD_STORE2 instructions. -
Method Summary
Methods inherited from class jminusminus.CLInstruction
byteAt, isValid, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits
-
Constructor Details
-
CLLoadStoreInstruction
public CLLoadStoreInstruction(int opcode, int pc) Constructs a CLLoadStoreInstruction object for LOAD_STORE1 instructions.- Parameters:
opcode
- the opcode for this instruction.pc
- index of this instruction within the code array of a method.
-
CLLoadStoreInstruction
public CLLoadStoreInstruction(int opcode, int pc, int localVariableIndex, boolean isWidened) Constructs a CLLoadStoreInstruction object for LOAD_STORE2 instructions.- 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.isWidened
- whether this instruction is preceeded by the WIDE (widening) instruction.
-
CLLoadStoreInstruction
public CLLoadStoreInstruction(int opcode, int pc, int constVal) Constructs a CLLoadStoreInstruction object for LOAD_STORE3 and LOAD_STORE4 instructions.- Parameters:
opcode
- the opcode for this instruction.pc
- index of this instruction within the code array of a method.constVal
- a byte (for BIPUSH), a short (for SIPUSH), or a constant pool index for LDC instructions.
-
-
Method Details
-
toBytes
Returns the bytecode for this instruction.- Specified by:
toBytes
in classCLInstruction
- Returns:
- the bytecode for this instruction.
-