public final class ZeroBasedJSObjectArray extends AbstractJSObjectArray
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 ZeroBasedJSObjectArray |
createZeroBasedJSObjectArray() |
long |
firstElementIndex(JSDynamicObject object)
First element index (inclusive).
|
JSDynamicObject |
getInBoundsFastJSObject(JSDynamicObject object,
int index) |
boolean |
hasHoles(JSDynamicObject object) |
boolean |
isSupported(JSDynamicObject object,
long index) |
long |
lastElementIndex(JSDynamicObject object)
Last element index (inclusive).
|
static <T> ZeroBasedJSObjectArray |
makeZeroBasedJSObjectArray(JSDynamicObject object,
int length,
int usedLength,
T[] 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,
JSDynamicObject 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[.
|
ContiguousJSObjectArray |
toContiguous(JSDynamicObject object,
long index,
Object value) |
HolesJSObjectArray |
toHoles(JSDynamicObject object,
long index,
Object value) |
ZeroBasedObjectArray |
toObject(JSDynamicObject object,
long index,
Object value) |
protected ZeroBasedJSObjectArray |
withIntegrityLevel(int newIntegrityLevel) |
allocateArray, castNonNull, checkNonNull, cloneArray, deleteElementImpl, fillHoles, getArray, getArrayCapacity, getInBoundsFast, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupported, toDoubleassertHoleCount, checkFillHoles, clearUnusedArea, containsHoles, countHoles, deleteElementHoles, getArrayOffset, getElement, getElementInBounds, getInBoundsFastDouble, getInBoundsFastInt, 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 <T> ZeroBasedJSObjectArray makeZeroBasedJSObjectArray(JSDynamicObject object, int length, int usedLength, T[] array, int integrityLevel)
public static ZeroBasedJSObjectArray createZeroBasedJSObjectArray()
public boolean isSupported(JSDynamicObject object, long index)
isSupported in class AbstractWritableArraypublic JSDynamicObject getInBoundsFastJSObject(JSDynamicObject object, int index)
getInBoundsFastJSObject in class AbstractJSObjectArraypublic void setInBoundsFast(JSDynamicObject object, int index, JSDynamicObject value)
setInBoundsFast in class AbstractJSObjectArrayprotected 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 ContiguousJSObjectArray toContiguous(JSDynamicObject object, long index, Object value)
toContiguous in class AbstractWritableArraypublic HolesJSObjectArray toHoles(JSDynamicObject object, long index, Object value)
toHoles in class AbstractJSObjectArraypublic ZeroBasedObjectArray toObject(JSDynamicObject object, long index, Object value)
toObject in class AbstractJSObjectArraypublic 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 ZeroBasedJSObjectArray withIntegrityLevel(int newIntegrityLevel)
withIntegrityLevel in class AbstractJSObjectArraypublic long nextElementIndex(JSDynamicObject object, long index)
ScriptArraynextElementIndex in class AbstractWritableArray