Class DynamicArray
java.lang.Object
com.oracle.truffle.js.runtime.array.ScriptArray
com.oracle.truffle.js.runtime.array.DynamicArray
- Direct Known Subclasses:
AbstractConstantArray, AbstractWritableArray, SparseArray
Common base class for all dynamic (i.e., non-typed) JavaScript arrays. Encapsulates information
about whether the array is non-extensible, sealed, frozen, and whether its length is writable.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ScriptArray
ScriptArray.CreateWritableProfileAccess, ScriptArray.DefaultIterator, ScriptArray.SetLengthProfileAccess -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DynamicArray.DynamicArrayCacheprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected final intprotected static final intprotected static final intFields inherited from class ScriptArray
EMPTY_OBJECT_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDynamicArray(int integrityLevel, DynamicArray.DynamicArrayCache cache) -
Method Summary
Modifier and TypeMethodDescriptionabstract ObjectcloneArray(JSDynamicObject object) protected static DynamicArray.DynamicArrayCachefreeze()booleanbooleanisFrozen()booleanbooleanisSealed()protected final <T extends ScriptArray>
Tseal()protected final <T extends ScriptArray>
TsetIntegrityLevel(int integrityLevel) toString()protected abstract DynamicArraywithIntegrityLevel(int newIntegrityLevel) Methods inherited from class ScriptArray
addRange, addRangeImpl, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, deleteElement, deleteElementImpl, firstElementIndex, getElement, getElementInBounds, hasElement, hasHoles, hasHolesOrUnused, isHolesType, isInBoundsFast, isInstance, lastElementIndex, length, lengthInt, makeMultiRangeList, makeRangeList, nextElementIndex, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, previousElementIndex, removeRange, removeRange, removeRangeImpl, setElement, setElementImpl, setLength, setLength, setLengthImpl, shiftRange, shiftRangeImpl, toArray, traceArrayTransition, traceWrite, valueIsByte
-
Field Details
-
INTEGRITY_LEVEL_NONE
protected static final int INTEGRITY_LEVEL_NONE- See Also:
-
INTEGRITY_LEVEL_NONE_LENGTH_READONLY
protected static final int INTEGRITY_LEVEL_NONE_LENGTH_READONLY- See Also:
-
INTEGRITY_LEVEL_NOT_EXTENSIBLE
protected static final int INTEGRITY_LEVEL_NOT_EXTENSIBLE- See Also:
-
INTEGRITY_LEVEL_NOT_EXTENSIBLE_LENGTH_READONLY
protected static final int INTEGRITY_LEVEL_NOT_EXTENSIBLE_LENGTH_READONLY- See Also:
-
INTEGRITY_LEVEL_SEALED
protected static final int INTEGRITY_LEVEL_SEALED- See Also:
-
INTEGRITY_LEVEL_SEALED_LENGTH_READONLY
protected static final int INTEGRITY_LEVEL_SEALED_LENGTH_READONLY- See Also:
-
INTEGRITY_LEVEL_FROZEN
protected static final int INTEGRITY_LEVEL_FROZEN- See Also:
-
INTEGRITY_LEVEL_FROZEN_LENGTH_READONLY
protected static final int INTEGRITY_LEVEL_FROZEN_LENGTH_READONLY- See Also:
-
INTEGRITY_LEVELS
protected static final int INTEGRITY_LEVELS- See Also:
-
INTEGRITY_LEVEL_MASK
protected static final int INTEGRITY_LEVEL_MASK- See Also:
-
LENGTH_WRITABLE_MASK
protected static final int LENGTH_WRITABLE_MASK- See Also:
-
LENGTH_NOT_WRITABLE
protected static final int LENGTH_NOT_WRITABLE- See Also:
-
integrityLevel
protected final int integrityLevel -
cache
-
-
Constructor Details
-
DynamicArray
-
-
Method Details
-
maybePreinitializeCache
-
createCache
-
withIntegrityLevel
-
setIntegrityLevel
-
isSealed
public boolean isSealed()- Overrides:
isSealedin classScriptArray
-
isFrozen
public boolean isFrozen()- Overrides:
isFrozenin classScriptArray
-
isExtensible
public boolean isExtensible()- Overrides:
isExtensiblein classScriptArray
-
isLengthNotWritable
public boolean isLengthNotWritable()- Overrides:
isLengthNotWritablein classScriptArray
-
seal
- Specified by:
sealin classScriptArray
-
freeze
- Specified by:
freezein classScriptArray
-
preventExtensions
- Specified by:
preventExtensionsin classScriptArray
-
setLengthNotWritable
- Specified by:
setLengthNotWritablein classScriptArray
-
cloneArray
-
toString
-