[typedarray] Replace quicksort with mergesort to make TA#sort stable
This CL replaces the current TypedArray#sort with a simpler mergesort. The fastpath when the user does not provide a comparison function is still used. In addition, TypedArray#sort now converts all elements in the TypedArray to tagged values upfront, sorts them and writes them back into the TypedArray as the final step. R=jgruber@chromium.org, tebbi@chromium.org Bug: v8:8567 Change-Id: Ib672c5cf510f7c0a2e722d1baa2704305a9ff235 Reviewed-on: https://chromium-review.googlesource.com/c/1445987 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#59271}
Showing
This diff is collapsed.
Please
register
or
sign in
to comment