Class ReadElementNode.ArrayReadElementCacheDispatchNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheDispatchNode
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface,Cloneable
- Enclosing class:
ReadElementNode
public abstract static class ReadElementNode.ArrayReadElementCacheDispatchNode
extends JavaScriptBaseNode
-
Nested Class Summary
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.Children -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ObjectdoDispatch(JSDynamicObject target, ScriptArray arrayType, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn, ScriptArray cachedArrayType, com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode handler) protected final ObjectexecuteArrayGet(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context) protected final doubleexecuteArrayGetDouble(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context) protected final intexecuteArrayGetInt(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context) protected final ObjectexecuteDelegateReturn(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn) This could simply beexecuteExpectReturn(com.oracle.truffle.api.nodes.Node, com.oracle.truffle.js.runtime.objects.JSDynamicObject, com.oracle.truffle.js.runtime.array.ScriptArray, long, java.lang.Object, java.lang.Object, com.oracle.truffle.js.runtime.JSContext, int), but delegating a method withHostCompilerDirectives.InliningCutoffallows us to save inlining budget by not inlining the actual dispatch code, making it more likely that the caller will inline up to a method call of the expected unboxed return type.protected abstract ObjectexecuteExpectReturn(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn) protected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNodemakeHandler(JSDynamicObject target, ScriptArray arrayType) Methods inherited from class com.oracle.truffle.js.nodes.JavaScriptBaseNode
copy, getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, onReplace, reportLoopCount, reportLoopCountMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Constructor Details
-
ArrayReadElementCacheDispatchNode
protected ArrayReadElementCacheDispatchNode()
-
-
Method Details
-
executeExpectReturn
protected abstract Object executeExpectReturn(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn) -
executeDelegateReturn
protected final Object executeDelegateReturn(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn) This could simply beexecuteExpectReturn(com.oracle.truffle.api.nodes.Node, com.oracle.truffle.js.runtime.objects.JSDynamicObject, com.oracle.truffle.js.runtime.array.ScriptArray, long, java.lang.Object, java.lang.Object, com.oracle.truffle.js.runtime.JSContext, int), but delegating a method withHostCompilerDirectives.InliningCutoffallows us to save inlining budget by not inlining the actual dispatch code, making it more likely that the caller will inline up to a method call of the expected unboxed return type. -
executeArrayGet
protected final Object executeArrayGet(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context) -
executeArrayGetInt
protected final int executeArrayGetInt(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context) throws com.oracle.truffle.api.nodes.UnexpectedResultException - Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException
-
executeArrayGetDouble
protected final double executeArrayGetDouble(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context) throws com.oracle.truffle.api.nodes.UnexpectedResultException - Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException
-
doDispatch
protected static Object doDispatch(JSDynamicObject target, ScriptArray arrayType, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn, ScriptArray cachedArrayType, com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode handler) -
makeHandler
protected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode makeHandler(JSDynamicObject target, ScriptArray arrayType)
-