public final class ZeroBasedDoubleArray extends AbstractDoubleArray
AbstractWritableArray.SetSupportedProfileAccess
DynamicArray.DynamicArrayCache
ScriptArray.DefaultIterator, ScriptArray.ProfileAccess, ScriptArray.ProfileHolder, ScriptArray.SetLengthProfileAccess
SET_SUPPORTED_PROFILE_ACCESS
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_MASK
EMPTY_OBJECT_ARRAY, SET_LENGTH_PROFILE
Modifier and Type | Method and Description |
---|---|
ScriptArray |
addRangeImpl(com.oracle.truffle.api.object.DynamicObject object,
long offset,
int size)
This method grows the array by adding more elements of a given size.
|
static ZeroBasedDoubleArray |
createZeroBasedDoubleArray() |
long |
firstElementIndex(com.oracle.truffle.api.object.DynamicObject object,
boolean condition)
First element index (inclusive).
|
double |
getInBoundsFastDouble(com.oracle.truffle.api.object.DynamicObject object,
int index,
boolean condition) |
boolean |
hasHoles(com.oracle.truffle.api.object.DynamicObject object,
boolean condition) |
boolean |
isSupported(com.oracle.truffle.api.object.DynamicObject object,
long index,
boolean condition) |
long |
lastElementIndex(com.oracle.truffle.api.object.DynamicObject object,
boolean condition)
Last element index (inclusive).
|
static ZeroBasedDoubleArray |
makeZeroBasedDoubleArray(com.oracle.truffle.api.object.DynamicObject object,
int length,
int usedLength,
double[] array,
int integrityLevel) |
long |
nextElementIndex(com.oracle.truffle.api.object.DynamicObject object,
long index,
boolean condition)
Returns the next index.
|
protected int |
prepareInBounds(com.oracle.truffle.api.object.DynamicObject object,
int index,
boolean condition,
ScriptArray.ProfileHolder profile) |
protected int |
prepareInBoundsFast(com.oracle.truffle.api.object.DynamicObject object,
long index,
boolean condition) |
protected int |
prepareSupported(com.oracle.truffle.api.object.DynamicObject object,
int index,
boolean condition,
ScriptArray.ProfileHolder profile) |
ScriptArray |
removeRangeImpl(com.oracle.truffle.api.object.DynamicObject object,
long start,
long end)
This function deletes all elements in the range from [start..end[.
|
void |
setInBoundsFast(com.oracle.truffle.api.object.DynamicObject object,
int index,
double value,
boolean condition) |
protected void |
setLengthLess(com.oracle.truffle.api.object.DynamicObject object,
long length,
boolean condition,
ScriptArray.ProfileHolder profile) |
Object[] |
toArray(com.oracle.truffle.api.object.DynamicObject object)
Creates an Object[] from this array, of size array.length.
|
ContiguousDoubleArray |
toContiguous(com.oracle.truffle.api.object.DynamicObject object,
long index,
Object value,
boolean condition) |
HolesDoubleArray |
toHoles(com.oracle.truffle.api.object.DynamicObject object,
long index,
Object value,
boolean condition) |
ZeroBasedObjectArray |
toObject(com.oracle.truffle.api.object.DynamicObject object,
long index,
Object value,
boolean condition) |
protected ZeroBasedDoubleArray |
withIntegrityLevel(int newIntegrityLevel) |
allocateArray, deleteElementImpl, getArray, getArray, getArrayCapacity, getInBoundsFast, isHolePrepared, moveRangePrepared, resizeArray, setElementImpl, setHoleValue, setInBounds, setSupported, toDouble
arrayCast, clearUnusedArea, containsHoles, countHoles, createSetSupportedProfile, deleteElementHoles, fillHoles, getArrayOffset, getArrayOffset, getElement, getElementInBounds, getInBoundsFast, getInBoundsFastInt, getIndexOffset, getIndexOffset, getUsedLength, getUsedLength, hasElement, incrementHolesCount, isInBounds, isInBounds, isInBoundsFast, isSparse, isSupportedContiguous, isSupportedHoles, isSupportedZeroBased, length, lengthInt, nextElementIndexHoles, nextElementIndexZeroBased, prepareInBoundsContiguous, prepareInBoundsHoles, prepareInBoundsZeroBased, prepareSupportedContiguous, prepareSupportedHoles, prepareSupportedZeroBased, previousElementIndex, previousElementIndexHoles, removeRangeContiguous, removeRangeHoles, setArrayOffset, setArrayProperties, setIndexOffset, setLengthImpl, setLengthLessContiguous, setLengthLessZeroBased, toArrayZeroBased, toNonContiguous, toNonHoles, toSparse, traceWriteValue
createCache, freeze, isExtensible, isFrozen, isLengthNotWritable, isSealed, isStatelessType, preventExtensions, seal, setIntegrityLevel, setLengthNotWritable, toString
addRange, arrayCondition, asIterable, canDeleteElement, canDeleteElement, cast, createConstantArray, createConstantEmptyArray, createSetLengthProfile, deleteElement, deleteElement, firstElementIndex, getElement, hasElement, hasHoles, isHolesType, isInBoundsFast, isInstance, lastElementIndex, length, lengthInt, makeMultiRangeList, makeRangeList, nextElementIndex, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, previousElementIndex, removeRange, removeRange, setElement, setElement, setLength, setLength, toString, traceArrayTransition, traceWrite, valueIsByte
public static ZeroBasedDoubleArray makeZeroBasedDoubleArray(com.oracle.truffle.api.object.DynamicObject object, int length, int usedLength, double[] array, int integrityLevel)
public static ZeroBasedDoubleArray createZeroBasedDoubleArray()
public double getInBoundsFastDouble(com.oracle.truffle.api.object.DynamicObject object, int index, boolean condition)
getInBoundsFastDouble
in class AbstractDoubleArray
public void setInBoundsFast(com.oracle.truffle.api.object.DynamicObject object, int index, double value, boolean condition)
setInBoundsFast
in class AbstractDoubleArray
public boolean isSupported(com.oracle.truffle.api.object.DynamicObject object, long index, boolean condition)
isSupported
in class AbstractWritableArray
protected int prepareInBoundsFast(com.oracle.truffle.api.object.DynamicObject object, long index, boolean condition)
prepareInBoundsFast
in class AbstractWritableArray
protected int prepareInBounds(com.oracle.truffle.api.object.DynamicObject object, int index, boolean condition, ScriptArray.ProfileHolder profile)
prepareInBounds
in class AbstractWritableArray
protected int prepareSupported(com.oracle.truffle.api.object.DynamicObject object, int index, boolean condition, ScriptArray.ProfileHolder profile)
prepareSupported
in class AbstractWritableArray
protected void setLengthLess(com.oracle.truffle.api.object.DynamicObject object, long length, boolean condition, ScriptArray.ProfileHolder profile)
setLengthLess
in class AbstractWritableArray
public Object[] toArray(com.oracle.truffle.api.object.DynamicObject object)
ScriptArray
toArray
in class AbstractWritableArray
public ZeroBasedObjectArray toObject(com.oracle.truffle.api.object.DynamicObject object, long index, Object value, boolean condition)
toObject
in class AbstractWritableArray
public ContiguousDoubleArray toContiguous(com.oracle.truffle.api.object.DynamicObject object, long index, Object value, boolean condition)
toContiguous
in class AbstractWritableArray
public HolesDoubleArray toHoles(com.oracle.truffle.api.object.DynamicObject object, long index, Object value, boolean condition)
toHoles
in class AbstractDoubleArray
public long firstElementIndex(com.oracle.truffle.api.object.DynamicObject object, boolean condition)
ScriptArray
firstElementIndex
in class ScriptArray
public long lastElementIndex(com.oracle.truffle.api.object.DynamicObject object, boolean condition)
ScriptArray
lastElementIndex
in class ScriptArray
public ScriptArray removeRangeImpl(com.oracle.truffle.api.object.DynamicObject object, long start, long end)
ScriptArray
removeRangeImpl
in class ScriptArray
public ScriptArray addRangeImpl(com.oracle.truffle.api.object.DynamicObject object, long offset, int size)
ScriptArray
addRangeImpl
in class ScriptArray
offset
- starting offset positionsize
- size of the inserted empty arrayScriptArray
instance with the new sizepublic boolean hasHoles(com.oracle.truffle.api.object.DynamicObject object, boolean condition)
hasHoles
in class ScriptArray
protected ZeroBasedDoubleArray withIntegrityLevel(int newIntegrityLevel)
withIntegrityLevel
in class AbstractDoubleArray
public long nextElementIndex(com.oracle.truffle.api.object.DynamicObject object, long index, boolean condition)
ScriptArray
nextElementIndex
in class AbstractWritableArray