public final class ZeroBasedIntArray extends AbstractIntArray
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 and Type | Method and Description |
|---|---|
ScriptArray |
addRangeImpl(JSDynamicObject object,
long offset,
int size)
This method grows the array by adding more elements of a given size.
|
static ZeroBasedIntArray |
createZeroBasedIntArray() |
long |
firstElementIndex(JSDynamicObject object)
First element index (inclusive).
|
int |
getInBoundsFastInt(JSDynamicObject object,
int index) |
boolean |
hasHoles(JSDynamicObject object) |
boolean |
isSupported(JSDynamicObject object,
long index) |
long |
lastElementIndex(JSDynamicObject object)
Last element index (inclusive).
|
static ZeroBasedIntArray |
makeZeroBasedIntArray(JSDynamicObject object,
int length,
int usedLength,
int[] array,
int integrityLevel) |
long |
nextElementIndex(JSDynamicObject object,
long index)
Returns the next index.
|
protected int |
prepareInBounds(JSDynamicObject object,
int index,
com.oracle.truffle.api.nodes.Node node,
AbstractWritableArray.SetSupportedProfileAccess profile) |
protected int |
prepareInBoundsFast(JSDynamicObject object,
long index) |
protected int |
prepareSupported(JSDynamicObject object,
int index,
com.oracle.truffle.api.nodes.Node node,
AbstractWritableArray.SetSupportedProfileAccess profile) |
ScriptArray |
removeRangeImpl(JSDynamicObject object,
long start,
long end)
This function deletes all elements in the range from [start..end[.
|
void |
setInBoundsFast(JSDynamicObject object,
int index,
int value) |
protected void |
setLengthLess(JSDynamicObject object,
long length,
com.oracle.truffle.api.nodes.Node node,
ScriptArray.SetLengthProfileAccess profile) |
ScriptArray |
shiftRangeImpl(JSDynamicObject object,
long from)
This function shifts all elements in the range from [0..limit[.
|
ContiguousIntArray |
toContiguous(JSDynamicObject object,
long index,
Object value) |
ZeroBasedDoubleArray |
toDouble(JSDynamicObject object,
long index,
double value) |
AbstractWritableArray |
toHoles(JSDynamicObject object,
long index,
Object value) |
ZeroBasedObjectArray |
toObject(JSDynamicObject object,
long index,
Object value) |
protected HolesObjectArray |
toObjectHoles(JSDynamicObject object) |
protected ZeroBasedIntArray |
withIntegrityLevel(int newIntegrityLevel) |
allocateArray, cloneArray, containsHoleValue, convertToObject, deleteElementImpl, getArray, getArrayCapacity, getInBoundsFast, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupportedassertHoleCount, checkFillHoles, clearUnusedArea, containsHoles, countHoles, deleteElementHoles, fillHoles, getArrayOffset, getElement, getElementInBounds, getInBoundsFastDouble, getIndexOffset, getUsedLength, hasElement, incrementHolesCount, isInBounds, isInBoundsFast, isSparse, isSupportedContiguous, isSupportedHoles, isSupportedZeroBased, length, lengthInt, nextElementIndexHoles, nextElementIndexZeroBased, prepareInBoundsContiguous, prepareInBoundsHoles, prepareInBoundsZeroBased, prepareSupportedContiguous, prepareSupportedHoles, prepareSupportedZeroBased, previousElementIndex, previousElementIndexHoles, removeRangeContiguous, removeRangeHoles, setArrayOffset, setArrayProperties, setArrayProperties, setIndexOffset, setLengthImpl, setLengthLessContiguous, setLengthLessZeroBased, toNonContiguous, toNonHoles, toSparse, traceWriteValue, unusedElementsAreHolescreateCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, maybePreinitializeCache, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toStringaddRange, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, deleteElement, isHolesType, isInstance, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, setElement, setLength, setLength, shiftRange, toArray, toString, traceArrayTransition, traceWrite, valueIsBytepublic static ZeroBasedIntArray makeZeroBasedIntArray(JSDynamicObject object, int length, int usedLength, int[] array, int integrityLevel)
public static ZeroBasedIntArray createZeroBasedIntArray()
public boolean isSupported(JSDynamicObject object, long index)
isSupported in class AbstractWritableArraypublic int getInBoundsFastInt(JSDynamicObject object, int index)
getInBoundsFastInt in class AbstractIntArraypublic void setInBoundsFast(JSDynamicObject object, int index, int value)
setInBoundsFast in class AbstractIntArrayprotected int prepareInBoundsFast(JSDynamicObject object, long index)
prepareInBoundsFast in class AbstractWritableArrayprotected int prepareInBounds(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile)
prepareInBounds in class AbstractWritableArrayprotected int prepareSupported(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile)
prepareSupported in class AbstractWritableArrayprotected void setLengthLess(JSDynamicObject object, long length, com.oracle.truffle.api.nodes.Node node, ScriptArray.SetLengthProfileAccess profile)
setLengthLess in class AbstractWritableArraypublic ZeroBasedDoubleArray toDouble(JSDynamicObject object, long index, double value)
toDouble in class AbstractWritableArraypublic ZeroBasedObjectArray toObject(JSDynamicObject object, long index, Object value)
toObject in class AbstractWritableArraypublic ContiguousIntArray toContiguous(JSDynamicObject object, long index, Object value)
toContiguous in class AbstractWritableArraypublic AbstractWritableArray toHoles(JSDynamicObject object, long index, Object value)
toHoles in class AbstractIntArrayprotected HolesObjectArray toObjectHoles(JSDynamicObject object)
toObjectHoles in class AbstractIntArraypublic long firstElementIndex(JSDynamicObject object)
ScriptArrayfirstElementIndex in class ScriptArraypublic long lastElementIndex(JSDynamicObject object)
ScriptArraylastElementIndex in class ScriptArraypublic ScriptArray removeRangeImpl(JSDynamicObject object, long start, long end)
ScriptArrayremoveRangeImpl in class ScriptArraypublic ScriptArray shiftRangeImpl(JSDynamicObject object, long from)
ScriptArrayshiftRangeImpl in class AbstractWritableArraypublic ScriptArray addRangeImpl(JSDynamicObject object, long offset, int size)
ScriptArrayaddRangeImpl in class ScriptArrayoffset - starting offset positionsize - size of the inserted empty arrayScriptArray instance with the new sizepublic boolean hasHoles(JSDynamicObject object)
hasHoles in class ScriptArrayprotected ZeroBasedIntArray withIntegrityLevel(int newIntegrityLevel)
withIntegrityLevel in class AbstractIntArraypublic long nextElementIndex(JSDynamicObject object, long index)
ScriptArraynextElementIndex in class AbstractWritableArray