abstract class NHIRInstruction extends Object
Modifier and Type | Field and Description |
---|---|
NBasicBlock |
block
The block containing this instruction.
|
protected static String[] |
hirMnemonic
Maps JVM opcode to a string mnemonic for HIR instructions.
|
int |
id
Unique identifier of this instruction.
|
NLIRInstruction |
lir
The LIR instruction corresponding to this HIR instruction.
|
String |
lType
Long type name for this instruction.
|
String |
sType
Short type name for this instruction.
|
Modifier | Constructor and Description |
---|---|
protected |
NHIRInstruction(NBasicBlock block,
int id)
Construct an NHIRInstruction object.
|
protected |
NHIRInstruction(NBasicBlock block,
int id,
String sType,
String lType)
Construct an NHIRInstruction object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(NHIRInstruction other)
Return true if this instruction is the same as the other, false
otherwise.
|
String |
id()
Return the identifier of this instruction with the short type name
prefixed.
|
NLIRInstruction |
toLir()
Convert and return a low-level representation (LIR) of this HIR
instruction.
|
String |
toString()
Return a string representation of this instruction.
|
protected static String[] hirMnemonic
public NBasicBlock block
public int id
public String sType
public String lType
public NLIRInstruction lir
protected NHIRInstruction(NBasicBlock block, int id)
block
- enclosing block.id
- identifier of the instruction.protected NHIRInstruction(NBasicBlock block, int id, String sType, String lType)
block
- enclosing block.id
- identifier of the instruction.sType
- short type name of the instruction.lType
- long type name of the instruction.public boolean equals(NHIRInstruction other)
other
- the instruction to compare to.public NLIRInstruction toLir()
public String id()