Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: db86e0961a4d5223763ca966f305140b1aae273f
      
https://github.com/WebKit/WebKit/commit/db86e0961a4d5223763ca966f305140b1aae273f
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    A JSTests/stress/string-prototype-concat-string-or-other.js
    A JSTests/stress/value-add-string-and-string-or-other.js
    M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

  Log Message:
  -----------
  [JSC] MakeRope should support StringOrOther when it is allowed
https://bugs.webkit.org/show_bug.cgi?id=325751
rdar://188770770

Reviewed by Sosuke Suzuki.

This patch extends MakeRope conversion to support StringOrOther as we
can frequently see that the passed value is String|undefined when
string[i] access goes out of bound. But we still need to throw an error
when it is used with String#concat. So we do this only when it is not
coming from String#concat.

Test: JSTests/stress/value-add-string-and-string-or-other.js

* JSTests/stress/string-prototype-concat-string-or-other.js: Added.
(shouldBe):
(shouldThrow):
(concat1):
(concat2):
(concatThis):
(toString):
* JSTests/stress/value-add-string-and-string-or-other.js: Added.
(shouldBe):
(add):
(addReversed):
(template):
(toString):
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):

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



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

Reply via email to