Class HolesObjectArray
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
com.oracle.truffle.js.runtime.array.dyn.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 -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectcastNonNull(Object value) booleancontainsHoles(JSDynamicObject object, long index) static HolesObjectArraydeleteElementImpl(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(com.oracle.truffle.js.runtime.objects.JSDynamicObject)andScriptArray.lastElementIndex(com.oracle.truffle.js.runtime.objects.JSDynamicObject).booleanisHoleFast(JSDynamicObject object, int index) booleanReturns true if this array type could have hole values in it.static booleanisHoleValue(Object value) booleanisSupported(JSDynamicObject object, long index) static HolesObjectArraymakeHolesObjectArray(JSDynamicObject object, int length, Object[] 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, Object value) voidsetInBoundsFastHole(JSDynamicObject object, int index, Object value) voidsetInBoundsFastNonHole(JSDynamicObject object, int index, Object value) toHoles(JSDynamicObject object, long index, Object value) toNonHoles(JSDynamicObject object, long index, Object value) protected HolesObjectArraywithIntegrityLevel(int newIntegrityLevel) Methods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractContiguousObjectArray
addRangeImpl, firstElementIndex, getArrayOffset, getInBoundsFastObject, getIndexOffset, lastElementIndex, prepareInBoundsFast, setArrayOffset, setIndexOffset, setLengthLessMethods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractObjectArray
allocateArray, checkNonNull, cloneArray, fillHoles, getArray, getArrayCapacity, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupported, toDouble, toObjectMethods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractWritableArray
assertHoleCount, checkFillHoles, clearUnusedArea, countHoles, deleteElementHoles, getElement, getElementInBounds, getInBoundsFastDouble, getInBoundsFastInt, 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 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, isInstance, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, setElement, setLength, setLength, shiftRange, toArray, traceArrayTransition, traceWrite, valueIsByte
-
Method Details
-
makeHolesObjectArray
public static HolesObjectArray makeHolesObjectArray(JSDynamicObject object, int length, Object[] array, long indexOffset, int arrayOffset, int usedLength, int holeCount, int integrityLevel) -
createHolesObjectArray
-
setInBoundsFast
- Overrides:
setInBoundsFastin classAbstractContiguousObjectArray
-
isHoleFast
-
setInBoundsFastHole
-
setInBoundsFastNonHole
-
containsHoles
- Overrides:
containsHolesin classAbstractWritableArray
-
toNonHoles
- Overrides:
toNonHolesin 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
-
getInBoundsFast
- Overrides:
getInBoundsFastin classAbstractObjectArray
-
toHoles
- Specified by:
toHolesin classAbstractObjectArray
-
isHoleValue
-
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 classAbstractObjectArray
-
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(com.oracle.truffle.js.runtime.objects.JSDynamicObject)andScriptArray.lastElementIndex(com.oracle.truffle.js.runtime.objects.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
-
castNonNull
- Overrides:
castNonNullin classAbstractObjectArray
-
withIntegrityLevel
- Specified by:
withIntegrityLevelin classAbstractObjectArray
-
ownPropertyKeys
- Overrides:
ownPropertyKeysin classScriptArray
-