public class ReadPropertyNode extends LoadNode
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,
java.lang.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. |
java.lang.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.
|
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 ReadPropertyNode(int base_reg, int property_reg, int result_reg, SourceLocation location)
public ReadPropertyNode(int base_reg, java.lang.String property_str, int result_reg, SourceLocation 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 getBaseRegister()
public int getPropertyRegister()
AbstractNode.NO_VALUE
if not applicable.public java.lang.String getPropertyString()
public boolean isPropertyFixed()
public void setBaseRegister(int base_reg)
public void setPropertyRegister(int property_reg)
public java.lang.String toString()
AbstractNode
toString
in class AbstractNode
public void visitBy(NodeVisitor v)
Node
Copyright © 2009-2019 Aarhus University