Package EDU.purdue.cs.bloat.tree
Class IfStmt
- java.lang.Object
-
- EDU.purdue.cs.bloat.tree.Node
-
- EDU.purdue.cs.bloat.tree.Stmt
-
- EDU.purdue.cs.bloat.tree.JumpStmt
-
- EDU.purdue.cs.bloat.tree.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomparison()BlockfalseTarget()voidnegate()Set the comparison operator for this if statement to its logical negative.voidsetFalseTarget(Block target)voidsetTrueTarget(Block target)BlocktrueTarget()-
Methods inherited from class EDU.purdue.cs.bloat.tree.JumpStmt
catchTargets, copyInto
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Stmt
cleanupOnly, clone
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Node
block, cleanup, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visit, visitChildren, visitForceChildren, visitOnly
-
-
-
-
Field Detail
-
EQ
public static final int EQ
- See Also:
- Constant Field Values
-
NE
public static final int NE
- See Also:
- Constant Field Values
-
GT
public static final int GT
- See Also:
- Constant Field Values
-
GE
public static final int GE
- See Also:
- Constant Field Values
-
LT
public static final int LT
- See Also:
- Constant Field Values
-
LE
public static final int LE
- See Also:
- Constant Field Values
-
-
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()
-
-