public abstract class JSTypedArraySortNode extends JavaScriptBaseNode
JSTypedArrayObject.
Copies the elements to a temporary array (of a suitable primitive or boxed type, depending on the
element type and comparator), sorts the array using the comparator (natural order if null),
performs a detached buffer check, and then copies it to a typed array of the same element type
and length, which may be the same, or a newly allocated typed array instance.
Used by %TypedArray%.prototype.sort,toSorted.| Modifier | Constructor and Description |
|---|---|
protected |
JSTypedArraySortNode() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doCached(JSTypedArrayObject fromArray,
JSTypedArrayObject toArray,
int length,
Comparator<Object> comparator,
TypedArray fromType,
TypedArray toType,
boolean comparatorIsNull,
TypedArray cachedFromType,
TypedArray cachedToType,
boolean cachedComparatorIsNull,
com.oracle.truffle.api.interop.InteropLibrary interop) |
protected void |
doUncached(JSTypedArrayObject fromArray,
JSTypedArrayObject toArray,
int length,
Comparator<Object> comparator,
TypedArray fromType,
TypedArray toType,
boolean comparatorIsNull,
com.oracle.truffle.api.interop.InteropLibrary interop) |
abstract void |
execute(JSTypedArrayObject fromArray,
JSTypedArrayObject toArray,
int length,
Comparator<Object> comparator) |
copy, getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, onReplace, reportLoopCount, reportLoopCountaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, toStringpublic abstract void execute(JSTypedArrayObject fromArray, JSTypedArrayObject toArray, int length, Comparator<Object> comparator)
protected final void doCached(JSTypedArrayObject fromArray, JSTypedArrayObject toArray, int length, Comparator<Object> comparator, TypedArray fromType, TypedArray toType, boolean comparatorIsNull, TypedArray cachedFromType, TypedArray cachedToType, boolean cachedComparatorIsNull, com.oracle.truffle.api.interop.InteropLibrary interop)
protected final void doUncached(JSTypedArrayObject fromArray, JSTypedArrayObject toArray, int length, Comparator<Object> comparator, TypedArray fromType, TypedArray toType, boolean comparatorIsNull, com.oracle.truffle.api.interop.InteropLibrary interop)