public abstract class JSToObjectArrayNode extends JavaScriptBaseNode
By default, throws TypeError for null and undefined
(can be changed by using JSToObjectArrayNode.create(boolean)). Throws a RangeError if the array length
exceeds the optional array length limit or the maximum Java array size.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
nullOrUndefinedAsEmptyArray |
| Modifier | Constructor and Description |
|---|---|
protected |
JSToObjectArrayNode(boolean nullOrUndefinedAsEmptyArray) |
| Modifier and Type | Method and Description |
|---|---|
static JSToObjectArrayNode |
create() |
static JSToObjectArrayNode |
create(boolean nullOrUndefinedAsEmptyArray) |
static JavaScriptNode |
create(JSContext context,
JavaScriptNode operand) |
protected Object[] |
doFallback(Object value,
int arrayLengthLimit) |
protected Object[] |
doForeignObject(Object obj,
int arrayLengthLimit,
com.oracle.truffle.api.nodes.Node node,
com.oracle.truffle.api.interop.InteropLibrary interop,
com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch,
ImportValueNode foreignConvertNode) |
protected Object[] |
doNull(Object value,
int arrayLengthLimit) |
protected Object[] |
doUndefined(Object value,
int arrayLengthLimit) |
Object[] |
executeObjectArray(Object value) |
abstract Object[] |
executeObjectArray(Object value,
int arrayLengthLimit) |
protected Object[] |
passArray(Object[] array,
int arrayLengthLimit,
com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch) |
protected Object[] |
toArray(JSObject obj,
int arrayLengthLimit,
com.oracle.truffle.api.nodes.Node node,
JSGetLengthNode getLengthNode,
ReadElementNode readNode,
com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch) |
copy, getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, onReplace, reportLoopCount, reportLoopCountaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, toStringprotected JSToObjectArrayNode(boolean nullOrUndefinedAsEmptyArray)
public static JSToObjectArrayNode create()
public static JSToObjectArrayNode create(boolean nullOrUndefinedAsEmptyArray)
public static JavaScriptNode create(JSContext context, JavaScriptNode operand)
protected Object[] toArray(JSObject obj, int arrayLengthLimit, com.oracle.truffle.api.nodes.Node node, JSGetLengthNode getLengthNode, ReadElementNode readNode, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
protected Object[] passArray(Object[] array, int arrayLengthLimit, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
protected Object[] doForeignObject(Object obj, int arrayLengthLimit, com.oracle.truffle.api.nodes.Node node, com.oracle.truffle.api.interop.InteropLibrary interop, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch, ImportValueNode foreignConvertNode)