public class ReadElementNode extends JSTargetableNode implements ReadNode
| Modifier and Type | Class and Description |
|---|---|
static class |
ReadElementNode.ArrayReadElementCacheDispatchNode |
static class |
ReadElementNode.ReadElementArrayDispatchNode |
| Modifier and Type | Field and Description |
|---|---|
protected JSContext |
context |
INTERMEDIATE_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
ReadElementNode(JavaScriptNode targetNode,
JavaScriptNode indexNode,
JSContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
static ReadElementNode |
create(JavaScriptNode targetNode,
JavaScriptNode indexNode,
JSContext context) |
static ReadElementNode |
create(JSContext context) |
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(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(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to an
int. |
protected Object |
executeTypeDispatch(Object target,
int index,
Object receiver,
Object defaultValue) |
protected Object |
executeTypeDispatch(Object target,
long index,
Object receiver,
Object defaultValue) |
protected Object |
executeTypeDispatch(Object target,
Object index,
Object receiver,
Object defaultValue) |
protected double |
executeTypeDispatchDouble(Object target,
int index,
Object receiver,
Object defaultValue) |
protected double |
executeTypeDispatchDouble(Object target,
Object index,
Object receiver,
Object defaultValue) |
protected int |
executeTypeDispatchInt(Object target,
int index,
Object receiver,
Object defaultValue) |
protected int |
executeTypeDispatchInt(Object target,
Object index,
Object receiver,
Object defaultValue) |
Object |
executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame,
Object target) |
Object |
executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame,
Object target,
Object receiver) |
Object |
executeWithTargetAndIndex(Object target,
int index) |
Object |
executeWithTargetAndIndex(Object target,
int index,
Object receiver) |
Object |
executeWithTargetAndIndex(Object target,
long index) |
Object |
executeWithTargetAndIndex(Object target,
Object index) |
Object |
executeWithTargetAndIndex(Object target,
Object index,
Object receiver) |
double |
executeWithTargetAndIndexDouble(Object target,
int index,
Object receiver) |
double |
executeWithTargetAndIndexDouble(Object target,
Object index,
Object receiver) |
int |
executeWithTargetAndIndexInt(Object target,
int index,
Object receiver) |
int |
executeWithTargetAndIndexInt(Object target,
Object index,
Object receiver) |
Object |
executeWithTargetAndIndexOrDefault(Object target,
Object index,
Object defaultValue) |
double |
executeWithTargetDouble(com.oracle.truffle.api.frame.VirtualFrame frame,
Object target,
Object receiver) |
int |
executeWithTargetInt(com.oracle.truffle.api.frame.VirtualFrame frame,
Object target,
Object receiver) |
String |
expressionToString() |
JSContext |
getContext() |
JavaScriptNode |
getElement() |
JavaScriptNode |
getIndexNode() |
JavaScriptNode |
getTarget() |
boolean |
hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag) |
protected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode |
makeArrayCacheNode(JSDynamicObject target,
ScriptArray array) |
com.oracle.truffle.api.instrumentation.InstrumentableNode |
materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
createWrapper, evaluateReceiver, executeDoubleWithTarget, executeIntWithTargetaddCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, executeBoolean, executeLong, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, isResultAlwaysOfType, onReplace, removeSourceSection, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsgetLanguage, getRealm, hasOverloadedOperatorsaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecializeprotected final JSContext context
protected ReadElementNode(JavaScriptNode targetNode, JavaScriptNode indexNode, JSContext context)
public static ReadElementNode create(JSContext context)
public static ReadElementNode create(JavaScriptNode targetNode, JavaScriptNode indexNode, JSContext context)
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.InstrumentableNodepublic boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
hasTag in interface com.oracle.truffle.api.instrumentation.InstrumentableNodehasTag in class JavaScriptNodepublic Object evaluateTarget(com.oracle.truffle.api.frame.VirtualFrame frame)
evaluateTarget in class JSTargetableNodepublic Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNodeexecute in class JavaScriptNodeframe - the frame of the currently executing guest language methodpublic int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNodeJavaScriptNode.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 JavaScriptNodeframe - 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 double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNodeJavaScriptNode.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 JavaScriptNodeframe - 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 Object executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object target)
executeWithTarget in class JSTargetableNodepublic Object executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object target, Object receiver)
public int executeWithTargetInt(com.oracle.truffle.api.frame.VirtualFrame frame,
Object target,
Object receiver)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic double executeWithTargetDouble(com.oracle.truffle.api.frame.VirtualFrame frame,
Object target,
Object receiver)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final Object executeWithTargetAndIndex(Object target, Object index)
public final Object executeWithTargetAndIndex(Object target, Object index, Object receiver)
public final Object executeWithTargetAndIndex(Object target, int index, Object receiver)
public final int executeWithTargetAndIndexInt(Object target, Object index, Object receiver) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final int executeWithTargetAndIndexInt(Object target, int index, Object receiver) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final double executeWithTargetAndIndexDouble(Object target, Object index, Object receiver) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final double executeWithTargetAndIndexDouble(Object target, int index, Object receiver) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final Object executeWithTargetAndIndexOrDefault(Object target, Object index, Object defaultValue)
protected final Object executeTypeDispatch(Object target, Object index, Object receiver, Object defaultValue)
protected final Object executeTypeDispatch(Object target, int index, Object receiver, Object defaultValue)
protected final Object executeTypeDispatch(Object target, long index, Object receiver, Object defaultValue)
protected final int executeTypeDispatchInt(Object target, Object index, Object receiver, Object defaultValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionprotected final int executeTypeDispatchInt(Object target, int index, Object receiver, Object defaultValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionprotected final double executeTypeDispatchDouble(Object target, Object index, Object receiver, Object defaultValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionprotected final double executeTypeDispatchDouble(Object target, int index, Object receiver, Object defaultValue) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionprotected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode makeArrayCacheNode(JSDynamicObject target, ScriptArray array)
public final JavaScriptNode getTarget()
getTarget in class JSTargetableNodepublic final JavaScriptNode getElement()
public final JSContext getContext()
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
copyUninitialized in class JavaScriptNodepublic String expressionToString()
expressionToString in class JavaScriptNodepublic JavaScriptNode getIndexNode()