public class ReadPropertyNode extends LoadNode implements IPropertyNode
vresult = vbase.property
or
vresult = vbase[vproperty]
Note that reading a property may overwrite the base register due to ToObject coercion.
EXCEPTION_REG, FIRST_ORDINARY_REG, NO_VALUE, RETURN_REG| Constructor and Description |
|---|
ReadPropertyNode(int base_reg,
int property_reg,
int result_reg,
SourceLocation location)
Constructs a new read property node with variable property name.
|
ReadPropertyNode(int base_reg,
String property_str,
int result_reg,
SourceLocation location)
Constructs a new read property node with fixed property name.
|
| 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 |
getBaseRegister()
Returns the base register.
|
int |
getPropertyRegister()
Returns the property register, or
AbstractNode.NO_VALUE if not applicable. |
String |
getPropertyString()
Returns the property string, or null if not fixed.
|
boolean |
isPropertyFixed()
Returns true if the property is a fixed string.
|
void |
setBaseRegister(int base_reg)
Sets the base register.
|
void |
setPropertyRegister(int property_reg)
Set the property register.
|
void |
setPropertyString(String property_str)
Sets the property string.
|
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, setRegistersDonepublic ReadPropertyNode(int base_reg,
int property_reg,
int result_reg,
SourceLocation location)
public ReadPropertyNode(int base_reg,
String property_str,
int result_reg,
SourceLocation location)
public boolean canThrowExceptions()
AbstractNodecanThrowExceptions in class AbstractNodepublic void check(BasicBlock b)
AbstractNodecheck in class AbstractNodeb - basic block containing this nodepublic int getBaseRegister()
IPropertyNodegetBaseRegister in interface IPropertyNodepublic int getPropertyRegister()
IPropertyNodeAbstractNode.NO_VALUE if not applicable.getPropertyRegister in interface IPropertyNodepublic String getPropertyString()
IPropertyNodegetPropertyString in interface IPropertyNodepublic boolean isPropertyFixed()
IPropertyNodeisPropertyFixed in interface IPropertyNodepublic void setBaseRegister(int base_reg)
IPropertyNodesetBaseRegister in interface IPropertyNodepublic void setPropertyRegister(int property_reg)
IPropertyNodesetPropertyRegister in interface IPropertyNodepublic void setPropertyString(String property_str)
IPropertyNodesetPropertyString in interface IPropertyNodepublic String toString()
AbstractNodetoString in class AbstractNodepublic <ArgType> void visitBy(NodeVisitor<ArgType> v, ArgType a)
NodeCopyright © 2012 Aarhus University