public abstract class ToArrayIndexNode extends JavaScriptBaseNode
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
convertStringToIndex |
protected boolean |
convertToPropertyKey |
| Modifier | Constructor and Description |
|---|---|
protected |
ToArrayIndexNode(boolean convertToPropertyKey,
boolean convertStringToIndex) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertFromString(com.oracle.truffle.api.strings.TruffleString index,
com.oracle.truffle.api.profiles.InlinedConditionProfile startsWithDigitBranch,
com.oracle.truffle.api.profiles.InlinedBranchProfile isArrayIndexBranch,
com.oracle.truffle.api.strings.TruffleString.ReadCharUTF16Node stringReadNode) |
protected static com.oracle.truffle.api.strings.TruffleString |
convertFromStringNotInRange(com.oracle.truffle.api.strings.TruffleString index) |
static ToArrayIndexNode |
create() |
static ToArrayIndexNode |
createNoStringToIndex() |
static ToArrayIndexNode |
createNoToPropertyKey() |
protected static long |
doBigInt(BigInt value) |
protected static long |
doDoubleAsIntIndex(double value) |
protected static long |
doDoubleAsUintIndex(double value) |
protected static long |
doInteger(int value) |
protected static long |
doInteropArrayIndex(Object value,
com.oracle.truffle.api.interop.InteropLibrary interop,
long index) |
protected static long |
doLong(long value) |
protected Object |
doNonArrayIndex(Object value,
com.oracle.truffle.api.interop.InteropLibrary interop,
JSToPropertyKeyNode toPropertyKey,
ToArrayIndexNode recursive) |
protected static Symbol |
doSymbol(Symbol value) |
protected static boolean |
doubleIsIntIndex(double d) |
protected static boolean |
doubleIsUintIndex(double d) |
abstract Object |
execute(Object value) |
abstract long |
executeLong(Object operand) |
boolean |
isResultArrayIndex(Object result) |
protected static boolean |
notArrayIndex(Object o) |
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 final boolean convertToPropertyKey
protected final boolean convertStringToIndex
protected ToArrayIndexNode(boolean convertToPropertyKey,
boolean convertStringToIndex)
public abstract long executeLong(Object operand) throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final boolean isResultArrayIndex(Object result)
public static ToArrayIndexNode create()
public static ToArrayIndexNode createNoToPropertyKey()
public static ToArrayIndexNode createNoStringToIndex()
protected static long doInteger(int value)
protected static long doLong(long value)
protected static boolean doubleIsIntIndex(double d)
protected static long doDoubleAsIntIndex(double value)
protected static boolean doubleIsUintIndex(double d)
protected static long doDoubleAsUintIndex(double value)
protected static long doBigInt(BigInt value)
protected final Object convertFromString(com.oracle.truffle.api.strings.TruffleString index, com.oracle.truffle.api.profiles.InlinedConditionProfile startsWithDigitBranch, com.oracle.truffle.api.profiles.InlinedBranchProfile isArrayIndexBranch, com.oracle.truffle.api.strings.TruffleString.ReadCharUTF16Node stringReadNode)
protected static com.oracle.truffle.api.strings.TruffleString convertFromStringNotInRange(com.oracle.truffle.api.strings.TruffleString index)
protected static boolean notArrayIndex(Object o)
protected static long doInteropArrayIndex(Object value, com.oracle.truffle.api.interop.InteropLibrary interop, long index)
protected final Object doNonArrayIndex(Object value, com.oracle.truffle.api.interop.InteropLibrary interop, JSToPropertyKeyNode toPropertyKey, ToArrayIndexNode recursive)