Repository navigation
Commit ed9f215
Alexey Shvayka
[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@main1 parent 942b7ee commit ed9f215
53 files changed
Lines changed: 66 additions & 172 deletions
File tree
- Source
- JavaScriptCore
- runtime
- tools
- wasm/js
- WebCore/bindings/scripts
- test/JS
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 39 | + | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| |||
0 commit comments