Package com.strobel.assembler.ir
Class Instruction
java.lang.Object
com.strobel.assembler.ir.Instruction
- All Implemented Interfaces:
Comparable<Instruction>
User: Mike Strobel
Date: 1/6/13
Time: 1:31 AM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Label
private Instruction
private int
private OpCode
private Object
private Instruction
private static final int
private static final int
private static final int
private static final int
-
Constructor Summary
ConstructorsConstructorDescriptionInstruction
(int offset, OpCode opCode) Instruction
(OpCode opCode) Instruction
(OpCode opCode, Object operand) Instruction
(OpCode opCode, Object... operands) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(InstructionVisitor visitor) private static boolean
checkOperand
(OperandType operandType, int value) private static boolean
checkOperand
(OperandType operandType, DynamicCallSite callSite) private static boolean
checkOperand
(OperandType operandType, FieldReference field) private static boolean
checkOperand
(OperandType operandType, MethodReference method) private static boolean
checkOperand
(OperandType operandType, TypeReference type) clone()
final int
static Instruction
static Instruction
static Instruction
static Instruction
static Instruction
static Instruction
static Instruction
create
(OpCode opCode, Instruction target) static Instruction
create
(OpCode opCode, DynamicCallSite callSite) static Instruction
create
(OpCode opCode, FieldReference field) static Instruction
create
(OpCode opCode, MethodReference method) static Instruction
create
(OpCode opCode, SwitchInfo switchInfo) static Instruction
create
(OpCode opCode, TypeReference type) static Instruction
create
(OpCode opCode, TypeReference type, int operand) static Instruction
create
(OpCode opCode, VariableReference variable) static Instruction
create
(OpCode opCode, VariableReference variable, int operand) int
getLabel()
getNext()
int
<T> T
getOperand
(int index) int
int
getSize()
boolean
hasLabel()
boolean
boolean
void
void
setNext
(Instruction next) void
setOffset
(int offset) void
void
setOperand
(Object operand) void
setPrevious
(Instruction previous) toString()
-
Field Details
-
_offset
private int _offset -
_opCode
-
_operand
-
_label
-
_previous
-
_next
-
U1_MIN_VALUE
private static final int U1_MIN_VALUE- See Also:
-
U1_MAX_VALUE
private static final int U1_MAX_VALUE- See Also:
-
U2_MIN_VALUE
private static final int U2_MIN_VALUE- See Also:
-
U2_MAX_VALUE
private static final int U2_MAX_VALUE- See Also:
-
-
Constructor Details
-
Instruction
-
Instruction
-
Instruction
-
Instruction
-
-
Method Details
-
hasOffset
public boolean hasOffset() -
hasOperand
public boolean hasOperand() -
getOffset
public int getOffset() -
setOffset
public void setOffset(int offset) -
getEndOffset
public int getEndOffset() -
getOpCode
-
setOpCode
-
getOperandCount
public int getOperandCount() -
getOperand
public <T> T getOperand(int index) -
setOperand
-
hasLabel
public boolean hasLabel() -
getLabel
-
setLabel
-
getPrevious
-
setPrevious
-
getNext
-
setNext
-
clone
-
toString
-
getSize
public int getSize() -
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
checkOperand
-
checkOperand
-
checkOperand
-
checkOperand
-
checkOperand
-
accept
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Instruction>
-