public abstract class AbstractIntArray extends AbstractWritableArray
AbstractWritableArray.SetSupportedProfileAccessDynamicArray.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 |
AbstractIntArray(int integrityLevel,
DynamicArray.DynamicArrayCache cache) |
| Modifier and Type | Method and Description |
|---|---|
Object |
allocateArray(int length) |
Object |
cloneArray(JSDynamicObject object) |
protected static boolean |
containsHoleValue(JSDynamicObject object) |
protected static Object[] |
convertToObject(JSDynamicObject object) |
ScriptArray |
deleteElementImpl(JSDynamicObject object,
long index,
boolean strict) |
protected static int[] |
getArray(JSDynamicObject object) |
protected int |
getArrayCapacity(JSDynamicObject object) |
Object |
getInBoundsFast(JSDynamicObject object,
int index) |
abstract int |
getInBoundsFastInt(JSDynamicObject object,
int index) |
protected boolean |
isHolePrepared(JSDynamicObject object,
int preparedIndex)
Returns true when the array contains a hole at that index.
|
protected void |
moveRangePrepared(JSDynamicObject object,
int src,
int dst,
int len)
Move
len elements from src to dst. |
protected void |
resizeArray(JSDynamicObject object,
int newCapacity,
int oldCapacity,
int offset) |
ScriptArray |
setElementImpl(JSDynamicObject object,
long index,
Object value,
boolean strict) |
protected void |
setHoleValue(JSDynamicObject object,
int preparedIndex) |
void |
setInBounds(JSDynamicObject object,
int index,
int value,
com.oracle.truffle.api.nodes.Node node,
AbstractWritableArray.SetSupportedProfileAccess profile) |
abstract void |
setInBoundsFast(JSDynamicObject object,
int index,
int value) |
void |
setSupported(JSDynamicObject object,
int index,
int value,
com.oracle.truffle.api.nodes.Node node,
AbstractWritableArray.SetSupportedProfileAccess profile) |
abstract AbstractWritableArray |
toHoles(JSDynamicObject object,
long index,
Object value) |
protected abstract HolesObjectArray |
toObjectHoles(JSDynamicObject object) |
protected abstract AbstractIntArray |
withIntegrityLevel(int newIntegrityLevel) |
assertHoleCount, checkFillHoles, clearUnusedArea, containsHoles, countHoles, deleteElementHoles, fillHoles, getArrayOffset, getElement, getElementInBounds, getInBoundsFastDouble, getIndexOffset, getUsedLength, hasElement, incrementHolesCount, isInBounds, isInBoundsFast, isSparse, isSupported, isSupportedContiguous, isSupportedHoles, isSupportedZeroBased, length, lengthInt, nextElementIndex, nextElementIndexHoles, nextElementIndexZeroBased, prepareInBounds, prepareInBoundsContiguous, prepareInBoundsFast, prepareInBoundsHoles, prepareInBoundsZeroBased, prepareSupported, prepareSupportedContiguous, prepareSupportedHoles, prepareSupportedZeroBased, previousElementIndex, previousElementIndexHoles, removeRangeContiguous, removeRangeHoles, setArrayOffset, setArrayProperties, setArrayProperties, setIndexOffset, setLengthImpl, setLengthLess, setLengthLessContiguous, setLengthLessZeroBased, shiftRangeImpl, toContiguous, toDouble, toNonContiguous, toNonHoles, toObject, toSparse, traceWriteValue, unusedElementsAreHolescreateCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, maybePreinitializeCache, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toStringaddRange, addRangeImpl, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, deleteElement, firstElementIndex, hasHoles, isHolesType, isInstance, lastElementIndex, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, removeRangeImpl, setElement, setLength, setLength, shiftRange, toArray, toString, traceArrayTransition, traceWrite, valueIsByteprotected AbstractIntArray(int integrityLevel,
DynamicArray.DynamicArrayCache cache)
public final ScriptArray setElementImpl(JSDynamicObject object, long index, Object value, boolean strict)
setElementImpl in class ScriptArraypublic Object getInBoundsFast(JSDynamicObject object, int index)
getInBoundsFast in class AbstractWritableArrayprotected static int[] getArray(JSDynamicObject object)
public abstract int getInBoundsFastInt(JSDynamicObject object, int index)
getInBoundsFastInt in class AbstractWritableArraypublic abstract void setInBoundsFast(JSDynamicObject object, int index, int value)
public final void setInBounds(JSDynamicObject object, int index, int value, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile)
public final void setSupported(JSDynamicObject object, int index, int value, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile)
protected final void setHoleValue(JSDynamicObject object, int preparedIndex)
setHoleValue in class AbstractWritableArrayprotected final boolean isHolePrepared(JSDynamicObject object, int preparedIndex)
AbstractWritableArrayisHolePrepared in class AbstractWritableArrayprotected final int getArrayCapacity(JSDynamicObject object)
getArrayCapacity in class AbstractWritableArrayprotected final void resizeArray(JSDynamicObject object, int newCapacity, int oldCapacity, int offset)
resizeArray in class AbstractWritableArraypublic abstract AbstractWritableArray toHoles(JSDynamicObject object, long index, Object value)
toHoles in class AbstractWritableArraypublic ScriptArray deleteElementImpl(JSDynamicObject object, long index, boolean strict)
deleteElementImpl in class ScriptArrayprotected abstract HolesObjectArray toObjectHoles(JSDynamicObject object)
protected static Object[] convertToObject(JSDynamicObject object)
protected static boolean containsHoleValue(JSDynamicObject object)
protected final void moveRangePrepared(JSDynamicObject object, int src, int dst, int len)
AbstractWritableArraylen elements from src to dst.moveRangePrepared in class AbstractWritableArraypublic final Object allocateArray(int length)
allocateArray in class AbstractWritableArraypublic Object cloneArray(JSDynamicObject object)
cloneArray in class DynamicArrayprotected abstract AbstractIntArray withIntegrityLevel(int newIntegrityLevel)
withIntegrityLevel in class AbstractWritableArray