-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Normative] Make Array.prototype.sort stable #1340
Conversation
Added to November agenda: tc39/agendas@4fdf671 |
This got consensus at today’s TC39 meeting. 🎉 |
Test262 tests: tc39/test262#1977 |
Since this has tests and consensus, is it ready to merge? |
The tests aren’t merged yet. |
@ljharb They are now! |
cca5a66
to
a85c9d9
Compare
I know it's not my place, but lgtm! |
FWIW, Mozilla would be ok with making sort stability normative for TypedArray#sort as well, even before our implementation is compliant. |
V8 would be too. As soon as this PR is merged, I’ll work on a follow-up PR that makes |
All major JavaScript engines now have a stable Array.prototype.sort implementation. Let’s update the spec accordingly. References: - https://v8.dev/blog/array-sort - chakra-core/ChakraCore@c565b12 - https://mathiasbynens.be/demo/sort-stability - https://docs.google.com/presentation/d/1mHvxDciqsAchhjepMZlU5fn1DBvglCXSjDWUEtsPGvI/edit
2624806
to
257cae9
Compare
Currently, only V8 [1] and SpiderMonkey [2] have unstable `%TypedArray%.prototype.sort` implementations. Both teams have publicly committed to making their implementations stable, to match `Array.prototype.sort` [3]. [1] https://bugs.chromium.org/p/v8/issues/detail?id=8567 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1290554 [3] tc39#1340 (comment)
OP delivers: #1433 |
All major JavaScript engines now have a stable
Array.prototype.sort
implementation. Let’s update the spec accordingly.References: