|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.byteman.agent.adapter.cfg.InstructionSequence
public class InstructionSequence
Class used to hold a sequence of instructions within a basic block
| Field Summary | |
|---|---|
private int[] |
encodedInstructions
data array storing instructions and their operands encoded as ints. |
private int[] |
instructionOffsets
since instructions are encoded with their operands we need an offsets array to identify where each instruction strats, allowing instructions and their operand to be searched forwards and backwards |
private int |
numEncoded
the number of valid entries in array encodedInstructions |
private int |
numInstructions
the number of valid offsets to instructions in array instructionOffsets |
| Constructor Summary | |
|---|---|
InstructionSequence()
|
|
| Method Summary | |
|---|---|
int |
add(int insn)
add an instruction to the sequence |
int |
add(int insn,
int arg1)
add an instruction with one encoded argument to the sequence |
int |
add(int insn,
int[] args)
add an instruction with an arbitrary number of encoded arguments to the sequence |
int |
add(int insn,
int arg1,
int arg2)
add an instruction with two encoded arguments to the sequence |
int |
add(int insn,
int arg1,
int arg2,
int arg3)
add an instruction with three encoded arguments to the sequence |
private void |
ensureSpace(int count)
expand the offsets array if necessary to allow room for 1 more instructions with count more arguments |
int |
get(int i)
return the instruction at the supplied offset |
int |
getArg(int i,
int j)
return a specific encoded argument of a given instruction |
int |
getArgCount(int i)
return the number of encoded arguments of a given instruction |
int |
getType(int i)
return the type of a given instruction |
int |
size()
return the number of instructions in the sequence |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int[] instructionOffsets
private int numInstructions
private int[] encodedInstructions
private int numEncoded
| Constructor Detail |
|---|
public InstructionSequence()
| Method Detail |
|---|
private void ensureSpace(int count)
public int size()
public int get(int i)
public int getType(int i)
public int getArgCount(int i)
i - the offset of the instruction
public int getArg(int i,
int j)
i - the offset of the instructionj - the index of the arguument attached to the instruction
public int add(int insn)
insn -
public int add(int insn,
int arg1)
insn -
public int add(int insn,
int arg1,
int arg2)
insn -
public int add(int insn,
int arg1,
int arg2,
int arg3)
insn -
public int add(int insn,
int[] args)
insn -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||