Class 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
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsHoles(JSDynamicObject object, long index) deleteElementImpl(JSDynamicObject object, long index, boolean strict) getInBoundsFast(JSDynamicObject object, int index) booleanhasElement(JSDynamicObject object, long index) booleanhasHoles(JSDynamicObject object) Returns true when this array actually has holes betweenScriptArray.firstElementIndex(JSDynamicObject)andScriptArray.lastElementIndex(JSDynamicObject).booleanisHoleFast(JSDynamicObject object, int index) booleanReturns true if this array type could have hole values in it.static booleanisHoleValue(int value) booleanisSupported(JSDynamicObject object, long index) static HolesIntArraymakeHolesIntArray(JSDynamicObject object, int length, int[] array, long indexOffset, int arrayOffset, int usedLength, int holeCount, int integrityLevel) longnextElementIndex(JSDynamicObject object, long index0) Returns the next index.ownPropertyKeys(JSDynamicObject object) intprepareInBounds(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile) intprepareSupported(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile) longpreviousElementIndex(JSDynamicObject object, long index0) Returns the previous index.removeRangeImpl(JSDynamicObject object, long start, long end) This function deletes all elements in the range from [start..end[.voidsetInBoundsFast(JSDynamicObject object, int index, int value) voidsetInBoundsFastHole(JSDynamicObject object, int index, int value) voidsetInBoundsFastNonHole(JSDynamicObject object, int index, int value) toDouble(JSDynamicObject object, long index, double value) toHoles(JSDynamicObject object, long index, Object value) toNonHoles(JSDynamicObject object, long index, Object value) toObject(JSDynamicObject object, long index, Object value) protected HolesObjectArraytoObjectHoles(JSDynamicObject object) protected HolesIntArraywithIntegrityLevel(int newIntegrityLevel) Methods inherited from class AbstractContiguousIntArray
addRangeImpl, firstElementIndex, getArrayOffset, getInBoundsFastInt, getIndexOffset, lastElementIndex, prepareInBoundsFast, setArrayOffset, setIndexOffset, setLengthLessMethods inherited from class AbstractIntArray
allocateArray, cloneArray, containsHoleValue, convertToObject, getArray, getArrayCapacity, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupportedMethods inherited from class AbstractWritableArray
assertHoleCount, checkFillHoles, clearUnusedArea, countHoles, deleteElementHoles, fillHoles, getElement, getElementInBounds, getInBoundsFastDouble, getUsedLength, hasHolesOrUnused, incrementHolesCount, isInBounds, isInBoundsFast, isSparse, isSupportedContiguous, isSupportedHoles, isSupportedZeroBased, length, lengthInt, nextElementIndexHoles, nextElementIndexZeroBased, prepareInBoundsContiguous, prepareInBoundsHoles, prepareInBoundsZeroBased, prepareSupportedContiguous, prepareSupportedHoles, prepareSupportedZeroBased, previousElementIndexHoles, removeRangeContiguous, removeRangeHoles, setArrayProperties, setArrayProperties, setLengthImpl, setLengthLessContiguous, setLengthLessZeroBased, shiftRangeImpl, toContiguous, toNonContiguous, 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, isInstance, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, setElement, setLength, setLength, shiftRange, toArray, traceArrayTransition, traceWrite, valueIsByte
-
Field Details
-
HOLE_VALUE
public static final int HOLE_VALUE- See Also:
-
-
Method Details
-
makeHolesIntArray
public static HolesIntArray makeHolesIntArray(JSDynamicObject object, int length, int[] array, long indexOffset, int arrayOffset, int usedLength, int holeCount, int integrityLevel) -
setInBoundsFast
- Overrides:
setInBoundsFastin classAbstractContiguousIntArray
-
isHoleFast
-
setInBoundsFastHole
-
setInBoundsFastNonHole
-
containsHoles
- Overrides:
containsHolesin classAbstractWritableArray
-
prepareInBounds
public int prepareInBounds(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile) - Specified by:
prepareInBoundsin classAbstractWritableArray
-
isSupported
- Specified by:
isSupportedin classAbstractWritableArray
-
prepareSupported
public int prepareSupported(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile) - Specified by:
prepareSupportedin classAbstractWritableArray
-
toNonHoles
- Overrides:
toNonHolesin classAbstractWritableArray
-
getInBoundsFast
- Overrides:
getInBoundsFastin classAbstractIntArray
-
toHoles
- Specified by:
toHolesin classAbstractIntArray
-
toDouble
- Specified by:
toDoublein classAbstractWritableArray
-
toObject
- Specified by:
toObjectin classAbstractWritableArray
-
isHoleValue
public static boolean isHoleValue(int value) -
nextElementIndex
Description copied from class:ScriptArrayReturns the next index. The index is guaranteed either to exist, or be MAX_SAFE_INTEGER. Reason for MAX_SAFE_INTEGER is: this array could be the prototype of another one; returning the length() of this array would be wrong, if the inheriting array is longer, but has a hole at length().- Overrides:
nextElementIndexin classAbstractWritableArray
-
previousElementIndex
Description copied from class:ScriptArrayReturns the previous index. The index is guaranteed either to exist, or be smaller than firstElementIndex().- Overrides:
previousElementIndexin classAbstractWritableArray
-
hasElement
- Overrides:
hasElementin classAbstractWritableArray- Returns:
- true if array has an element (not a hole) at this index.
-
deleteElementImpl
- Overrides:
deleteElementImplin classAbstractIntArray
-
toObjectHoles
- Specified by:
toObjectHolesin classAbstractIntArray
-
isHolesType
public boolean isHolesType()Description copied from class:ScriptArrayReturns true if this array type could have hole values in it. Doesn't tell whether it actually HAS holes.- Overrides:
isHolesTypein classScriptArray
-
hasHoles
Description copied from class:ScriptArrayReturns true when this array actually has holes betweenScriptArray.firstElementIndex(JSDynamicObject)andScriptArray.lastElementIndex(JSDynamicObject). ImpliesScriptArray.isHolesType().- Overrides:
hasHolesin classAbstractWritableArray- See Also:
-
removeRangeImpl
Description copied from class:ScriptArrayThis function deletes all elements in the range from [start..end[. This is equivalent to shifting the whole array, starting with element index end, by end-start positions to the left. Can be used by e.g. Array.prototype.splice;- Specified by:
removeRangeImplin classScriptArray
-
withIntegrityLevel
- Specified by:
withIntegrityLevelin classAbstractIntArray
-
ownPropertyKeys
- Overrides:
ownPropertyKeysin classScriptArray
-