public class TypeofNode extends LoadNode
vresult = typeof v (for syntactic property references)
or
vresult = typeof x (for variables)
EXCEPTION_REG, FIRST_ORDINARY_REG, NO_VALUE, RETURN_REG
Constructor and Description |
---|
TypeofNode(int arg_reg,
int result_reg,
SourceLocation location,
SourceLocation operandSourceLocation)
Constructs a new typeof node for a property reference.
|
TypeofNode(java.lang.String varname,
int result_reg,
SourceLocation location,
SourceLocation operandSourceLocation)
Constructs a new typeof node for a 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 |
getArgRegister()
Returns the argument register, or
AbstractNode.NO_VALUE if not applicable. |
SourceLocation |
getOperandSourceLocation() |
java.lang.String |
getVariableName()
Returns the source variable name, or null if not a variable.
|
boolean |
isVariable()
Returns true if the argument is a variable, false if it is a property reference.
|
void |
setArgRegister(int arg_reg)
Sets the argument register.
|
java.lang.String |
toString()
Returns a string description of this node.
|
void |
visitBy(NodeVisitor v)
Visits this node with the given visitor.
|
getResultRegister
clone, getBlock, getDuplicateOf, getImplicitAfterCall, getIndex, getSourceLocation, getThisOrDuplicateOf, isArtificial, isRegistersDone, setArtificial, setBlock, setDuplicateOf, setImplicitAfterCall, setIndex, setRegistersDone, setSourceLocation
public TypeofNode(int arg_reg, int result_reg, SourceLocation location, SourceLocation operandSourceLocation)
public TypeofNode(java.lang.String varname, int result_reg, SourceLocation location, SourceLocation operandSourceLocation)
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 getArgRegister()
AbstractNode.NO_VALUE
if not applicable.public SourceLocation getOperandSourceLocation()
public java.lang.String getVariableName()
public boolean isVariable()
public void setArgRegister(int arg_reg)
public java.lang.String toString()
AbstractNode
toString
in class AbstractNode
public void visitBy(NodeVisitor v)
Node
Copyright © 2009-2019 Aarhus University