Class ReadElementNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.JavaScriptNode
com.oracle.truffle.js.nodes.access.JSTargetableNode
com.oracle.truffle.js.nodes.access.ReadElementNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, ReadNode, Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classJust a non-inline wrapper aroundReadElementNode.ArrayReadElementCacheDispatchNode.Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.ChildrenNested classes/interfaces inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode -
Field Summary
FieldsFields inherited from class JavaScriptNode
INTERMEDIATE_VALUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReadElementNode(JavaScriptNode targetNode, JavaScriptNode indexNode, JSContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptNodecopyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) static ReadElementNodecreate(JavaScriptNode targetNode, JavaScriptNode indexNode, JSContext context) static ReadElementNodeevaluateTarget(com.oracle.truffle.api.frame.VirtualFrame frame) execute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.doubleexecuteDouble(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to a double.intexecuteInt(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to an int.protected final ObjectexecuteTypeDispatch(Object target, int index, Object receiver, Object defaultValue) protected final ObjectexecuteTypeDispatch(Object target, long index, Object receiver, Object defaultValue) protected final ObjectexecuteTypeDispatch(Object target, Object index, Object receiver, Object defaultValue) protected final doubleexecuteTypeDispatchDouble(Object target, int index, Object receiver, Object defaultValue) protected final doubleexecuteTypeDispatchDouble(Object target, Object index, Object receiver, Object defaultValue) protected final intexecuteTypeDispatchInt(Object target, int index, Object receiver, Object defaultValue) protected final intexecuteTypeDispatchInt(Object target, Object index, Object receiver, Object defaultValue) executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object target) executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object target, Object receiver) final ObjectexecuteWithTargetAndIndex(Object target, int index) final ObjectexecuteWithTargetAndIndex(Object target, int index, Object receiver) final ObjectexecuteWithTargetAndIndex(Object target, long index) final ObjectexecuteWithTargetAndIndex(Object target, Object index) final ObjectexecuteWithTargetAndIndex(Object target, Object index, Object receiver) final doubleexecuteWithTargetAndIndexDouble(Object target, int index, Object receiver) final doubleexecuteWithTargetAndIndexDouble(Object target, Object index, Object receiver) final intexecuteWithTargetAndIndexInt(Object target, int index, Object receiver) final intexecuteWithTargetAndIndexInt(Object target, Object index, Object receiver) final ObjectexecuteWithTargetAndIndexOrDefault(Object target, Object index, Object defaultValue) doubleexecuteWithTargetDouble(com.oracle.truffle.api.frame.VirtualFrame frame, Object target, Object receiver) intexecuteWithTargetInt(com.oracle.truffle.api.frame.VirtualFrame frame, Object target, Object receiver) final JSContextfinal JavaScriptNodefinal JavaScriptNodebooleanprotected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNodemakeArrayCacheNode(JSDynamicObject target, ScriptArray array) com.oracle.truffle.api.instrumentation.InstrumentableNodematerializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) Methods inherited from class JSTargetableNode
createWrapper, evaluateReceiver, executeDoubleWithTarget, executeIntWithTargetMethods inherited from class JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, executeBoolean, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, isResultAlwaysOfType, onReplace, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsMethods inherited from class JavaScriptBaseNode
getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, reportLoopCount, reportLoopCountMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, reportReplaceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
createProbe, findNearestNodeAt, findNearestNodeAt, findProbe, getNodeObject
-
Field Details
-
context
-
-
Constructor Details
-
ReadElementNode
-
-
Method Details
-
create
-
create
public static ReadElementNode create(JavaScriptNode targetNode, JavaScriptNode indexNode, JSContext context) -
materializeInstrumentableNodes
-
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classJavaScriptNode
-
evaluateTarget
- Overrides:
evaluateTargetin classJSTargetableNode
-
execute
Description copied from class:JavaScriptNodeExecutes this node using the specified context and frame and returns the result value.- Specified by:
executein classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution
-
executeInt
public int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException Description copied from class:JavaScriptNodeLikeJavaScriptNode.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.- Overrides:
executeIntin classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution as an int
- Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException- if a loss-free conversion of the result to int is not possible
-
executeDouble
public double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException Description copied from class:JavaScriptNodeLikeJavaScriptNode.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.- Overrides:
executeDoublein classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution as a double
- Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException- if a loss-free conversion of the result to double is not possible
-
executeWithTarget
- Specified by:
executeWithTargetin classJSTargetableNode
-
executeWithTarget
-
executeWithTargetInt
-
executeWithTargetDouble
-
executeWithTargetAndIndex
-
executeWithTargetAndIndex
-
executeWithTargetAndIndex
-
executeWithTargetAndIndex
-
executeWithTargetAndIndex
-
executeWithTargetAndIndexInt
-
executeWithTargetAndIndexInt
-
executeWithTargetAndIndexDouble
-
executeWithTargetAndIndexDouble
-
executeWithTargetAndIndexOrDefault
-
executeTypeDispatch
-
executeTypeDispatch
-
executeTypeDispatch
-
executeTypeDispatchInt
-
executeTypeDispatchInt
-
executeTypeDispatchDouble
-
executeTypeDispatchDouble
-
makeArrayCacheNode
protected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode makeArrayCacheNode(JSDynamicObject target, ScriptArray array) -
getTarget
- Overrides:
getTargetin classJSTargetableNode
-
getElement
-
getContext
-
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-
expressionToString
- Overrides:
expressionToStringin classJavaScriptNode
-
getIndexNode
-