Package iota
Class NHirJump
java.lang.Object
iota.NHirInstruction
iota.NHirJump
Representation of a jump (conditional or unconditional) jump instruction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionBlock to jump to on false (null for an unconditional jump).int
Lhs instruction id.int
Rhs instruction id.Block to jump to on true. -
Constructor Summary
ConstructorsConstructorDescriptionNHirJump
(NBasicBlock block, int id, int opcode, int lhs, int rhs, NBasicBlock trueBlock, NBasicBlock falseBlock) Constructs an NHirJump object for a conditional jump.NHirJump
(NBasicBlock block, int id, NBasicBlock trueBlock) Constructs an NHirJump object for an unconditional jump. -
Method Summary
Methods inherited from class iota.NHirInstruction
id
-
Field Details
-
lhs
public int lhsLhs instruction id. -
rhs
public int rhsRhs instruction id. -
trueBlock
Block to jump to on true. -
falseBlock
Block to jump to on false (null for an unconditional jump).
-
-
Constructor Details
-
NHirJump
Constructs an NHirJump object for an unconditional jump.- Parameters:
block
- enclosing basic block.id
- instruction id.trueBlock
- block to jump to.
-
NHirJump
public NHirJump(NBasicBlock block, int id, int opcode, int lhs, int rhs, NBasicBlock trueBlock, NBasicBlock falseBlock) Constructs an NHirJump object for a conditional jump.- Parameters:
block
- enclosing basic block.id
- instruction id.opcode
- instruction opcode.lhs
- Lhs instruction id.rhs
- Rhs instruction id.trueBlock
- block to jump to on true.falseBlock
- block to jump to on false.
-
-
Method Details
-
toLir
Converts and returns a low-level representation (LIR) of this instruction.- Specified by:
toLir
in classNHirInstruction
- Returns:
- the LIR instruction corresponding to this instruction.
-
toString
Returns a string representation of this instruction.- Overrides:
toString
in classNHirInstruction
- Returns:
- a string representation of this instruction.
-