public class IfNode extends Node
if (vcondition) {...} else {...}
Must be the last node in its block.
EXCEPTION_REG, FIRST_ORDINARY_REG, NO_VALUE, RETURN_REG| Constructor and Description |
|---|
IfNode(int condition_reg,
SourceLocation location)
Constructs a new if node.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canThrowExceptions()
Returns true if this node may throw exceptions.
|
void |
check(BasicBlock b)
Perform a consistency check of this node.
|
int |
getConditionRegister()
Returns the condition register.
|
BasicBlock |
getSuccFalse()
Returns the 'false' successor.
|
BasicBlock |
getSuccTrue()
Returns the 'true' successor.
|
void |
setConditionRegister(int condition_reg)
Sets the condition register.
|
void |
setSuccessors(BasicBlock succ_true,
BasicBlock succ_false)
Sets the true/false successors.
|
String |
toString()
Returns a string description of this node.
|
<ArgType> void |
visitBy(NodeVisitor<ArgType> v,
ArgType a)
Visits this node with the given visitor.
|
getBlock, getDuplicateOf, getIndex, getSourceLocation, isArtificial, isDead, isRegistersDone, setArtificial, setBlock, setDead, setDuplicateOf, setIndex, setRegistersDonepublic IfNode(int condition_reg,
SourceLocation location)
condition_reg - The condition register.location - The source location.public boolean canThrowExceptions()
AbstractNodecanThrowExceptions in class AbstractNodepublic void check(BasicBlock b)
AbstractNodecheck in class AbstractNodeb - basic block containing this nodepublic int getConditionRegister()
public BasicBlock getSuccFalse()
public BasicBlock getSuccTrue()
public void setConditionRegister(int condition_reg)
public void setSuccessors(BasicBlock succ_true, BasicBlock succ_false)
succ_true - The basic block if the condition is true.succ_false - The basic block if the condition is false.public String toString()
AbstractNodetoString in class AbstractNodepublic <ArgType> void visitBy(NodeVisitor<ArgType> v, ArgType a)
NodeCopyright © 2012 Aarhus University