public class CallNode extends LoadNode
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).
The function may be given as a property name (fixed or computed) instead of a register.
Must be the only node in its block. The block must have precisely one successor.
| Modifier and Type | Class and Description |
|---|---|
static class |
CallNode.LiteralConstructorKinds
This information is syntactic and allows us to:
1) distinguish between [4] and Array(4) for the case where Array gets precisely one numeric argument.
|
EXCEPTION_REG, FIRST_ORDINARY_REG, NO_VALUE, RETURN_REG| Constructor and Description |
|---|
CallNode(boolean constructor,
int result_reg,
int base_reg,
int function_reg,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
Constructs a new call/construct node.
|
CallNode(boolean constructor,
int result_reg,
int base_reg,
int property_reg,
java.lang.String property_str,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
Constructs a new call/construct node with a property read.
|
CallNode(CallNode.LiteralConstructorKinds literalConstructorKind,
int result_reg,
int base_reg,
int function_reg,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
Constructs a new construct call node for a literal object.
|
CallNode(int result_reg,
TAJSFunctionName tajsFunctionName,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
Constructs a new call/construct node for a TAJS_* function.
|
| 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, or
AbstractNode.NO_VALUE if not applicable. |
CallNode.LiteralConstructorKinds |
getLiteralConstructorKind() |
int |
getNumberOfArgs()
Returns the number of arguments.
|
int |
getPropertyRegister()
Returns the property register, or
AbstractNode.NO_VALUE if not applicable. |
java.lang.String |
getPropertyString()
Returns the property string, or null if not fixed.
|
TAJSFunctionName |
getTajsFunctionName()
Returns the name of the TAJS_* function to call, or null.
|
boolean |
isConstructorCall()
Checks whether this is a constructor call or an ordinary call.
|
boolean |
isPropertyFixed()
Returns true if the property is a fixed string.
|
java.lang.String |
toString()
Returns a string description of this node.
|
void |
visitBy(NodeVisitor v)
Visits this node with the given visitor.
|
getResultRegisterclone, getBlock, getDuplicateOf, getImplicitAfterCall, getIndex, getSourceLocation, getThisOrDuplicateOf, isArtificial, isRegistersDone, setArtificial, setBlock, setDuplicateOf, setImplicitAfterCall, setIndex, setRegistersDone, setSourceLocationpublic CallNode(boolean constructor,
int result_reg,
int base_reg,
int function_reg,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
constructor - Is this a constructor.result_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 CallNode(boolean constructor,
int result_reg,
int base_reg,
int property_reg,
java.lang.String property_str,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
constructor - Is this a constructor.result_reg - The register for the result.base_reg - The base object register.property_reg - The property register, if not fixed property name.property_str - The property, if fixed-string property namearg_regs - The argument registers as a list.location - The source location.public CallNode(CallNode.LiteralConstructorKinds literalConstructorKind, int result_reg, int base_reg, int function_reg, java.util.List<java.lang.Integer> arg_regs, SourceLocation location)
literalConstructorKind - the kind of literal constructor being invoked.result_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 CallNode(int result_reg,
TAJSFunctionName tajsFunctionName,
java.util.List<java.lang.Integer> arg_regs,
SourceLocation location)
result_reg - The register for the result.tajsFunctionName - The TAJS_* function.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()
AbstractNode.NO_VALUE if not applicable.public CallNode.LiteralConstructorKinds getLiteralConstructorKind()
public int getNumberOfArgs()
public int getPropertyRegister()
AbstractNode.NO_VALUE if not applicable.public java.lang.String getPropertyString()
public TAJSFunctionName getTajsFunctionName()
public boolean isConstructorCall()
public boolean isPropertyFixed()
public java.lang.String toString()
AbstractNodetoString in class AbstractNodepublic void visitBy(NodeVisitor v)
NodeCopyright © 2009-2019 Aarhus University