public abstract static class ReadElementNode.ArrayReadElementCacheDispatchNode extends JavaScriptBaseNode
| Modifier | Constructor and Description |
|---|---|
protected |
ArrayReadElementCacheDispatchNode() |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected Object |
executeArrayGet(com.oracle.truffle.api.nodes.Node node,
JSDynamicObject target,
ScriptArray array,
long index,
Object receiver,
Object defaultValue,
JSContext context) |
protected double |
executeArrayGetDouble(com.oracle.truffle.api.nodes.Node node,
JSDynamicObject target,
ScriptArray array,
long index,
Object receiver,
Object defaultValue,
JSContext context) |
protected int |
executeArrayGetInt(com.oracle.truffle.api.nodes.Node node,
JSDynamicObject target,
ScriptArray array,
long index,
Object receiver,
Object defaultValue,
JSContext context) |
protected 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 be
ReadElementNode.ArrayReadElementCacheDispatchNode.executeExpectReturn(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 with
HostCompilerDirectives.InliningCutoff allows 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 Object |
executeExpectReturn(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.ArrayReadElementCacheNode |
makeHandler(JSDynamicObject target,
ScriptArray arrayType) |
copy, getLanguage, getRealm, hasOverloadedOperators, onReplaceaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, toStringprotected abstract Object executeExpectReturn(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context, int expectedReturn)
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)
ReadElementNode.ArrayReadElementCacheDispatchNode.executeExpectReturn(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 with
HostCompilerDirectives.InliningCutoff allows 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 final Object executeArrayGet(com.oracle.truffle.api.nodes.Node node, JSDynamicObject target, ScriptArray array, long index, Object receiver, Object defaultValue, JSContext context)
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
com.oracle.truffle.api.nodes.UnexpectedResultExceptionprotected 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
com.oracle.truffle.api.nodes.UnexpectedResultExceptionprotected 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)
protected static com.oracle.truffle.js.nodes.access.ReadElementNode.ArrayReadElementCacheNode makeHandler(JSDynamicObject target, ScriptArray arrayType)