public abstract class JSAbstractArray extends JSNonProxy
| Type | Property and Description |
|---|---|
boolean |
usesOrdinaryGetOwn |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ARRAY_LENGTH_NOT_WRITABLE |
static String |
ARRAY_PROTOTYPE_NO_ELEMENTS_INVALIDATION |
protected static String |
CANNOT_REDEFINE_PROPERTY_LENGTH |
static Comparator<Object> |
DEFAULT_JSARRAY_COMPARATOR |
static Comparator<Object> |
DEFAULT_JSARRAY_DOUBLE_COMPARATOR |
static Comparator<Object> |
DEFAULT_JSARRAY_INTEGER_COMPARATOR |
static com.oracle.truffle.api.object.HiddenKey |
LAZY_REGEX_ORIGINAL_INPUT_ID |
static com.oracle.truffle.api.object.HiddenKey |
LAZY_REGEX_RESULT_ID |
static com.oracle.truffle.api.strings.TruffleString |
LENGTH |
protected static String |
MAKE_SLOW_ARRAY_NEVER_PART_OF_COMPILATION_MESSAGE |
GET_SYMBOL_SPECIES_NAME| Modifier | Constructor and Description |
|---|---|
protected |
JSAbstractArray() |
| Modifier and Type | Method and Description |
|---|---|
protected static ArrayAccess |
arrayAccess() |
static ArrayAllocationSite |
arrayGetAllocationSite(JSDynamicObject thisObj) |
static Object |
arrayGetArray(JSDynamicObject thisObj) |
static int |
arrayGetArrayOffset(JSDynamicObject thisObj) |
static ScriptArray |
arrayGetArrayType(JSDynamicObject thisObj) |
static int |
arrayGetHoleCount(JSDynamicObject thisObj) |
static long |
arrayGetIndexOffset(JSDynamicObject thisObj) |
static long |
arrayGetLength(JSDynamicObject thisObj) |
static Object |
arrayGetRegexResult(JSDynamicObject thisObj,
com.oracle.truffle.api.object.DynamicObjectLibrary lazyRegexResult) |
static com.oracle.truffle.api.strings.TruffleString |
arrayGetRegexResultOriginalInput(JSDynamicObject thisObj,
com.oracle.truffle.api.object.DynamicObjectLibrary lazyRegexResultOriginalInput) |
static int |
arrayGetUsedLength(JSDynamicObject thisObj) |
static void |
arraySetArray(JSDynamicObject thisObj,
Object array) |
static void |
arraySetArrayOffset(JSDynamicObject thisObj,
int arrayOffset) |
static void |
arraySetArrayType(JSDynamicObject thisObj,
ScriptArray arrayType) |
static void |
arraySetHoleCount(JSDynamicObject thisObj,
int holeCount) |
static void |
arraySetIndexOffset(JSDynamicObject thisObj,
long indexOffset) |
static void |
arraySetLength(JSDynamicObject thisObj,
int length) |
static void |
arraySetLength(JSDynamicObject thisObj,
long length) |
static void |
arraySetUsedLength(JSDynamicObject thisObj,
int usedLength) |
boolean |
defineOwnProperty(JSDynamicObject thisObj,
Object key,
PropertyDescriptor descriptor,
boolean doThrow)
9.1.6 [[DefineOwnProperty]] (P, Desc).
|
protected boolean |
defineOwnPropertyIndex(JSDynamicObject thisObj,
com.oracle.truffle.api.strings.TruffleString name,
PropertyDescriptor descriptor,
boolean doThrow)
Implements part "3" of 15.4.5.1 [[DefineOwnProperty]], redefining one of the index property
of an Array.
|
boolean |
delete(JSDynamicObject thisObj,
long index,
boolean isStrict) |
boolean |
delete(JSDynamicObject thisObj,
Object key,
boolean isStrict)
9.1.10 [[Delete]] (P).
|
com.oracle.truffle.api.strings.TruffleString |
getBuiltinToStringTag(JSDynamicObject object)
Returns builtinTag from step 14 of ES6+ 19.1.3.6.
|
long |
getLength(JSDynamicObject thisObj) |
Object |
getOwnHelper(JSDynamicObject store,
Object thisObj,
long index,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
Like getOwnProperty, but returns
null if value is not present instead of undefined. |
Object |
getOwnHelper(JSDynamicObject store,
Object thisObj,
Object key,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
Like getOwnProperty, but returns
null if value is not present instead of undefined. |
PropertyDescriptor |
getOwnProperty(JSDynamicObject thisObj,
Object key)
9.1.5 [[GetOwnProperty]] (P).
|
List<Object> |
getOwnPropertyKeys(JSDynamicObject thisObj,
boolean strings,
boolean symbols)
GetOwnPropertyKeys (O, type).
|
boolean |
hasOwnProperty(JSDynamicObject thisObj,
long index) |
boolean |
hasOwnProperty(JSDynamicObject thisObj,
Object key) |
protected boolean |
isSlowArray(JSDynamicObject thisObj) |
protected JSDynamicObject |
makeSlowArray(JSDynamicObject thisObj) |
static PropertyDescriptor |
ordinaryGetOwnPropertyArray(JSDynamicObject thisObj,
Object key)
9.1.5.1 OrdinaryGetOwnProperty (O, P), implemented for Arrays.
|
protected static List<Object> |
ownPropertyKeysFastArray(JSDynamicObject thisObj,
boolean strings,
boolean symbols) |
protected static List<Object> |
ownPropertyKeysSlowArray(JSDynamicObject thisObj,
boolean strings,
boolean symbols) |
boolean |
preventExtensions(JSDynamicObject thisObj,
boolean doThrow)
9.1.4 [[PreventExtensions]] ().
|
boolean |
set(JSDynamicObject thisObj,
long index,
Object value,
Object receiver,
boolean isStrict,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
boolean |
set(JSDynamicObject thisObj,
Object key,
Object value,
Object receiver,
boolean isStrict,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
9.1.9 [[Set]] (P, V, Receiver).
|
boolean |
setIntegrityLevel(JSDynamicObject thisObj,
boolean freeze,
boolean doThrow)
ES2015 7.3.14 SetIntegrityLevel(O, level).
|
boolean |
setLength(JSDynamicObject thisObj,
long length,
boolean doThrow) |
boolean |
testIntegrityLevel(JSDynamicObject thisObj,
boolean frozen)
ES2015 7.3.15 TestIntegrityLevel(O, level).
|
static Object[] |
toArray(JSDynamicObject thisObj)
Creates an Object[] from this array, of size array.length.
|
static long |
toArrayLengthOrRangeError(Number len,
Number len32,
com.oracle.truffle.api.nodes.Node originatingNode) |
static long |
toArrayLengthOrRangeError(Object obj,
com.oracle.truffle.api.nodes.Node originatingNode) |
com.oracle.truffle.api.strings.TruffleString |
toDisplayStringImpl(JSDynamicObject obj,
boolean allowSideEffects,
ToDisplayStringFormat format,
int depth)
A more informative toString variant, mainly used for error messages.
|
boolean |
usesOrdinaryGetOwnProperty() |
checkProtoCycle, createSymbolSpeciesGetterFunction, deletePropertyDefault, getHelper, getHelper, getMethodHelper, getPrototypeOf, hasOnlyShapeProperties, hasProperty, hasProperty, invokeAccessorPropertySetter, isExtensible, ordinaryGetOwnProperty, ordinaryGetOwnPropertyIntl, ordinaryIsExtensible, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensionsImpl, putConstructorSpeciesGetter, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevelFast, toString, usesOrdinaryIsExtensibledefaultToString, filterOwnPropertyKeys, formatToString, get, get, getClassName, getIntrinsicDefaultProto, getToStringTag, isInstance, isInstance, isInstance, isInstance, makeInitialShape, ownPropertyKeys, testIntegrityLevelDefaultpublic boolean usesOrdinaryGetOwnProperty
usesOrdinaryGetOwnProperty in class JSNonProxypublic static final com.oracle.truffle.api.strings.TruffleString LENGTH
protected static final String ARRAY_LENGTH_NOT_WRITABLE
protected static final String CANNOT_REDEFINE_PROPERTY_LENGTH
protected static final String MAKE_SLOW_ARRAY_NEVER_PART_OF_COMPILATION_MESSAGE
public static final String ARRAY_PROTOTYPE_NO_ELEMENTS_INVALIDATION
public static final com.oracle.truffle.api.object.HiddenKey LAZY_REGEX_RESULT_ID
public static final com.oracle.truffle.api.object.HiddenKey LAZY_REGEX_ORIGINAL_INPUT_ID
public static final Comparator<Object> DEFAULT_JSARRAY_COMPARATOR
public static final Comparator<Object> DEFAULT_JSARRAY_INTEGER_COMPARATOR
public static final Comparator<Object> DEFAULT_JSARRAY_DOUBLE_COMPARATOR
public static ScriptArray arrayGetArrayType(JSDynamicObject thisObj)
public static long arrayGetLength(JSDynamicObject thisObj)
public static int arrayGetUsedLength(JSDynamicObject thisObj)
public static long arrayGetIndexOffset(JSDynamicObject thisObj)
public static int arrayGetArrayOffset(JSDynamicObject thisObj)
public static void arraySetArrayType(JSDynamicObject thisObj, ScriptArray arrayType)
public static void arraySetLength(JSDynamicObject thisObj, int length)
public static void arraySetLength(JSDynamicObject thisObj, long length)
public static void arraySetUsedLength(JSDynamicObject thisObj, int usedLength)
public static void arraySetIndexOffset(JSDynamicObject thisObj, long indexOffset)
public static void arraySetArrayOffset(JSDynamicObject thisObj, int arrayOffset)
public static Object arrayGetArray(JSDynamicObject thisObj)
public static void arraySetArray(JSDynamicObject thisObj, Object array)
public static int arrayGetHoleCount(JSDynamicObject thisObj)
public static void arraySetHoleCount(JSDynamicObject thisObj, int holeCount)
public static ArrayAllocationSite arrayGetAllocationSite(JSDynamicObject thisObj)
public static Object arrayGetRegexResult(JSDynamicObject thisObj, com.oracle.truffle.api.object.DynamicObjectLibrary lazyRegexResult)
public static com.oracle.truffle.api.strings.TruffleString arrayGetRegexResultOriginalInput(JSDynamicObject thisObj, com.oracle.truffle.api.object.DynamicObjectLibrary lazyRegexResultOriginalInput)
protected static final ArrayAccess arrayAccess()
public long getLength(JSDynamicObject thisObj)
public boolean setLength(JSDynamicObject thisObj, long length, boolean doThrow)
public com.oracle.truffle.api.strings.TruffleString getBuiltinToStringTag(JSDynamicObject object)
JSClassgetBuiltinToStringTag in class JSNonProxyobject - object to be usedJSClass.defaultToString(JSDynamicObject)public final Object getOwnHelper(JSDynamicObject store, Object thisObj, Object key, com.oracle.truffle.api.nodes.Node encapsulatingNode)
JSNonProxynull if value is not present instead of undefined.getOwnHelper in class JSNonProxypublic final boolean set(JSDynamicObject thisObj, Object key, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode)
JSClassset in class JSNonProxypublic boolean set(JSDynamicObject thisObj, long index, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode)
set in class JSNonProxypublic boolean delete(JSDynamicObject thisObj, long index, boolean isStrict)
delete in class JSNonProxypublic Object getOwnHelper(JSDynamicObject store, Object thisObj, long index, com.oracle.truffle.api.nodes.Node encapsulatingNode)
JSNonProxynull if value is not present instead of undefined.getOwnHelper in class JSNonProxypublic static Object[] toArray(JSDynamicObject thisObj)
public final boolean hasOwnProperty(JSDynamicObject thisObj, Object key)
hasOwnProperty in class JSNonProxypublic final boolean hasOwnProperty(JSDynamicObject thisObj, long index)
hasOwnProperty in class JSNonProxypublic List<Object> getOwnPropertyKeys(JSDynamicObject thisObj, boolean strings, boolean symbols)
JSClassgetOwnPropertyKeys in class JSNonProxyprotected static List<Object> ownPropertyKeysFastArray(JSDynamicObject thisObj, boolean strings, boolean symbols)
protected static List<Object> ownPropertyKeysSlowArray(JSDynamicObject thisObj, boolean strings, boolean symbols)
public static long toArrayLengthOrRangeError(Object obj, com.oracle.truffle.api.nodes.Node originatingNode)
public static long toArrayLengthOrRangeError(Number len, Number len32, com.oracle.truffle.api.nodes.Node originatingNode)
public boolean defineOwnProperty(JSDynamicObject thisObj, Object key, PropertyDescriptor descriptor, boolean doThrow)
JSClassdefineOwnProperty in class JSNonProxyprotected boolean defineOwnPropertyIndex(JSDynamicObject thisObj, com.oracle.truffle.api.strings.TruffleString name, PropertyDescriptor descriptor, boolean doThrow)
protected JSDynamicObject makeSlowArray(JSDynamicObject thisObj)
public boolean testIntegrityLevel(JSDynamicObject thisObj, boolean frozen)
JSNonProxytestIntegrityLevel in class JSNonProxypublic boolean setIntegrityLevel(JSDynamicObject thisObj, boolean freeze, boolean doThrow)
JSClasssetIntegrityLevel in class JSNonProxypublic final boolean preventExtensions(JSDynamicObject thisObj, boolean doThrow)
JSClasspreventExtensions in class JSNonProxypublic boolean delete(JSDynamicObject thisObj, Object key, boolean isStrict)
JSClassdelete in class JSNonProxypublic PropertyDescriptor getOwnProperty(JSDynamicObject thisObj, Object key)
JSClassgetOwnProperty in class JSNonProxypublic static PropertyDescriptor ordinaryGetOwnPropertyArray(JSDynamicObject thisObj, Object key)
public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(JSDynamicObject obj, boolean allowSideEffects, ToDisplayStringFormat format, int depth)
JSClasstoDisplayStringImpl in class JSNonProxyformat - formatting parametersdepth - current nesting depthprotected boolean isSlowArray(JSDynamicObject thisObj)
public boolean usesOrdinaryGetOwnProperty()
usesOrdinaryGetOwnProperty in class JSNonProxy