Package iota

Class NHirJump


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

    • lhs

      public int lhs
      Lhs instruction id.
    • rhs

      public int rhs
      Rhs instruction id.
    • trueBlock

      public NBasicBlock trueBlock
      Block to jump to on true.
    • falseBlock

      public NBasicBlock falseBlock
      Block to jump to on false (null for an unconditional jump).
  • Constructor Details

    • NHirJump

      public NHirJump(NBasicBlock block, int id, NBasicBlock trueBlock)
      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

      public NLirInstruction toLir()
      Converts and returns a low-level representation (LIR) of this instruction.
      Specified by:
      toLir in class NHirInstruction
      Returns:
      the LIR instruction corresponding to this instruction.
    • toString

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