Class AbstractContiguousObjectArray
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.AbstractObjectArray
com.oracle.truffle.js.runtime.array.dyn.AbstractContiguousObjectArray
- Direct Known Subclasses:
ContiguousObjectArray,HolesObjectArray
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractWritableArray
AbstractWritableArray.SetSupportedProfileAccessNested classes/interfaces inherited from class com.oracle.truffle.js.runtime.array.DynamicArray
DynamicArray.DynamicArrayCacheNested classes/interfaces inherited from class com.oracle.truffle.js.runtime.array.ScriptArray
ScriptArray.CreateWritableProfileAccess, ScriptArray.DefaultIterator, ScriptArray.SetLengthProfileAccess -
Field Summary
Fields inherited from class com.oracle.truffle.js.runtime.array.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 com.oracle.truffle.js.runtime.array.ScriptArray
EMPTY_OBJECT_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractContiguousObjectArray(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.getInBoundsFastObject(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, Object 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 com.oracle.truffle.js.runtime.array.dyn.AbstractObjectArray
allocateArray, castNonNull, checkNonNull, cloneArray, deleteElementImpl, fillHoles, getArray, getArrayCapacity, getInBoundsFast, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupported, toDouble, toHoles, toObject, withIntegrityLevelMethods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractWritableArray
assertHoleCount, checkFillHoles, clearUnusedArea, containsHoles, countHoles, deleteElementHoles, getElement, getElementInBounds, getInBoundsFastDouble, getInBoundsFastInt, 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, toNonContiguous, toNonHoles, toSparse, traceWriteValue, unusedElementsAreHolesMethods inherited from class com.oracle.truffle.js.runtime.array.DynamicArray
createCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, maybePreinitializeCache, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toStringMethods inherited from class com.oracle.truffle.js.runtime.array.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
-
AbstractContiguousObjectArray
-
-
Method Details
-
getInBoundsFastObject
- Specified by:
getInBoundsFastObjectin classAbstractObjectArray
-
setInBoundsFast
- Specified by:
setInBoundsFastin classAbstractObjectArray
-
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
-