Package iota
Class NLirJump
java.lang.Object
iota.NLirInstruction
iota.NLirJump
Representation of a jump (conditional or unconditional) jump instruction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionBlock to jump to on false (null for an unconditional jump and return from a method).boolean
Whether the jump (if unconditional) is to return from a method.Block to jump to on true (null for return from a method).Fields inherited from class iota.NLirInstruction
block, id, lir2Marvin, mnemonic, reads, write
-
Constructor Summary
ConstructorsConstructorDescriptionNLirJump
(NBasicBlock block, int id, String mnemonic, NLirInstruction lhs, NLirInstruction rhs, NBasicBlock trueBlock, NBasicBlock falseBlock, boolean returnFromMethod) Constructs an NLirJump object for a conditional jump. -
Method Summary
Methods inherited from class iota.NLirInstruction
id
-
Field Details
-
trueBlock
Block to jump to on true (null for return from a method). -
falseBlock
Block to jump to on false (null for an unconditional jump and return from a method). -
returnFromMethod
public boolean returnFromMethodWhether the jump (if unconditional) is to return from a method.
-
-
Constructor Details
-
NLirJump
public NLirJump(NBasicBlock block, int id, String mnemonic, NLirInstruction lhs, NLirInstruction rhs, NBasicBlock trueBlock, NBasicBlock falseBlock, boolean returnFromMethod) Constructs an NLirJump object for a conditional jump.- Parameters:
block
- enclosing block.id
- instruction id.mnemonic
- instruction mnemonic.lhs
- lhs instruction (null for return from a method).rhs
- rhs instruction (null for return from a method).trueBlock
- block to jump to on true.falseBlock
- block to jump to on false.returnFromMethod
- whether the jump is to return from a method.
-
-
Method Details
-
toMarvin
public void toMarvin()Converts this instruction to the corresponding Marvin instruction.- Overrides:
toMarvin
in classNLirInstruction
-
toString
Returns a string representation of this instruction.- Overrides:
toString
in classNLirInstruction
- Returns:
- a string representation of this instruction.
-