public abstract class AbstractConstantArray extends DynamicArray
Modifier and Type | Class and Description |
---|---|
protected static interface |
AbstractConstantArray.CreateWritableProfileAccess |
DynamicArray.DynamicArrayCache
ScriptArray.DefaultIterator, ScriptArray.ProfileAccess, ScriptArray.ProfileHolder, ScriptArray.SetLengthProfileAccess
Modifier and Type | Field and Description |
---|---|
protected static AbstractConstantArray.CreateWritableProfileAccess |
CREATE_WRITABLE_PROFILE |
cache, 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_MASK
EMPTY_OBJECT_ARRAY, SET_LENGTH_PROFILE
Modifier | Constructor and Description |
---|---|
protected |
AbstractConstantArray(int integrityLevel,
DynamicArray.DynamicArrayCache cache) |
Modifier and Type | Method and Description |
---|---|
static ScriptArray.ProfileHolder |
createCreateWritableProfile() |
abstract AbstractWritableArray |
createWriteableDouble(com.oracle.truffle.api.object.DynamicObject object,
long index,
double value,
ScriptArray.ProfileHolder profile) |
abstract AbstractWritableArray |
createWriteableInt(com.oracle.truffle.api.object.DynamicObject object,
long index,
int value,
ScriptArray.ProfileHolder profile) |
abstract AbstractWritableArray |
createWriteableJSObject(com.oracle.truffle.api.object.DynamicObject object,
long index,
JSDynamicObject value,
ScriptArray.ProfileHolder profile) |
abstract AbstractWritableArray |
createWriteableObject(com.oracle.truffle.api.object.DynamicObject object,
long index,
Object value,
ScriptArray.ProfileHolder profile) |
long |
firstElementIndex(com.oracle.truffle.api.object.DynamicObject object)
First element index (inclusive).
|
Object |
getElement(com.oracle.truffle.api.object.DynamicObject object,
long index) |
abstract Object |
getElementInBounds(com.oracle.truffle.api.object.DynamicObject object,
int index) |
Object |
getElementInBounds(com.oracle.truffle.api.object.DynamicObject object,
long index) |
boolean |
hasHoles(com.oracle.truffle.api.object.DynamicObject object) |
boolean |
isInBoundsFast(com.oracle.truffle.api.object.DynamicObject object,
long index)
Returns true if the index can be written using inBoundsFast access mode.
|
long |
lastElementIndex(com.oracle.truffle.api.object.DynamicObject object)
Last element index (inclusive).
|
long |
length(com.oracle.truffle.api.object.DynamicObject object) |
long |
nextElementIndex(com.oracle.truffle.api.object.DynamicObject object,
long index)
Returns the next index.
|
long |
previousElementIndex(com.oracle.truffle.api.object.DynamicObject object,
long index)
Returns the previous index.
|
ScriptArray |
setElementImpl(com.oracle.truffle.api.object.DynamicObject object,
long index,
Object value,
boolean strict) |
array, cloneArray, createCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toString, withIntegrityLevel
addRange, addRangeImpl, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, createSetLengthProfile, 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, valueIsByte
protected static final AbstractConstantArray.CreateWritableProfileAccess CREATE_WRITABLE_PROFILE
protected AbstractConstantArray(int integrityLevel, DynamicArray.DynamicArrayCache cache)
public final ScriptArray setElementImpl(com.oracle.truffle.api.object.DynamicObject object, long index, Object value, boolean strict)
setElementImpl
in class ScriptArray
public final Object getElement(com.oracle.truffle.api.object.DynamicObject object, long index)
getElement
in class ScriptArray
public final Object getElementInBounds(com.oracle.truffle.api.object.DynamicObject object, long index)
getElementInBounds
in class ScriptArray
public abstract Object getElementInBounds(com.oracle.truffle.api.object.DynamicObject object, int index)
public final long length(com.oracle.truffle.api.object.DynamicObject object)
length
in class ScriptArray
public long firstElementIndex(com.oracle.truffle.api.object.DynamicObject object)
ScriptArray
firstElementIndex
in class ScriptArray
public long lastElementIndex(com.oracle.truffle.api.object.DynamicObject object)
ScriptArray
lastElementIndex
in class ScriptArray
public long nextElementIndex(com.oracle.truffle.api.object.DynamicObject object, long index)
ScriptArray
nextElementIndex
in class ScriptArray
public long previousElementIndex(com.oracle.truffle.api.object.DynamicObject object, long index)
ScriptArray
previousElementIndex
in class ScriptArray
public final boolean isInBoundsFast(com.oracle.truffle.api.object.DynamicObject object, long index)
isInBoundsFast
in class ScriptArray
public abstract AbstractWritableArray createWriteableDouble(com.oracle.truffle.api.object.DynamicObject object, long index, double value, ScriptArray.ProfileHolder profile)
public abstract AbstractWritableArray createWriteableInt(com.oracle.truffle.api.object.DynamicObject object, long index, int value, ScriptArray.ProfileHolder profile)
public abstract AbstractWritableArray createWriteableObject(com.oracle.truffle.api.object.DynamicObject object, long index, Object value, ScriptArray.ProfileHolder profile)
public abstract AbstractWritableArray createWriteableJSObject(com.oracle.truffle.api.object.DynamicObject object, long index, JSDynamicObject value, ScriptArray.ProfileHolder profile)
public static ScriptArray.ProfileHolder createCreateWritableProfile()
public boolean hasHoles(com.oracle.truffle.api.object.DynamicObject object)
hasHoles
in class ScriptArray