Class LazyRegexResultIndicesArray
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.LazyRegexResultIndicesArray
-
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
FieldsFields 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
ConstructorsModifierConstructorDescriptionprotectedLazyRegexResultIndicesArray(int integrityLevel, DynamicArray.DynamicArrayCache cache) -
Method Summary
Modifier and TypeMethodDescriptionaddRangeImpl(JSDynamicObject object, long offset, int size) This method grows the array by adding more elements of a given size.cloneArray(JSDynamicObject object) static LazyRegexResultIndicesArraycreateWritable(JSContext context, JSDynamicObject object, long index, Object value, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) 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) getElementInBounds(JSDynamicObject object, int index) static ObjectgetIntIndicesArray(JSContext context, Object regexResult, int[] indices, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) static ObjectgetIntIndicesArray(JSContext context, Object regexResult, int index, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) booleanhasElement(JSDynamicObject object, long index) intlengthInt(JSDynamicObject object) protected static Object[]materializeFull(JSDynamicObject object, int groupCount, com.oracle.truffle.api.nodes.Node node) static ObjectmaterializeGroup(JSContext context, JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) removeRangeImpl(JSDynamicObject object, long start, long end) This function deletes all elements in the range from [start..end[.setLengthImpl(JSDynamicObject object, long length, com.oracle.truffle.api.nodes.Node node, ScriptArray.SetLengthProfileAccess profile) protected DynamicArraywithIntegrityLevel(int newIntegrityLevel) Methods inherited from class com.oracle.truffle.js.runtime.array.dyn.AbstractConstantArray
firstElementIndex, getElement, getElementInBounds, hasHoles, isInBoundsFast, lastElementIndex, length, nextElementIndex, previousElementIndex, setElementImplMethods 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, hasHolesOrUnused, isHolesType, isInstance, makeMultiRangeList, makeRangeList, nextPower, ownPropertyKeys, ownPropertyKeysContiguous, ownPropertyKeysHoles, removeRange, removeRange, setElement, setLength, setLength, shiftRange, shiftRangeImpl, toArray, traceArrayTransition, traceWrite, valueIsByte
-
Field Details
-
LAZY_REGEX_RESULT_INDICES_ARRAY
-
-
Constructor Details
-
LazyRegexResultIndicesArray
-
-
Method Details
-
createLazyRegexResultIndicesArray
-
materializeGroup
public static Object materializeGroup(JSContext context, JSDynamicObject object, int index, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) -
getIntIndicesArray
public static Object getIntIndicesArray(JSContext context, Object regexResult, int index, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) -
getIntIndicesArray
public static Object getIntIndicesArray(JSContext context, Object regexResult, int[] indices, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) -
createWritable
public ScriptArray createWritable(JSContext context, JSDynamicObject object, long index, Object value, com.oracle.truffle.api.nodes.Node node, TRegexUtil.InvokeGetGroupBoundariesMethodNode getStartNode, TRegexUtil.InvokeGetGroupBoundariesMethodNode getEndNode) -
getElementInBounds
- Specified by:
getElementInBoundsin classAbstractConstantArray
-
hasElement
- Specified by:
hasElementin classScriptArray- Returns:
- true if array has an element (not a hole) at this index.
-
lengthInt
- Specified by:
lengthIntin classScriptArray
-
createWriteableObject
public AbstractObjectArray createWriteableObject(JSDynamicObject object, long index, Object value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableObjectin classAbstractConstantArray
-
createWriteableInt
public AbstractObjectArray createWriteableInt(JSDynamicObject object, long index, int value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableIntin classAbstractConstantArray
-
createWriteableDouble
public AbstractObjectArray createWriteableDouble(JSDynamicObject object, long index, double value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableDoublein classAbstractConstantArray
-
createWriteableJSObject
public AbstractObjectArray createWriteableJSObject(JSDynamicObject object, long index, JSDynamicObject value, com.oracle.truffle.api.nodes.Node node, ScriptArray.CreateWritableProfileAccess profile) - Specified by:
createWriteableJSObjectin classAbstractConstantArray
-
deleteElementImpl
- Specified by:
deleteElementImplin classScriptArray
-
setLengthImpl
public ScriptArray setLengthImpl(JSDynamicObject object, long length, com.oracle.truffle.api.nodes.Node node, ScriptArray.SetLengthProfileAccess profile) - Specified by:
setLengthImplin classScriptArray
-
addRangeImpl
Description copied from class:ScriptArrayThis method grows the array by adding more elements of a given size. An offset parameter can be used to specify where the new elements have to be added (starting from zero). The operation is equivalent to shifting (right) the whole array or its part as defined by the offset parameter.- Specified by:
addRangeImplin classScriptArray- Parameters:
offset- starting offset positionsize- size of the inserted empty array- Returns:
- a
ScriptArrayinstance with the new size
-
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
-
cloneArray
- Specified by:
cloneArrayin classDynamicArray
-
withIntegrityLevel
- Specified by:
withIntegrityLevelin classDynamicArray
-
materializeFull
protected static Object[] materializeFull(JSDynamicObject object, int groupCount, com.oracle.truffle.api.nodes.Node node)
-