Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9f4485eb336e44a6d0d1ed201405cf9927efd664
https://github.com/WebKit/WebKit/commit/9f4485eb336e44a6d0d1ed201405cf9927efd664
Author: Yusuke Suzuki <[email protected]>
Date: 2025-12-26 (Fri, 26 Dec 2025)
Changed paths:
M Source/JavaScriptCore/runtime/ClassInfo.h
M Source/JavaScriptCore/runtime/JSPromise.cpp
M Source/JavaScriptCore/runtime/Structure.cpp
M Source/JavaScriptCore/runtime/Structure.h
M Source/JavaScriptCore/runtime/StructureInlines.h
Log Message:
-----------
[JSC] Track "then" property addition in Structure
https://bugs.webkit.org/show_bug.cgi?id=304697
rdar://167179851
Reviewed by Justin Michaud.
In many JS engines, "then" property addition is tracked in Structure /
Map / Shape to avoid unnecessary "thenable" check for promise results.
This patch adds Structure::hasSpecialProperties to track this, and
adding "then" as a special property.
* Source/JavaScriptCore/runtime/ClassInfo.h:
* Source/JavaScriptCore/runtime/JSPromise.cpp:
(JSC::isDefinitelyNonThenable):
(JSC::JSPromise::resolvePromise):
(JSC::JSPromise::resolveWithoutPromise):
(JSC::JSPromise::resolveWithInternalMicrotask):
(JSC::isIteratorResultObject): Deleted.
* Source/JavaScriptCore/runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::ClassInfo::hasStaticProperty const):
* Source/JavaScriptCore/runtime/Structure.h:
(JSC::Structure::bitFieldFlagsCantBeChangedWithoutTransition):
* Source/JavaScriptCore/runtime/StructureInlines.h:
(JSC::Structure::add):
(JSC::Structure::addOrReplacePropertyWithoutTransition):
Canonical link: https://commits.webkit.org/304952@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications