Class AbstractConstantEmptyArray
java.lang.Object
com.oracle.truffle.js.runtime.array.ScriptArray
com.oracle.truffle.js.runtime.array.DynamicArray
com.oracle.truffle.js.runtime.array.dyn.AbstractConstantArray
com.oracle.truffle.js.runtime.array.dyn.AbstractConstantEmptyArray
- Direct Known Subclasses:
ConstantEmptyArray,ConstantEmptyPrototypeArray
-
Nested Class Summary
Nested 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
ConstructorsModifierConstructorDescriptionprotectedAbstractConstantEmptyArray(int integrityLevel, DynamicArray.DynamicArrayCache cache) -
Method Summary
Modifier and TypeMethodDescriptioncloneArray(JSDynamicObject object) createWriteableDouble(JSDynamicObject object, long index, double value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) createWriteableInt(JSDynamicObject object, long index, int value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) createWriteableJSObject(JSDynamicObject object, long index, JSDynamicObject value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) createWriteableObject(JSDynamicObject object, long index, Object value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) deleteElementImpl(JSDynamicObject object, long index, boolean strict) longfirstElementIndex(JSDynamicObject object) First element index (inclusive).protected static longgetCapacity(JSDynamicObject object) getElementInBounds(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).booleanReturns true if this array type could have hole values in it.longlastElementIndex(JSDynamicObject object) Last element index (inclusive).intlengthInt(JSDynamicObject object) longnextElementIndex(JSDynamicObject object, long index) Returns the next index.ownPropertyKeys(JSDynamicObject object) longpreviousElementIndex(JSDynamicObject object, long index) Returns the previous index.protected static voidsetCapacity(JSDynamicObject object, long length) Methods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractConstantArray
getElement, getElementInBounds, isInBoundsFast, length, setElementImplMethods inherited from class com.oracle.truffle.js.runtime.array.DynamicArray
createCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, maybePreinitializeCache, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toString, withIntegrityLevelMethods inherited from class com.oracle.truffle.js.runtime.array.ScriptArray
addRange, addRangeImpl, asIterable, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, deleteElement, hasHolesOrUnused, isInstance, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, removeRangeImpl, setElement, setLength, setLength, setLengthImpl, shiftRange, shiftRangeImpl, toArray, traceArrayTransition, traceWrite, valueIsByte
-
Constructor Details
-
AbstractConstantEmptyArray
-
-
Method Details
-
setCapacity
-
getCapacity
-
getElementInBounds
- Specified by:
getElementInBoundsin classAbstractConstantArray
-
lengthInt
- Specified by:
lengthIntin classScriptArray
-
cloneArray
- Specified by:
cloneArrayin classDynamicArray
-
hasElement
- Specified by:
hasElementin classScriptArray- Returns:
- true if array has an element (not a hole) at this index.
-
deleteElementImpl
- Specified by:
deleteElementImplin classScriptArray
-
firstElementIndex
Description copied from class:ScriptArrayFirst element index (inclusive).- Overrides:
firstElementIndexin classAbstractConstantArray
-
lastElementIndex
Description copied from class:ScriptArrayLast element index (inclusive).- Overrides:
lastElementIndexin classAbstractConstantArray
-
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 classAbstractConstantArray
-
previousElementIndex
Description copied from class:ScriptArrayReturns the previous index. The index is guaranteed either to exist, or be smaller than firstElementIndex().- Overrides:
previousElementIndexin classAbstractConstantArray
-
createWriteableInt
public AbstractIntArray createWriteableInt(JSDynamicObject object, long index, int value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableIntin classAbstractConstantArray
-
createWriteableDouble
public AbstractDoubleArray createWriteableDouble(JSDynamicObject object, long index, double value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableDoublein classAbstractConstantArray
-
createWriteableJSObject
public AbstractJSObjectArray createWriteableJSObject(JSDynamicObject object, long index, JSDynamicObject value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableJSObjectin classAbstractConstantArray
-
createWriteableObject
public AbstractObjectArray createWriteableObject(JSDynamicObject object, long index, Object value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableObjectin classAbstractConstantArray
-
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 classAbstractConstantArray- See Also:
-
ownPropertyKeys
- Overrides:
ownPropertyKeysin classScriptArray
-