public class CatchNode extends Node
catch(x)
Must be the first node in its block.
EXCEPTION_REG, FIRST_ORDINARY_REG, NO_VALUE, RETURN_REG| Constructor and Description |
|---|
CatchNode(int value_reg,
SourceLocation location)
Construct a new catch node where the exception is stored in a register.
|
CatchNode(String varname,
int scopeobj_reg,
SourceLocation location)
Constructs a new catch node where the exception is stored in a program variable.
|
| 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 |
getScopeObjRegister()
Returns the object to be added to the scope chain when entering the catch block,
or
AbstractNode.NO_VALUE if not using a program variable. |
int |
getValueRegister()
Returns the result register,
or
AbstractNode.NO_VALUE if not using a register. |
String |
getVariableName()
Returns the variable name, or null if not using a program variable.
|
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 CatchNode(int value_reg,
SourceLocation location)
value_reg - Register with the exception value.location - The source location.public CatchNode(String varname, int scopeobj_reg, SourceLocation location)
varname - The variable name.scopeobj_reg - The object to be added to the scope chain when entering the catch block.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 getScopeObjRegister()
AbstractNode.NO_VALUE if not using a program variable.public int getValueRegister()
AbstractNode.NO_VALUE if not using a register.public String getVariableName()
public String toString()
AbstractNodetoString in class AbstractNodepublic <ArgType> void visitBy(NodeVisitor<ArgType> v, ArgType a)
NodeCopyright © 2012 Aarhus University