12020-03-04 Yusuke Suzuki <ysuzuki@apple.com>
2
3 Put all generated JSCells in WebCore into IsoSubspace
4 https://bugs.webkit.org/show_bug.cgi?id=205107
5
6 Reviewed by NOBODY (OOPS!).
7
8 This patch automatically generates IsoSubspace per WebCore DOM object type.
9 In preprocess-idls.pl, we collect all the DOM object types and generate DOMIsoSubspaces class,
10 which contains all the necessary IsoSubspaces. And it is held by WebCoreJSClientData.
11
12 CodeGeneratorJS.pm starts putting `subspaceFor` and `subspaceForImpl` for each JS DOM wrapper classes.
13 And we dynamically create IsoSubspace and set it to WebCoreJSClientData's DOMIsoSubspaces. At the same
14 time, we register IsoSubspace to m_outputConstraintSpaces if the class has output constraits callback.
15
16 * CMakeLists.txt:
17 * DerivedSources-output.xcfilelist:
18 * DerivedSources.make:
19 * WebCoreMacros.cmake:
20 * bindings/js/JSDOMWrapper.cpp:
21 (WebCore::outputConstraintSubspaceFor): Deleted.
22 * bindings/js/JSDOMWrapper.h:
23 * bindings/js/WebCoreJSClientData.cpp:
24 (WebCore::JSVMClientData::JSVMClientData):
25 * bindings/js/WebCoreJSClientData.h:
26 (WebCore::JSVMClientData::forEachOutputConstraintSpace):
27 (WebCore::JSVMClientData::subspaces):
28 (WebCore::JSVMClientData::outputConstraintSpace): Deleted.
29 (WebCore::JSVMClientData::subspaceForJSDOMWindow): Deleted.
30 (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope): Deleted.
31 (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow): Deleted.
32 (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope): Deleted.
33 (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope): Deleted.
34 (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope): Deleted.
35 (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope): Deleted.
36 * bindings/scripts/CodeGeneratorJS.pm:
37 (GenerateHeader):
38 (GenerateImplementation):
39 * bindings/scripts/generate-bindings-all.pl:
40 * bindings/scripts/preprocess-idls.pl:
41 * bindings/scripts/test/JS/JSInterfaceName.cpp:
42 (WebCore::JSInterfaceName::subspaceForImpl):
43 * bindings/scripts/test/JS/JSInterfaceName.h:
44 (WebCore::JSInterfaceName::subspaceFor):
45 * bindings/scripts/test/JS/JSMapLike.cpp:
46 (WebCore::JSMapLike::subspaceForImpl):
47 * bindings/scripts/test/JS/JSMapLike.h:
48 (WebCore::JSMapLike::subspaceFor):
49 * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
50 (WebCore::JSReadOnlyMapLike::subspaceForImpl):
51 * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
52 (WebCore::JSReadOnlyMapLike::subspaceFor):
53 * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
54 (WebCore::JSReadOnlySetLike::subspaceForImpl):
55 * bindings/scripts/test/JS/JSReadOnlySetLike.h:
56 (WebCore::JSReadOnlySetLike::subspaceFor):
57 * bindings/scripts/test/JS/JSSetLike.cpp:
58 (WebCore::JSSetLike::subspaceForImpl):
59 * bindings/scripts/test/JS/JSSetLike.h:
60 (WebCore::JSSetLike::subspaceFor):
61 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
62 (WebCore::JSTestActiveDOMObject::subspaceForImpl):
63 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
64 (WebCore::JSTestActiveDOMObject::subspaceFor):
65 * bindings/scripts/test/JS/JSTestCEReactions.cpp:
66 (WebCore::JSTestCEReactions::subspaceForImpl):
67 * bindings/scripts/test/JS/JSTestCEReactions.h:
68 (WebCore::JSTestCEReactions::subspaceFor):
69 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
70 (WebCore::JSTestCEReactionsStringifier::subspaceForImpl):
71 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
72 (WebCore::JSTestCEReactionsStringifier::subspaceFor):
73 * bindings/scripts/test/JS/JSTestCallTracer.cpp:
74 (WebCore::JSTestCallTracer::subspaceForImpl):
75 * bindings/scripts/test/JS/JSTestCallTracer.h:
76 (WebCore::JSTestCallTracer::subspaceFor):
77 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
78 (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceForImpl):
79 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
80 (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceFor):
81 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
82 (WebCore::JSTestDOMJIT::subspaceForImpl):
83 * bindings/scripts/test/JS/JSTestDOMJIT.h:
84 (WebCore::JSTestDOMJIT::subspaceFor):
85 * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
86 (WebCore::JSTestEnabledBySetting::subspaceForImpl):
87 * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
88 (WebCore::JSTestEnabledBySetting::subspaceFor):
89 * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
90 (WebCore::JSTestEnabledForContext::subspaceForImpl):
91 * bindings/scripts/test/JS/JSTestEnabledForContext.h:
92 (WebCore::JSTestEnabledForContext::subspaceFor):
93 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
94 (WebCore::JSTestEventConstructor::subspaceForImpl):
95 * bindings/scripts/test/JS/JSTestEventConstructor.h:
96 (WebCore::JSTestEventConstructor::subspaceFor):
97 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
98 (WebCore::JSTestEventTarget::subspaceForImpl):
99 * bindings/scripts/test/JS/JSTestEventTarget.h:
100 (WebCore::JSTestEventTarget::subspaceFor):
101 * bindings/scripts/test/JS/JSTestException.cpp:
102 (WebCore::JSTestException::subspaceForImpl):
103 * bindings/scripts/test/JS/JSTestException.h:
104 (WebCore::JSTestException::subspaceFor):
105 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
106 (WebCore::JSTestGenerateIsReachable::subspaceForImpl):
107 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
108 (WebCore::JSTestGenerateIsReachable::subspaceFor):
109 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
110 (WebCore::JSTestGlobalObject::subspaceForImpl):
111 * bindings/scripts/test/JS/JSTestGlobalObject.h:
112 (WebCore::JSTestGlobalObject::subspaceFor):
113 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
114 (WebCore::JSTestIndexedSetterNoIdentifier::subspaceForImpl):
115 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
116 (WebCore::JSTestIndexedSetterNoIdentifier::subspaceFor):
117 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
118 (WebCore::JSTestIndexedSetterThrowingException::subspaceForImpl):
119 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
120 (WebCore::JSTestIndexedSetterThrowingException::subspaceFor):
121 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
122 (WebCore::JSTestIndexedSetterWithIdentifier::subspaceForImpl):
123 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
124 (WebCore::JSTestIndexedSetterWithIdentifier::subspaceFor):
125 * bindings/scripts/test/JS/JSTestInterface.cpp:
126 (WebCore::JSTestInterface::subspaceForImpl):
127 * bindings/scripts/test/JS/JSTestInterface.h:
128 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
129 (WebCore::JSTestInterfaceLeadingUnderscore::subspaceForImpl):
130 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
131 (WebCore::JSTestInterfaceLeadingUnderscore::subspaceFor):
132 * bindings/scripts/test/JS/JSTestIterable.cpp:
133 (WebCore::JSTestIterable::subspaceForImpl):
134 * bindings/scripts/test/JS/JSTestIterable.h:
135 (WebCore::JSTestIterable::subspaceFor):
136 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
137 (WebCore::JSTestJSBuiltinConstructor::subspaceForImpl):
138 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
139 (WebCore::JSTestJSBuiltinConstructor::subspaceFor):
140 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
141 (WebCore::JSTestMediaQueryListListener::subspaceForImpl):
142 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
143 (WebCore::JSTestMediaQueryListListener::subspaceFor):
144 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
145 (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceForImpl):
146 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
147 (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceFor):
148 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
149 (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceForImpl):
150 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
151 (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceFor):
152 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
153 (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceForImpl):
154 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
155 (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceFor):
156 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
157 (WebCore::JSTestNamedConstructor::subspaceForImpl):
158 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
159 (WebCore::JSTestNamedConstructor::subspaceFor):
160 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
161 (WebCore::JSTestNamedDeleterNoIdentifier::subspaceForImpl):
162 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
163 (WebCore::JSTestNamedDeleterNoIdentifier::subspaceFor):
164 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
165 (WebCore::JSTestNamedDeleterThrowingException::subspaceForImpl):
166 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
167 (WebCore::JSTestNamedDeleterThrowingException::subspaceFor):
168 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
169 (WebCore::JSTestNamedDeleterWithIdentifier::subspaceForImpl):
170 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
171 (WebCore::JSTestNamedDeleterWithIdentifier::subspaceFor):
172 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
173 (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceForImpl):
174 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
175 (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceFor):
176 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
177 (WebCore::JSTestNamedGetterCallWith::subspaceForImpl):
178 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
179 (WebCore::JSTestNamedGetterCallWith::subspaceFor):
180 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
181 (WebCore::JSTestNamedGetterNoIdentifier::subspaceForImpl):
182 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
183 (WebCore::JSTestNamedGetterNoIdentifier::subspaceFor):
184 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
185 (WebCore::JSTestNamedGetterWithIdentifier::subspaceForImpl):
186 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
187 (WebCore::JSTestNamedGetterWithIdentifier::subspaceFor):
188 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
189 (WebCore::JSTestNamedSetterNoIdentifier::subspaceForImpl):
190 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
191 (WebCore::JSTestNamedSetterNoIdentifier::subspaceFor):
192 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
193 (WebCore::JSTestNamedSetterThrowingException::subspaceForImpl):
194 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
195 (WebCore::JSTestNamedSetterThrowingException::subspaceFor):
196 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
197 (WebCore::JSTestNamedSetterWithIdentifier::subspaceForImpl):
198 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
199 (WebCore::JSTestNamedSetterWithIdentifier::subspaceFor):
200 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
201 (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceForImpl):
202 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
203 (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceFor):
204 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
205 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceForImpl):
206 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
207 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceFor):
208 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
209 (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceForImpl):
210 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
211 (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceFor):
212 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
213 (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceForImpl):
214 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
215 (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceFor):
216 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
217 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceForImpl):
218 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
219 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceFor):
220 * bindings/scripts/test/JS/JSTestNode.cpp:
221 (WebCore::JSTestNode::subspaceForImpl):
222 * bindings/scripts/test/JS/JSTestNode.h:
223 * bindings/scripts/test/JS/JSTestObj.cpp:
224 (WebCore::JSTestObj::subspaceForImpl):
225 * bindings/scripts/test/JS/JSTestObj.h:
226 (WebCore::JSTestObj::subspaceFor):
227 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
228 (WebCore::JSTestOverloadedConstructors::subspaceForImpl):
229 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
230 (WebCore::JSTestOverloadedConstructors::subspaceFor):
231 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
232 (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceForImpl):
233 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
234 (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceFor):
235 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
236 (WebCore::JSTestOverrideBuiltins::subspaceForImpl):
237 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
238 (WebCore::JSTestOverrideBuiltins::subspaceFor):
239 * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
240 (WebCore::JSTestPluginInterface::subspaceForImpl):
241 * bindings/scripts/test/JS/JSTestPluginInterface.h:
242 (WebCore::JSTestPluginInterface::subspaceFor):
243 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
244 (WebCore::JSTestPromiseRejectionEvent::subspaceForImpl):
245 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
246 (WebCore::JSTestPromiseRejectionEvent::subspaceFor):
247 * bindings/scripts/test/JS/JSTestSerialization.cpp:
248 (WebCore::JSTestSerialization::subspaceForImpl):
249 * bindings/scripts/test/JS/JSTestSerialization.h:
250 (WebCore::JSTestSerialization::subspaceFor):
251 * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
252 (WebCore::JSTestSerializationIndirectInheritance::subspaceForImpl):
253 * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h:
254 (WebCore::JSTestSerializationIndirectInheritance::subspaceFor):
255 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
256 (WebCore::JSTestSerializationInherit::subspaceForImpl):
257 * bindings/scripts/test/JS/JSTestSerializationInherit.h:
258 (WebCore::JSTestSerializationInherit::subspaceFor):
259 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
260 (WebCore::JSTestSerializationInheritFinal::subspaceForImpl):
261 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
262 (WebCore::JSTestSerializationInheritFinal::subspaceFor):
263 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
264 (WebCore::JSTestSerializedScriptValueInterface::subspaceForImpl):
265 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
266 (WebCore::JSTestSerializedScriptValueInterface::subspaceFor):
267 * bindings/scripts/test/JS/JSTestStringifier.cpp:
268 (WebCore::JSTestStringifier::subspaceForImpl):
269 * bindings/scripts/test/JS/JSTestStringifier.h:
270 (WebCore::JSTestStringifier::subspaceFor):
271 * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
272 (WebCore::JSTestStringifierAnonymousOperation::subspaceForImpl):
273 * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
274 (WebCore::JSTestStringifierAnonymousOperation::subspaceFor):
275 * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
276 (WebCore::JSTestStringifierNamedOperation::subspaceForImpl):
277 * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
278 (WebCore::JSTestStringifierNamedOperation::subspaceFor):
279 * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
280 (WebCore::JSTestStringifierOperationImplementedAs::subspaceForImpl):
281 * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
282 (WebCore::JSTestStringifierOperationImplementedAs::subspaceFor):
283 * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
284 (WebCore::JSTestStringifierOperationNamedToString::subspaceForImpl):
285 * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
286 (WebCore::JSTestStringifierOperationNamedToString::subspaceFor):
287 * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
288 (WebCore::JSTestStringifierReadOnlyAttribute::subspaceForImpl):
289 * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
290 (WebCore::JSTestStringifierReadOnlyAttribute::subspaceFor):
291 * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
292 (WebCore::JSTestStringifierReadWriteAttribute::subspaceForImpl):
293 * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
294 (WebCore::JSTestStringifierReadWriteAttribute::subspaceFor):
295 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
296 (WebCore::JSTestTypedefs::subspaceForImpl):
297 * bindings/scripts/test/JS/JSTestTypedefs.h:
298 (WebCore::JSTestTypedefs::subspaceFor):
299