Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4d9f68d8aa7168a9287c4e8da2494788805ac10f
      
https://github.com/WebKit/WebKit/commit/4d9f68d8aa7168a9287c4e8da2494788805ac10f
  Author: Yusuke Suzuki <[email protected]>
  Date:   2025-10-12 (Sun, 12 Oct 2025)

  Changed paths:
    M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObject.h
    M Source/JavaScriptCore/runtime/JSPromise.cpp
    M Source/JavaScriptCore/runtime/JSPromise.h

  Log Message:
  -----------
  [JSC] Stop calling Promise.resolve from C++ code
https://bugs.webkit.org/show_bug.cgi?id=300572
rdar://162454169

Reviewed by Sosuke Suzuki.

This patch implements PromiseResolve abstract operation in C++ and
JSPromise::resolvedPromise calls it instead of calling JS function
Promise.resolve. But we are not still changing Promise.resolve from JS
to C++ because that can be a regression when Promise.resolve is inlined
and most of code is removed via that. We should have DFG intrinsic for
this Promise.resolve and we need to lower it into optimal form in DFG /
FTL. So until that, we cannot move it to C++.

* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::promiseResolveFunction const): Deleted.
* Source/JavaScriptCore/runtime/JSPromise.cpp:
(JSC::JSPromise::resolvedPromise):
(JSC::JSPromise::promiseResolve):
* Source/JavaScriptCore/runtime/JSPromise.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to