public abstract class AbstractConstantArray extends DynamicArray
DynamicArray.DynamicArrayCacheScriptArray.CreateWritableProfileAccess, ScriptArray.DefaultIterator, ScriptArray.SetLengthProfileAccesscache, INTEGRITY_LEVEL_FROZEN, INTEGRITY_LEVEL_FROZEN_LENGTH_READONLY, INTEGRITY_LEVEL_MASK, INTEGRITY_LEVEL_NONE, INTEGRITY_LEVEL_NONE_LENGTH_READONLY, INTEGRITY_LEVEL_NOT_EXTENSIBLE, INTEGRITY_LEVEL_NOT_EXTENSIBLE_LENGTH_READONLY, INTEGRITY_LEVEL_SEALED, INTEGRITY_LEVEL_SEALED_LENGTH_READONLY, INTEGRITY_LEVELS, integrityLevel, LENGTH_NOT_WRITABLE, LENGTH_WRITABLE_MASKEMPTY_OBJECT_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConstantArray(int integrityLevel,
DynamicArray.DynamicArrayCache cache) |
| Modifier and Type | Method and Description |
|---|---|
abstract AbstractWritableArray |
createWriteableDouble(JSDynamicObject object,
long index,
double value,
com.oracle.truffle.api.nodes.Node node,
ScriptArray.CreateWritableProfileAccess profile) |
abstract AbstractWritableArray |
createWriteableInt(JSDynamicObject object,
long index,
int value,
com.oracle.truffle.api.nodes.Node node,
ScriptArray.CreateWritableProfileAccess profile) |
abstract AbstractWritableArray |
createWriteableJSObject(JSDynamicObject object,
long index,
JSDynamicObject value,
com.oracle.truffle.api.nodes.Node node,
ScriptArray.CreateWritableProfileAccess profile) |
abstract AbstractWritableArray |
createWriteableObject(JSDynamicObject object,
long index,
Object value,
com.oracle.truffle.api.nodes.Node node,
ScriptArray.CreateWritableProfileAccess profile) |
long |
firstElementIndex(JSDynamicObject object)
First element index (inclusive).
|
Object |
getElement(JSDynamicObject object,
long index) |
abstract Object |
getElementInBounds(JSDynamicObject object,
int index) |
Object |
getElementInBounds(JSDynamicObject object,
long index) |
boolean |
hasHoles(JSDynamicObject object) |
boolean |
isInBoundsFast(JSDynamicObject object,
long index)
Returns true if the index can be written using inBoundsFast access mode.
|
long |
lastElementIndex(JSDynamicObject object)
Last element index (inclusive).
|
long |
length(JSDynamicObject object) |
long |
nextElementIndex(JSDynamicObject object,
long index)
Returns the next index.
|
long |
previousElementIndex(JSDynamicObject object,
long index)
Returns the previous index.
|
ScriptArray |
setElementImpl(JSDynamicObject object,
long index,
Object value,
boolean strict) |
cloneArray, createCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, maybePreinitializeCache, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toString, withIntegrityLeveladdRange, addRangeImpl, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, deleteElement, deleteElementImpl, hasElement, isHolesType, isInstance, lengthInt, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, removeRangeImpl, setElement, setLength, setLength, setLengthImpl, shiftRange, shiftRangeImpl, toArray, toString, traceArrayTransition, traceWrite, valueIsByteprotected AbstractConstantArray(int integrityLevel,
DynamicArray.DynamicArrayCache cache)
public final ScriptArray setElementImpl(JSDynamicObject object, long index, Object value, boolean strict)
setElementImpl in class ScriptArraypublic final Object getElement(JSDynamicObject object, long index)
getElement in class ScriptArraypublic final Object getElementInBounds(JSDynamicObject object, long index)
getElementInBounds in class ScriptArraypublic abstract Object getElementInBounds(JSDynamicObject object, int index)
public final long length(JSDynamicObject object)
length in class ScriptArraypublic long firstElementIndex(JSDynamicObject object)
ScriptArrayfirstElementIndex in class ScriptArraypublic long lastElementIndex(JSDynamicObject object)
ScriptArraylastElementIndex in class ScriptArraypublic long nextElementIndex(JSDynamicObject object, long index)
ScriptArraynextElementIndex in class ScriptArraypublic long previousElementIndex(JSDynamicObject object, long index)
ScriptArraypreviousElementIndex in class ScriptArraypublic final boolean isInBoundsFast(JSDynamicObject object, long index)
isInBoundsFast in class ScriptArraypublic abstract AbstractWritableArray createWriteableDouble(JSDynamicObject object, long index, double value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile)
public abstract AbstractWritableArray createWriteableInt(JSDynamicObject object, long index, int value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile)
public abstract AbstractWritableArray createWriteableObject(JSDynamicObject object, long index, Object value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile)
public abstract AbstractWritableArray createWriteableJSObject(JSDynamicObject object, long index, JSDynamicObject value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile)
public boolean hasHoles(JSDynamicObject object)
hasHoles in class ScriptArray