Package iota

Class NLirJump


class NLirJump extends NLirInstruction
Representation of a jump (conditional or unconditional) jump instruction.
  • Field Details

    • trueBlock

      public NBasicBlock trueBlock
      Block to jump to on true (null for return from a method).
    • falseBlock

      public NBasicBlock falseBlock
      Block to jump to on false (null for an unconditional jump and return from a method).
    • returnFromMethod

      public boolean returnFromMethod
      Whether 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 class NLirInstruction
    • toString

      public String toString()
      Returns a string representation of this instruction.
      Overrides:
      toString in class NLirInstruction
      Returns:
      a string representation of this instruction.