Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 711c7de281d5975ec9428ebe0e27f859ee57f022
      
https://github.com/WebKit/WebKit/commit/711c7de281d5975ec9428ebe0e27f859ee57f022
  Author: Yusuke Suzuki <[email protected]>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
    A JSTests/stress/object-to-string-and-to-this.js
    M Source/JavaScriptCore/dfg/DFGOperations.cpp

  Log Message:
  -----------
  [JSC] Call toThis for Object#toString in DFG / FTL
https://bugs.webkit.org/show_bug.cgi?id=250748
rdar://104299510

Reviewed by Mark Lam.

Object#toString specifically requires `toThis+Strict` since it keeps undefined 
|this| as is (most of them converts it to JSGlobalObject).
This is done in runtime function, but not done in DFG / FTL operations. This 
patch adds toThis call in DFG operations to make it work correctly.

* JSTests/stress/object-to-string-and-to-this.js: Added.
(shouldBe):
(foo):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to