Package pascal.taie.ir.stmt
Class If
java.lang.Object
pascal.taie.ir.stmt.JumpStmt
pascal.taie.ir.stmt.If
- All Implemented Interfaces:
Serializable
,Stmt
,Indexable
Representation of if statement, e.g., if a == b goto S;
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(StmtVisitor<T> visitor) boolean
getDef()
int
getIndex()
int
getUses()
void
setIndex
(int index) void
setLineNumber
(int lineNumber) void
toString()
-
Field Details
-
index
protected int index -
lineNumber
protected int lineNumber
-
-
Constructor Details
-
If
-
-
Method Details
-
getCondition
- Returns:
- the condition expression of the if-statement.
-
getTarget
- Returns:
- the jump target (when the condition expression is evaluated to true) of the if-statement.
-
setTarget
-
getUses
-
getTargets
- Specified by:
getTargets
in classJumpStmt
- Returns:
- possible jump targets of this statement.
-
accept
-
toString
-
getIndex
public int getIndex() -
setIndex
public void setIndex(int index) -
getLineNumber
public int getLineNumber()- Specified by:
getLineNumber
in interfaceStmt
- Returns:
- the line number of this Stmt in the original source file. If the line number is unavailable, return -1.
-
setLineNumber
public void setLineNumber(int lineNumber) - Specified by:
setLineNumber
in interfaceStmt
-
getDef
-
canFallThrough
public boolean canFallThrough()- Specified by:
canFallThrough
in interfaceStmt
- Returns:
- true if execution after this statement could continue at the following statement, otherwise false.
-