Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9246e68afc48b1435bf66fab2d6ce8bef63ea4f6
      
https://github.com/WebKit/WebKit/commit/9246e68afc48b1435bf66fab2d6ce8bef63ea4f6
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-05-11 (Mon, 11 May 2026)

  Changed paths:
    A JSTests/stress/array-sort-inline-bigint-comparator.js
    A JSTests/stress/array-sort-inline-contiguous-undefined.js
    M JSTests/stress/array-sort-inline-mixed-sizes.js
    M JSTests/stress/array-sort-inline-osr-exit-in-comparator.js
    M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] Follow-up change after inlined small sort
https://bugs.webkit.org/show_bug.cgi?id=314534
rdar://176766529

Reviewed by Yijia Huang.

1. Make some test exclusively using no-cjit option to stabilize as it
   relies on OSR exit occurrence. Also limiting it to Default config.
2. Use flushForTerminal() for each back-edge jump. Technically, in this
   case, not necessary, but still it is good to follow to the existing idiom.
3. Use ToNumber before comparison in Sort's result. If we have BigInt as
   a result, we will see difference. (As ToNumber(BigInt) throws an
   error).
4. Contiguous array should see undefined as a hole in sorting.

Test: JSTests/stress/array-sort-inline-bigint-comparator.js

* JSTests/stress/array-sort-inline-bigint-comparator.js: Added.
(sortIt):
(expectTypeError):
(i.b):
(i.const.obj.valueOf):
* JSTests/stress/array-sort-inline-contiguous-undefined.js: Added.
(sortIt):
(cmp):
(checkSortedWithUndefinedAtEnd):
(strictCmp):
* JSTests/stress/array-sort-inline-mixed-sizes.js:
* JSTests/stress/array-sort-inline-osr-exit-in-comparator.js:
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleArraySort):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArraySortCompact):

Canonical link: https://commits.webkit.org/313016@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to