public class InstructionSequence extends Object
Constructor and Description |
---|
InstructionSequence() |
Modifier and Type | Method and Description |
---|---|
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
|
int |
add(int insn,
int arg1,
int arg2,
int arg3,
int arg4)
add an instruction with four encoded arguments to the sequence
|
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
|
public int size()
public int get(int i)
i
- the offsetpublic int getType(int i)
i
- the instruction indexpublic int getArgCount(int i)
i
- the offset of the instructionpublic int getArg(int i, int j)
i
- the offset of the instructionj
- the index of the arguument attached to the instructionpublic int add(int insn)
insn
- the instructionpublic int add(int insn, int arg1)
insn
- the instructionarg1
- the argument indexpublic int add(int insn, int arg1, int arg2)
insn
- the instructionarg1
- the first argument indexarg2
- the second argument indexpublic int add(int insn, int arg1, int arg2, int arg3)
insn
- the instructionarg1
- the first argument indexarg2
- the second argument indexarg3
- the third argument indexpublic int add(int insn, int arg1, int arg2, int arg3, int arg4)
insn
- the instructionarg1
- the first argument indexarg2
- the second argument indexarg3
- the third argument indexarg4
- the third argument indexpublic int add(int insn, int[] args)
insn
- the instructionargs
- the argumentsCopyright © 2017. All Rights Reserved.