public final class AccessArgumentsArrayDirectlyNode extends JavaScriptNode
Object[], but can fall
back to returning a JS Arguments Object.
This node is used to avoid unnecessary allocation of the Arguments Object for the
function.apply(this, arguments) call pattern where it would be immediately discarded.CallApplyArgumentsNodeINTERMEDIATE_VALUE| Constructor and Description |
|---|
AccessArgumentsArrayDirectlyNode(JavaScriptNode writeArgumentsNode,
JavaScriptNode readArgumentsNode,
int leadingArgCount) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame)
Executes this node using the specified context and frame and returns the result value.
|
void |
replaceWithDefaultArguments()
Called when the arguments array can no longer be accessed directly.
|
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeBoolean, executeDouble, executeInt, executeLong, executeVoid, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, hasTag, 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, reportPolymorphicSpecializepublic AccessArgumentsArrayDirectlyNode(JavaScriptNode writeArgumentsNode, JavaScriptNode readArgumentsNode, int leadingArgCount)
public Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNodeexecute in class JavaScriptNodeframe - the frame of the currently executing guest language methodpublic void replaceWithDefaultArguments()
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
copyUninitialized in class JavaScriptNode