class CLFlowControlInstruction extends CLInstruction
instructionInfo, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits| Constructor and Description |
|---|
CLFlowControlInstruction(int pc,
int index,
boolean isWidened)
Construct a CLFlowControlInstruction object for RET instruction.
|
CLFlowControlInstruction(int opcode,
int pc,
String jumpToLabel)
Construct a CLFlowControlInstruction object for FLOW_CONTROL1
instructions.
|
CLFlowControlInstruction(int opcode,
int pc,
String defaultLabel,
int low,
int high,
ArrayList<String> labels)
Construct a CLFlowControlInstruction object for TABLESWITCH instruction.
|
CLFlowControlInstruction(int opcode,
int pc,
String defaultLabel,
int numPairs,
TreeMap<Integer,String> matchLabelPairs)
Construct a CLFlowControlInstruction object for LOOKUPSWITCH instruction.
|
| Modifier and Type | Method and Description |
|---|---|
int |
jumpToOffset()
Return the pc of instruction to jump to.
|
boolean |
resolveLabels(Hashtable<String,Integer> labelToPC)
Resolve the jump labels to the corresponding offset values using the
given label to pc mapping.
|
ArrayList<Integer> |
toBytes()
Return the bytecode for this instruction.
|
byteAt, isValid, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnitspublic CLFlowControlInstruction(int opcode,
int pc,
String jumpToLabel)
opcode - the opcode for this instruction.pc - index of this instruction within the code array of a method.jumpToLabel - the label to jump to.public CLFlowControlInstruction(int pc,
int index,
boolean isWidened)
pc - index of this instruction within the code array of a method.index - index of the local variable containing the return address.isWidened - whether this instruction is preceeded by the WIDE (widening)
instruction.public CLFlowControlInstruction(int opcode,
int pc,
String defaultLabel,
int low,
int high,
ArrayList<String> labels)
opcode - the opcode for this instruction.pc - index of this instruction within the code array of a method.defaultLabel - jump label for default value.low - smallest value of index.high - highest value of index.labels - list of jump labels for each index value from low to high, end
values included.public CLFlowControlInstruction(int opcode,
int pc,
String defaultLabel,
int numPairs,
TreeMap<Integer,String> matchLabelPairs)
opcode - the opcode for this instruction.pc - index of this instruction within the code array of a method.defaultLabel - jump label for default value.numPairs - number of pairs in the match table.matchLabelPairs - key match table.public boolean resolveLabels(Hashtable<String,Integer> labelToPC)
labelToPC - label to pc mapping.public int jumpToOffset()
public ArrayList<Integer> toBytes()
CLInstructiontoBytes in class CLInstruction