Class HolesDoubleArray
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.AbstractDoubleArray
com.oracle.truffle.js.runtime.array.dyn.AbstractContiguousDoubleArray
com.oracle.truffle.js.runtime.array.dyn.HolesDoubleArray
-
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
FieldsModifier and TypeFieldDescriptionstatic final longstatic final doubleFields 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 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(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(double value) booleanisSupported(JSDynamicObject object, long index) static HolesDoubleArraymakeHolesDoubleArray(JSDynamicObject object, int length, double[] 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, double value) voidsetInBoundsFastHole(JSDynamicObject object, int index, double value) voidsetInBoundsFastNonHole(JSDynamicObject object, int 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 HolesDoubleArraywithIntegrityLevel(int newIntegrityLevel) Methods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractContiguousDoubleArray
addRangeImpl, firstElementIndex, getArrayOffset, getInBoundsFastDouble, getIndexOffset, lastElementIndex, prepareInBoundsFast, setArrayOffset, setIndexOffset, setLengthLessMethods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractDoubleArray
allocateArray, cloneArray, getArray, getArrayCapacity, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupported, toDoubleMethods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractWritableArray
assertHoleCount, checkFillHoles, clearUnusedArea, countHoles, deleteElementHoles, fillHoles, getElement, getElementInBounds, 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
-
Field Details
-
HOLE_VALUE
public static final long HOLE_VALUE- See Also:
-
HOLE_VALUE_DOUBLE
public static final double HOLE_VALUE_DOUBLE
-
-
Method Details
-
makeHolesDoubleArray
public static HolesDoubleArray makeHolesDoubleArray(JSDynamicObject object, int length, double[] array, long indexOffset, int arrayOffset, int usedLength, int holeCount, int integrityLevel) -
prepareInBounds
public int prepareInBounds(JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, AbstractWritableArray.SetSupportedProfileAccess profile) - Specified by:
prepareInBoundsin classAbstractWritableArray
-
setInBoundsFast
- Overrides:
setInBoundsFastin classAbstractContiguousDoubleArray
-
isHoleFast
-
setInBoundsFastHole
-
setInBoundsFastNonHole
-
containsHoles
- Overrides:
containsHolesin classAbstractWritableArray
-
toNonHoles
- Overrides:
toNonHolesin 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 classAbstractDoubleArray
-
toHoles
- Specified by:
toHolesin classAbstractDoubleArray
-
toObject
- Specified by:
toObjectin classAbstractWritableArray
-
isHoleValue
public static boolean isHoleValue(double 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 classAbstractDoubleArray
-
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
-
withIntegrityLevel
- Specified by:
withIntegrityLevelin classAbstractDoubleArray
-
ownPropertyKeys
- Overrides:
ownPropertyKeysin classScriptArray
-