Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9516ed8a4ffc897ddca5eebfbf7b7218a729c406
      
https://github.com/WebKit/WebKit/commit/9516ed8a4ffc897ddca5eebfbf7b7218a729c406
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-08-18 (Tue, 18 Aug 2026)

  Changed paths:
    A JSTests/stress/switch-string-substring-rope.js
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] Apply StringSwitch for substrings
https://bugs.webkit.org/show_bug.cgi?id=322078
rdar://185270122

Reviewed by Yijia Huang.

Like 313752@main, if rope is substring, we can access to the underlying
string data cheaply. This patch extends StringSwitch to substring 8-bit
ropes (previously only non-rope 8-bit string is supported).

Test: JSTests/stress/switch-string-substring-rope.js

* JSTests/stress/switch-string-substring-rope.js: Added.
(shouldBe):
(expectedFor):
(substringOfSubstring):
(check):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

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



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

Reply via email to