Class AbstractContiguousIntArray
java.lang.Object
com.oracle.truffle.js.runtime.array.ScriptArray
com.oracle.truffle.js.runtime.array.DynamicArray
com.oracle.truffle.js.runtime.array.dyn.AbstractWritableArray
com.oracle.truffle.js.runtime.array.dyn.AbstractIntArray
com.oracle.truffle.js.runtime.array.dyn.AbstractContiguousIntArray
- Direct Known Subclasses:
ContiguousIntArray, HolesIntArray
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractWritableArray
AbstractWritableArray.SetSupportedProfileAccessNested classes/interfaces inherited from class DynamicArray
DynamicArray.DynamicArrayCacheNested classes/interfaces inherited from class ScriptArray
ScriptArray.CreateWritableProfileAccess, ScriptArray.DefaultIterator, ScriptArray.SetLengthProfileAccess -
Field Summary
Fields inherited from class DynamicArray
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_MASKFields inherited from class ScriptArray
EMPTY_OBJECT_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractContiguousIntArray(int integrityLevel, DynamicArray.DynamicArrayCache cache) -
Method Summary
Modifier and TypeMethodDescriptionaddRangeImpl(JSDynamicObject object, long offset, int size) This method grows the array by adding more elements of a given size.final longfirstElementIndex(JSDynamicObject object) First element index (inclusive).protected final intgetArrayOffset(JSDynamicObject object) The arrayOffset (int) is the first element in internal array.intgetInBoundsFastInt(JSDynamicObject object, int index) protected final longgetIndexOffset(JSDynamicObject object) The indexOffset (int) is the first element is in array[indexOffset + arrayOffset].final longlastElementIndex(JSDynamicObject object) Last element index (inclusive).protected final intprepareInBoundsFast(JSDynamicObject object, long index) protected final voidsetArrayOffset(JSDynamicObject object, int arrayOffset) voidsetInBoundsFast(JSDynamicObject object, int index, int value) protected final voidsetIndexOffset(JSDynamicObject object, long indexOffset) protected final voidsetLengthLess(JSDynamicObject object, long length, com.oracle.truffle.api.nodes.Node node, ScriptArray.SetLengthProfileAccess profile) Methods inherited from class AbstractIntArray
allocateArray, cloneArray, containsHoleValue, convertToObject, deleteElementImpl, getArray, getArrayCapacity, getInBoundsFast, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupported, toHoles, toObjectHoles, withIntegrityLevelMethods inherited from class AbstractWritableArray
assertHoleCount, checkFillHoles, clearUnusedArea, containsHoles, countHoles, deleteElementHoles, fillHoles, getElement, getElementInBounds, getInBoundsFastDouble, getUsedLength, hasElement, hasHoles, hasHolesOrUnused, incrementHolesCount, isInBounds, isInBoundsFast, isSparse, isSupported, isSupportedContiguous, isSupportedHoles, isSupportedZeroBased, length, lengthInt, nextElementIndex, nextElementIndexHoles, nextElementIndexZeroBased, prepareInBounds, prepareInBoundsContiguous, prepareInBoundsHoles, prepareInBoundsZeroBased, prepareSupported, prepareSupportedContiguous, prepareSupportedHoles, prepareSupportedZeroBased, previousElementIndex, previousElementIndexHoles, removeRangeContiguous, removeRangeHoles, setArrayProperties, setArrayProperties, setLengthImpl, setLengthLessContiguous, setLengthLessZeroBased, shiftRangeImpl, toContiguous, toDouble, toNonContiguous, toNonHoles, toObject, toSparse, traceWriteValue, unusedElementsAreHolesMethods inherited from class DynamicArray
createCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, maybePreinitializeCache, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toStringMethods inherited from class ScriptArray
addRange, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, deleteElement, isHolesType, isInstance, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, removeRangeImpl, setElement, setLength, setLength, shiftRange, toArray, traceArrayTransition, traceWrite, valueIsByte
-
Constructor Details
-
AbstractContiguousIntArray
-
-
Method Details
-
getInBoundsFastInt
- Specified by:
getInBoundsFastIntin classAbstractIntArray
-
setInBoundsFast
- Specified by:
setInBoundsFastin classAbstractIntArray
-
setLengthLess
protected final void setLengthLess(JSDynamicObject object, long length, com.oracle.truffle.api.nodes.Node node, ScriptArray.SetLengthProfileAccess profile) - Specified by:
setLengthLessin classAbstractWritableArray
-
prepareInBoundsFast
- Specified by:
prepareInBoundsFastin classAbstractWritableArray
-
setArrayOffset
- Overrides:
setArrayOffsetin classAbstractWritableArray
-
getArrayOffset
Description copied from class:AbstractWritableArrayThe arrayOffset (int) is the first element in internal array.- Overrides:
getArrayOffsetin classAbstractWritableArray
-
setIndexOffset
- Overrides:
setIndexOffsetin classAbstractWritableArray
-
getIndexOffset
Description copied from class:AbstractWritableArrayThe indexOffset (int) is the first element is in array[indexOffset + arrayOffset].- Overrides:
getIndexOffsetin classAbstractWritableArray
-
firstElementIndex
Description copied from class:ScriptArrayFirst element index (inclusive).- Specified by:
firstElementIndexin classScriptArray
-
lastElementIndex
Description copied from class:ScriptArrayLast element index (inclusive).- Specified by:
lastElementIndexin classScriptArray
-
addRangeImpl
Description copied from class:ScriptArrayThis method grows the array by adding more elements of a given size. An offset parameter can be used to specify where the new elements have to be added (starting from zero). The operation is equivalent to shifting (right) the whole array or its part as defined by the offset parameter.- Specified by:
addRangeImplin classScriptArray- Parameters:
offset- starting offset positionsize- size of the inserted empty array- Returns:
- a
ScriptArrayinstance with the new size
-