[webkit-changes] [WebKit/WebKit] ed9f21: [JSC] Validate that HasStaticPropertyTable is pres...
Commit Queue
noreply at github.com
Wed Mar 13 22:00:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ed9f215ec22744e680c5a1f6f382f2b7afca56ad
https://github.com/WebKit/WebKit/commit/ed9f215ec22744e680c5a1f6f382f2b7afca56ad
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2024-03-13 (Wed, 13 Mar 2024)
Changed paths:
M Source/JavaScriptCore/runtime/ArrayIteratorPrototype.h
M Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.h
M Source/JavaScriptCore/runtime/IntlLocaleConstructor.h
M Source/JavaScriptCore/runtime/JSModuleLoader.h
M Source/JavaScriptCore/runtime/MapConstructor.cpp
M Source/JavaScriptCore/runtime/MapPrototype.h
M Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.h
M Source/JavaScriptCore/runtime/SetPrototype.h
M Source/JavaScriptCore/runtime/StringIteratorPrototype.h
M Source/JavaScriptCore/runtime/Structure.cpp
M Source/JavaScriptCore/tools/JSDollarVM.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyArrayConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyArrayConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyArrayPrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyArrayPrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorPrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorPrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyStructConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyStructConstructor.h
M Source/JavaScriptCore/wasm/js/WebAssemblyStructPrototype.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyStructPrototype.h
M Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.h
M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
M Source/WebCore/bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.h
M Source/WebCore/bindings/scripts/test/JS/JSLocalDOMWindow.h
M Source/WebCore/bindings/scripts/test/JS/JSPaintWorkletGlobalScope.h
M Source/WebCore/bindings/scripts/test/JS/JSServiceWorkerGlobalScope.h
M Source/WebCore/bindings/scripts/test/JS/JSSharedWorkerGlobalScope.h
M Source/WebCore/bindings/scripts/test/JS/JSWorkerGlobalScope.h
M Source/WebCore/bindings/scripts/test/JS/JSWorkletGlobalScope.h
Log Message:
-----------
[JSC] Validate that HasStaticPropertyTable is present only if there is a static property table
https://bugs.webkit.org/show_bug.cgi?id=270889
<rdar://problem/124493762>
Reviewed by Yusuke Suzuki.
This change:
1) Removes empty static property tables.
2) Removes HasStaticPropertyTable structure flag from classes without static property tables.
3) Fixes bindings generator condition for setting HasStaticPropertyTable to match the condition for
setting `staticPropHashTable`, which isn't observable because we eagerly reify all static properties.
4) Adds an assertion to validate that HasStaticPropertyTable is present only if there is an own or
inherited static property table.
1) and 2) are performance micro-optimizations that avoid calling into getOwnStaticPropertySlot()
for property lookup if there is no static property table, own nor inherited, while 4) ensures
consistency across the JSC codebase.
* Source/JavaScriptCore/runtime/ArrayIteratorPrototype.h:
* Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.h:
* Source/JavaScriptCore/runtime/IntlLocaleConstructor.h:
* Source/JavaScriptCore/runtime/JSModuleLoader.h:
* Source/JavaScriptCore/runtime/MapConstructor.cpp:
* Source/JavaScriptCore/runtime/MapPrototype.h:
* Source/JavaScriptCore/runtime/RegExpStringIteratorPrototype.h:
* Source/JavaScriptCore/runtime/SetPrototype.h:
* Source/JavaScriptCore/runtime/StringIteratorPrototype.h:
* Source/JavaScriptCore/runtime/Structure.cpp:
(JSC::Structure::validateFlags):
* Source/JavaScriptCore/tools/JSDollarVM.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyArrayConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyArrayConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyArrayPrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyArrayPrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorPrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorPrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyStructConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyStructConstructor.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyStructPrototype.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyStructPrototype.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:
* Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.h:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GeneratePrototypeDeclaration):
* Source/WebCore/bindings/scripts/test/JS/*: Updated.
Canonical link: https://commits.webkit.org/276069@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list