Class ArrayIteratorPrototypeBuiltins.ArrayIteratorGetLengthSafeNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.builtins.ArrayIteratorPrototypeBuiltins.ArrayIteratorGetLengthSafeNode
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable
- Enclosing class:
ArrayIteratorPrototypeBuiltins
public abstract static class ArrayIteratorPrototypeBuiltins.ArrayIteratorGetLengthSafeNode
extends JavaScriptBaseNode
Like
ArrayIteratorPrototypeBuiltins.ArrayIteratorGetLengthNode, but designed to avoid observable side effects. Only
handles JS arrays, typed arrays, and foreign arrays (assumes getArraySize to well-behaved).
Returns -1L for other object types or if getting the
length would throw an error.-
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
Methods inherited from class 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
-
ArrayIteratorGetLengthSafeNode
public ArrayIteratorGetLengthSafeNode()
-
-
Method Details
-
execute
-