Class IfStmt

  • Direct Known Subclasses:
    IfCmpStmt, IfZeroStmt

    public abstract class IfStmt
    extends JumpStmt
    IfStmt is a super class of statements in which some expression is evaluated and one of two branches is taken.
    See Also:
    IfCmpStmt, IfZeroStmt
    • Constructor Detail

      • IfStmt

        public IfStmt​(int comparison,
                      Block trueTarget,
                      Block falseTarget)
        Constructor.
        Parameters:
        comparison - Comparison operator used in this if statement.
        trueTarget - Basic Block that is executed when if statement is true.
        falseTarget - Basic Block that is executed when if statement is false.
    • Method Detail

      • comparison

        public int comparison()
        Returns:
        Comparison operator for this if statement.
      • negate

        public void negate()
        Set the comparison operator for this if statement to its logical negative.
      • setTrueTarget

        public void setTrueTarget​(Block target)
      • setFalseTarget

        public void setFalseTarget​(Block target)
      • trueTarget

        public Block trueTarget()
      • falseTarget

        public Block falseTarget()