Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd3aa0eab70aab95336c5805cfa7cfcc1909be45
      
https://github.com/WebKit/WebKit/commit/bd3aa0eab70aab95336c5805cfa7cfcc1909be45
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] Compare lengths inline before calling `operationCompareStringEq` for 
ropes
https://bugs.webkit.org/show_bug.cgi?id=326312

Reviewed by Yusuke Suzuki.

When either operand of a string equality is a rope, DFG and FTL always
take the slow path and call operationCompareStringEq. If the lengths
differ, the operation returns false without resolving the rope, so the
same comparison takes the slow path every time.

This patch compares the lengths in the rope case first. If they differ,
the result is false and no call is made. Otherwise we call the operation
as before.

* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStringEquality):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

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



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

Reply via email to