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(java.lang.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. |
java.lang.String |
getVariableName()
Returns the variable name, or null if not using a program variable.
|
java.lang.String |
toString()
Returns a string description of this node.
|
void |
visitBy(NodeVisitor v)
Visits this node with the given visitor.
|
clone, getBlock, getDuplicateOf, getImplicitAfterCall, getIndex, getSourceLocation, getThisOrDuplicateOf, isArtificial, isRegistersDone, setArtificial, setBlock, setDuplicateOf, setImplicitAfterCall, setIndex, setRegistersDone, setSourceLocation
public CatchNode(int value_reg, SourceLocation location)
value_reg
- Register with the exception value.location
- The source location.public CatchNode(java.lang.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()
AbstractNode
canThrowExceptions
in class AbstractNode
public void check(BasicBlock b)
AbstractNode
check
in class AbstractNode
b
- 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 java.lang.String getVariableName()
public java.lang.String toString()
AbstractNode
toString
in class AbstractNode
public void visitBy(NodeVisitor v)
Node
Copyright © 2009-2019 Aarhus University