Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 23903f1a1cc7fa0b403cd150387669c8ecb3a6ad
      
https://github.com/WebKit/WebKit/commit/23903f1a1cc7fa0b403cd150387669c8ecb3a6ad
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-07-05 (Sun, 05 Jul 2026)

  Changed paths:
    A JSTests/stress/array-indexof-includes-cow-atom-strings.js
    A JSTests/stress/array-indexof-includes-result-boundaries.js
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] Add AtomString Array loop in DFG / FTL
https://bugs.webkit.org/show_bug.cgi?id=318642
rdar://181445937

Reviewed by Yijia Huang.

This patch adds fast path for indexOf / includes with AtomString arrays.
If Array is an AtomString array and input is JSString with AtomString,
we do pointer comparison loop. Also we use compare32 to clean up result
generation in DFG code, which becomes branchless and faster. FTL already
achieves it due to B3's conversion.

Tests: JSTests/stress/array-indexof-includes-cow-atom-strings.js
       JSTests/stress/array-indexof-includes-result-boundaries.js

* JSTests/stress/array-indexof-includes-cow-atom-strings.js: Added.
(shouldBe):
(idxFrom):
(inc):
(idxEmptyAndSingle):
* JSTests/stress/array-indexof-includes-result-boundaries.js: Added.
(shouldBe):
(i32Includes):
(i32IncludesFrom):
(dblIndex):
(dblIncludes):
(strIndex):
(strIncludes):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOfOrArrayIncludes):

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



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

Reply via email to