[webkit-changes] [WebKit/WebKit] b3afac: Merge hasGetterSetterProperties() and hasCustomGet...
Commit Queue
noreply at github.com
Sun Mar 12 17:53:57 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b3afaca67e101ba727d5ead5716a19a795d4ecaf
https://github.com/WebKit/WebKit/commit/b3afaca67e101ba727d5ead5716a19a795d4ecaf
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-03-12 (Sun, 12 Mar 2023)
Changed paths:
M Source/JavaScriptCore/runtime/ClassInfo.h
M Source/JavaScriptCore/runtime/JSCellInlines.h
M Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
M Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp
M Source/JavaScriptCore/runtime/JSONObject.cpp
M Source/JavaScriptCore/runtime/JSObject.cpp
M Source/JavaScriptCore/runtime/JSObject.h
M Source/JavaScriptCore/runtime/Structure.cpp
M Source/JavaScriptCore/runtime/Structure.h
M Source/JavaScriptCore/runtime/StructureInlines.h
Log Message:
-----------
Merge hasGetterSetterProperties() and hasCustomGetterSetterProperties() structure flags
https://bugs.webkit.org/show_bug.cgi?id=253795
<rdar://problem/106617446>
Reviewed by Yusuke Suzuki.
This change merges hasGetterSetterProperties() and hasCustomGetterSetterProperties() structure flags,
which reduces number of static hash table lookups in constructors and even fixes the regression
introduced in http://webkit.org/b/253175 by making hasReadOnlyOrGetterSetterPropertiesExcludingProto()
take into account custom accessors in static hash table.
The merged flags have always being used hand in hand, except for use case in Reflect.set() / slowest
path of [[Set]], which eventually will be removed along with PropertyAttribute::CustomValue.
The merging is necessary to free up a bit for a follow-up patch, which will make the validation of
Proxy trap results conditional based structure flags of its [[ProxyTarget]].
Also, renames hasStaticPropertyWithAttributes() to better reflect on its mechanics.
* Source/JavaScriptCore/runtime/ClassInfo.h:
* Source/JavaScriptCore/runtime/JSCellInlines.h:
(JSC::JSCell::canUseFastGetOwnProperty):
* Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:
(JSC::canPerformFastPropertyEnumerationForCopyDataProperties):
* Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp:
(JSC::JSLexicalEnvironment::getOwnPropertySlot):
(JSC::JSLexicalEnvironment::put):
* Source/JavaScriptCore/runtime/JSONObject.cpp:
(JSC::FastStringifier::recordFastPropertyEnumerationFailure):
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::JSObject::definePropertyOnReceiver):
* Source/JavaScriptCore/runtime/JSObject.h:
(JSC::JSObject::hasCustomProperties):
(JSC::JSObject::hasGetterSetterProperties): Deleted.
(JSC::JSObject::hasCustomGetterSetterProperties): Deleted.
* Source/JavaScriptCore/runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::ClassInfo::hasStaticPropertyWithAnyOfAttributes const):
(JSC::Structure::canAccessPropertiesQuicklyForEnumeration const):
(JSC::ClassInfo::hasStaticPropertyWithAttributes const): Deleted.
* Source/JavaScriptCore/runtime/Structure.h:
(JSC::Structure::setHasGetterSetterPropertiesWithProtoCheck):
(JSC::Structure::setHasCustomGetterSetterPropertiesWithProtoCheck):
* Source/JavaScriptCore/runtime/StructureInlines.h:
(JSC::Structure::canPerformFastPropertyEnumeration const):
Canonical link: https://commits.webkit.org/261556@main
More information about the webkit-changes
mailing list