public class CallNode extends LoadNode implements ICallNode
vresult = [new] [vbase.] vfunction(v0,...,vn)
Note that vfunction represents the function value (not the property name),
and vbase represents the base object (or AbstractNode.NO_VALUE if absent).
Must be the only node in its block. The block must have precisely one successor.
EXCEPTION_REG, FIRST_ORDINARY_REG, NO_VALUE, RETURN_REG| Constructor and Description |
|---|
CallNode(boolean constructor,
boolean arraylit,
int result_reg,
int base_reg,
int function_reg,
List<Integer> arg_regs,
SourceLocation location)
Constructs a new call/construct 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 |
getArgRegister(int i)
Returns the given argument register.
|
int |
getBaseRegister()
Returns the base register.
|
int |
getFunctionRegister()
Returns the function register.
|
int |
getNumberOfArgs()
Returns the number of arguments.
|
boolean |
isArrayLiteral()
Returns true if this call node comes from an array literal.
|
boolean |
isConstructorCall()
Checks whether this is a constructor call or an ordinary call.
|
void |
setArgRegister(int i,
int var)
Sets the i'th argument to the given argument register.
|
void |
setBaseRegister(int base_var)
Sets the base register.
|
void |
setFunctionRegister(int function_reg)
Sets the function register.
|
String |
toString()
Returns a string description of this node.
|
<ArgType> void |
visitBy(NodeVisitor<ArgType> v,
ArgType a)
Visits this node with the given visitor.
|
getResultRegistergetBlock, getDuplicateOf, getIndex, getSourceLocation, isArtificial, isDead, isRegistersDone, setArtificial, setBlock, setDead, setDuplicateOf, setIndex, setRegistersDoneclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResultRegisterpublic CallNode(boolean constructor,
boolean arraylit,
int result_reg,
int base_reg,
int function_reg,
List<Integer> arg_regs,
SourceLocation location)
constructor - Is this a constructor.arraylit - Does this call node come from an array literalresult_reg - The register for the result.base_reg - The base object register.function_reg - The function register.arg_regs - The argument registers as a list.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 getArgRegister(int i)
public int getBaseRegister()
AbstractNode.NO_VALUE represents absent value (implicitly the global object).public int getFunctionRegister()
public int getNumberOfArgs()
public boolean isArrayLiteral()
public boolean isConstructorCall()
ICallNodeisConstructorCall in interface ICallNodepublic void setArgRegister(int i,
int var)
public void setBaseRegister(int base_var)
public void setFunctionRegister(int function_reg)
public String toString()
AbstractNodetoString in class AbstractNodepublic <ArgType> void visitBy(NodeVisitor<ArgType> v, ArgType a)
NodeCopyright © 2012 Aarhus University