tip.instructions
Class Instruction
java.lang.Object
tip.instructions.Instruction
- Direct Known Subclasses:
- Iadd, Iaload, Icall, Icall_indirect, Ideref, Idiv, Iinput, Ilabel, Iload, Iloadc, Imalloc, Imload, Imstore, Imul, Ioutput, Ireturn, Istore, Isub, JumpInstruction
public abstract class Instruction
- extends Object
Method Summary |
abstract int[] |
genCode()
|
abstract int |
getCodeSize()
|
int |
getID()
Returns an identification number associated with the instruction type. |
static int |
getID(Class<? extends Instruction> c)
Returns an identification number associated with the instruction type. |
abstract String |
toAsm()
|
location
public int location
Instruction
public Instruction()
getID
public final int getID()
- Returns an identification number associated with the instruction type.
Each instruction class gets a unique ID which can be used to do efficient
switching on instruction types.
getID
public static int getID(Class<? extends Instruction> c)
- Returns an identification number associated with the instruction type.
Each instruction class gets a unique ID which can be used to do efficient
switching on instruction types.
- Parameters:
c
- the instruction class to get the ID for
toAsm
public abstract String toAsm()
genCode
public abstract int[] genCode()
getCodeSize
public abstract int getCodeSize()