public class PropertyNode extends JSTargetableNode implements ReadNode
Type | Property and Description |
---|---|
boolean |
isOwn
Gets the value of the property ownProperty.
|
INTERMEDIATE_VALUE
Modifier | Constructor and Description |
---|---|
protected |
PropertyNode(JSContext context,
JavaScriptNode target,
Object propertyKey,
boolean getOwnProperty,
boolean method) |
Modifier and Type | Method and Description |
---|---|
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
static PropertyNode |
createGetHidden(JSContext ctx,
JavaScriptNode target,
com.oracle.truffle.api.object.HiddenKey hiddenKey) |
static PropertyNode |
createMethod(JSContext ctx,
JavaScriptNode target,
Object propertyKey) |
static PropertyNode |
createProperty(JSContext ctx,
JavaScriptNode target,
Object propertyKey) |
static PropertyNode |
createProperty(JSContext ctx,
JavaScriptNode target,
Object propertyKey,
boolean method) |
Object |
evaluateTarget(com.oracle.truffle.api.frame.VirtualFrame frame) |
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame)
Executes this node using the specified context and frame and returns the result value.
|
double |
executeDouble(Object targetValue) |
double |
executeDouble(Object targetValue,
Object receiverValue) |
double |
executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to a
double. |
int |
executeInt(Object targetValue) |
int |
executeInt(Object targetValue,
Object receiverValue) |
int |
executeInt(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to an
int. |
Object |
executeWithTarget(Object targetValue) |
Object |
executeWithTarget(Object targetValue,
Object receiverValue) |
Object |
executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame,
Object targetValue) |
String |
expressionToString() |
JSContext |
getContext() |
Object |
getNodeObject() |
Object |
getPropertyKey() |
JavaScriptNode |
getTarget() |
boolean |
hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag) |
boolean |
isMethod() |
boolean |
isOwnProperty()
Gets the value of the property ownProperty.
|
com.oracle.truffle.api.instrumentation.InstrumentableNode |
materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
String |
toString() |
createWrapper, evaluateReceiver, executeDoubleWithTarget, executeIntWithTarget
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, executeBoolean, executeLong, executeSafeInteger, executeString, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, isResultAlwaysOfType, onReplace, removeSourceSection, setSourceSection, setSourceSection, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTags
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, replace, replace, reportPolymorphicSpecialize
protected PropertyNode(JSContext context, JavaScriptNode target, Object propertyKey, boolean getOwnProperty, boolean method)
public boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
hasTag
in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
hasTag
in class JavaScriptNode
public Object getNodeObject()
getNodeObject
in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
public com.oracle.truffle.api.instrumentation.InstrumentableNode materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
materializeInstrumentableNodes
in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
public static PropertyNode createProperty(JSContext ctx, JavaScriptNode target, Object propertyKey, boolean method)
public static PropertyNode createProperty(JSContext ctx, JavaScriptNode target, Object propertyKey)
public static PropertyNode createMethod(JSContext ctx, JavaScriptNode target, Object propertyKey)
public static PropertyNode createGetHidden(JSContext ctx, JavaScriptNode target, com.oracle.truffle.api.object.HiddenKey hiddenKey)
public Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode
execute
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodpublic Object executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object targetValue)
executeWithTarget
in class JSTargetableNode
public int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNode
JavaScriptNode.execute(VirtualFrame)
except that it tries to convert the result value to an
int. A node can override this method if it has a better way to producing a value of type int.executeInt
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodcom.oracle.truffle.api.nodes.UnexpectedResultException
- if a loss-free conversion of the result to int is not
possiblepublic int executeInt(Object targetValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultException
public int executeInt(Object targetValue, Object receiverValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultException
public double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNode
JavaScriptNode.execute(VirtualFrame)
except that it tries to convert the result value to a
double. A node can override this method if it has a better way to producing a value of type
double.executeDouble
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodcom.oracle.truffle.api.nodes.UnexpectedResultException
- if a loss-free conversion of the result to double is not
possiblepublic double executeDouble(Object targetValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultException
public double executeDouble(Object targetValue, Object receiverValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultException
public final Object evaluateTarget(com.oracle.truffle.api.frame.VirtualFrame frame)
evaluateTarget
in class JSTargetableNode
public JavaScriptNode getTarget()
getTarget
in class JSTargetableNode
public Object getPropertyKey()
public String toString()
toString
in class JavaScriptNode
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
copyUninitialized
in class JavaScriptNode
public String expressionToString()
expressionToString
in class JavaScriptNode
public final boolean isOwnProperty()
public final boolean isMethod()
public JSContext getContext()