Class JSTypedArraySortNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.array.JSTypedArraySortNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class JSTypedArraySortNode extends JavaScriptBaseNode
Sorts the elements of a 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.