eda82baadc3c55a4e7981f6acd789c8a202f9b4e
[WebKit-https.git] / Source / WebCore / bindings / scripts / test / JS / JSTestObj.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #include "config.h"
22 #include "JSTestObj.h"
23
24 #include "CallbackFunction.h"
25 #include "CustomElementReactionQueue.h"
26 #include "DOMStringList.h"
27 #include "Dictionary.h"
28 #include "Document.h"
29 #include "Element.h"
30 #include "EventNames.h"
31 #include "ExceptionCode.h"
32 #include "Frame.h"
33 #include "HTMLNames.h"
34 #include "JSBlob.h"
35 #include "JSDOMBinding.h"
36 #include "JSDOMConstructor.h"
37 #include "JSDOMConvert.h"
38 #include "JSDOMIterator.h"
39 #include "JSDOMPromise.h"
40 #include "JSDOMStringList.h"
41 #include "JSDocument.h"
42 #include "JSElement.h"
43 #include "JSEventListener.h"
44 #include "JSFetchRequest.h"
45 #include "JSNode.h"
46 #include "JSSVGDocument.h"
47 #include "JSSVGPoint.h"
48 #include "JSTestCallback.h"
49 #include "JSTestCallbackFunction.h"
50 #include "JSTestNode.h"
51 #include "JSTestObj.h"
52 #include "JSTestSubObj.h"
53 #include "JSXPathNSResolver.h"
54 #include "RuntimeEnabledFeatures.h"
55 #include "SVGDocument.h"
56 #include "SVGPoint.h"
57 #include "SVGStaticPropertyTearOff.h"
58 #include "SerializedScriptValue.h"
59 #include "Settings.h"
60 #include "TestObj.h"
61 #include "URL.h"
62 #include "WebCoreJSClientData.h"
63 #include <inspector/ScriptArguments.h>
64 #include <inspector/ScriptCallStackFactory.h>
65 #include <runtime/Error.h>
66 #include <runtime/FunctionPrototype.h>
67 #include <runtime/JSArray.h>
68 #include <runtime/JSString.h>
69 #include <runtime/ObjectConstructor.h>
70 #include <runtime/PropertyNameArray.h>
71 #include <wtf/GetPtr.h>
72
73 #if ENABLE(Condition1)
74 #include "JSTestObjectA.h"
75 #endif
76
77 #if ENABLE(Condition1) && ENABLE(Condition2)
78 #include "JSTestObjectB.h"
79 #endif
80
81 #if ENABLE(Condition1) || ENABLE(Condition2)
82 #include "JSTestObjectC.h"
83 #endif
84
85 #if ENABLE(Condition3) || ENABLE(Condition4)
86 #include "TestObjBuiltins.h"
87 #endif
88
89 using namespace JSC;
90
91 namespace WebCore {
92
93 template<typename T> Optional<T> parse(ExecState&, JSValue);
94 template<typename T> const char* expectedEnumerationValues();
95
96 JSString* jsStringWithCache(ExecState*, TestObj::EnumType);
97
98 JSString* jsStringWithCache(ExecState* state, TestObj::EnumType enumerationValue)
99 {
100     static NeverDestroyed<const String> values[] = {
101         emptyString(),
102         ASCIILiteral("enumValue1"),
103         ASCIILiteral("EnumValue2"),
104         ASCIILiteral("EnumValue3"),
105     };
106     static_assert(static_cast<size_t>(TestObj::EnumType::EmptyString) == 0, "TestObj::EnumType::EmptyString is not 0 as expected");
107     static_assert(static_cast<size_t>(TestObj::EnumType::EnumValue1) == 1, "TestObj::EnumType::EnumValue1 is not 1 as expected");
108     static_assert(static_cast<size_t>(TestObj::EnumType::EnumValue2) == 2, "TestObj::EnumType::EnumValue2 is not 2 as expected");
109     static_assert(static_cast<size_t>(TestObj::EnumType::EnumValue3) == 3, "TestObj::EnumType::EnumValue3 is not 3 as expected");
110     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
111     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
112 }
113
114 template<> struct JSValueTraits<TestObj::EnumType> {
115     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumType value) { return jsStringWithCache(state, value); }
116 };
117
118 template<> Optional<TestObj::EnumType> parse<TestObj::EnumType>(ExecState& state, JSValue value)
119 {
120     auto stringValue = value.toWTFString(&state);
121     if (stringValue.isEmpty())
122         return TestObj::EnumType::EmptyString;
123     if (stringValue == "enumValue1")
124         return TestObj::EnumType::EnumValue1;
125     if (stringValue == "EnumValue2")
126         return TestObj::EnumType::EnumValue2;
127     if (stringValue == "EnumValue3")
128         return TestObj::EnumType::EnumValue3;
129     return Nullopt;
130 }
131
132 template<> TestObj::EnumType convert<TestObj::EnumType>(ExecState& state, JSValue value)
133 {
134     VM& vm = state.vm();
135     auto throwScope = DECLARE_THROW_SCOPE(vm);
136     auto result = parse<TestObj::EnumType>(state, value);
137     if (UNLIKELY(!result)) {
138         throwTypeError(&state, throwScope);
139         return { };
140     }
141     return result.value();
142 }
143
144 template<> inline const char* expectedEnumerationValues<TestObj::EnumType>()
145 {
146     return "\"\", \"enumValue1\", \"EnumValue2\", \"EnumValue3\"";
147 }
148
149 JSString* jsStringWithCache(ExecState*, TestObj::Optional);
150
151 JSString* jsStringWithCache(ExecState* state, TestObj::Optional enumerationValue)
152 {
153     static NeverDestroyed<const String> values[] = {
154         emptyString(),
155         ASCIILiteral("OptionalValue1"),
156         ASCIILiteral("OptionalValue2"),
157         ASCIILiteral("OptionalValue3"),
158     };
159     static_assert(static_cast<size_t>(TestObj::Optional::EmptyString) == 0, "TestObj::Optional::EmptyString is not 0 as expected");
160     static_assert(static_cast<size_t>(TestObj::Optional::OptionalValue1) == 1, "TestObj::Optional::OptionalValue1 is not 1 as expected");
161     static_assert(static_cast<size_t>(TestObj::Optional::OptionalValue2) == 2, "TestObj::Optional::OptionalValue2 is not 2 as expected");
162     static_assert(static_cast<size_t>(TestObj::Optional::OptionalValue3) == 3, "TestObj::Optional::OptionalValue3 is not 3 as expected");
163     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
164     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
165 }
166
167 template<> struct JSValueTraits<TestObj::Optional> {
168     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Optional value) { return jsStringWithCache(state, value); }
169 };
170
171 template<> Optional<TestObj::Optional> parse<TestObj::Optional>(ExecState& state, JSValue value)
172 {
173     auto stringValue = value.toWTFString(&state);
174     if (stringValue.isEmpty())
175         return TestObj::Optional::EmptyString;
176     if (stringValue == "OptionalValue1")
177         return TestObj::Optional::OptionalValue1;
178     if (stringValue == "OptionalValue2")
179         return TestObj::Optional::OptionalValue2;
180     if (stringValue == "OptionalValue3")
181         return TestObj::Optional::OptionalValue3;
182     return Nullopt;
183 }
184
185 template<> TestObj::Optional convert<TestObj::Optional>(ExecState& state, JSValue value)
186 {
187     VM& vm = state.vm();
188     auto throwScope = DECLARE_THROW_SCOPE(vm);
189     auto result = parse<TestObj::Optional>(state, value);
190     if (UNLIKELY(!result)) {
191         throwTypeError(&state, throwScope);
192         return { };
193     }
194     return result.value();
195 }
196
197 template<> inline const char* expectedEnumerationValues<TestObj::Optional>()
198 {
199     return "\"\", \"OptionalValue1\", \"OptionalValue2\", \"OptionalValue3\"";
200 }
201
202 JSString* jsStringWithCache(ExecState*, AlternateEnumName);
203
204 JSString* jsStringWithCache(ExecState* state, AlternateEnumName enumerationValue)
205 {
206     static NeverDestroyed<const String> values[] = {
207         ASCIILiteral("enumValue1"),
208         ASCIILiteral("EnumValue2"),
209     };
210     static_assert(static_cast<size_t>(AlternateEnumName::EnumValue1) == 0, "AlternateEnumName::EnumValue1 is not 0 as expected");
211     static_assert(static_cast<size_t>(AlternateEnumName::EnumValue2) == 1, "AlternateEnumName::EnumValue2 is not 1 as expected");
212     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
213     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
214 }
215
216 template<> struct JSValueTraits<AlternateEnumName> {
217     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, AlternateEnumName value) { return jsStringWithCache(state, value); }
218 };
219
220 template<> Optional<AlternateEnumName> parse<AlternateEnumName>(ExecState& state, JSValue value)
221 {
222     auto stringValue = value.toWTFString(&state);
223     if (stringValue == "enumValue1")
224         return AlternateEnumName::EnumValue1;
225     if (stringValue == "EnumValue2")
226         return AlternateEnumName::EnumValue2;
227     return Nullopt;
228 }
229
230 template<> AlternateEnumName convert<AlternateEnumName>(ExecState& state, JSValue value)
231 {
232     VM& vm = state.vm();
233     auto throwScope = DECLARE_THROW_SCOPE(vm);
234     auto result = parse<AlternateEnumName>(state, value);
235     if (UNLIKELY(!result)) {
236         throwTypeError(&state, throwScope);
237         return { };
238     }
239     return result.value();
240 }
241
242 template<> inline const char* expectedEnumerationValues<AlternateEnumName>()
243 {
244     return "\"enumValue1\", \"EnumValue2\"";
245 }
246
247 #if ENABLE(Condition1)
248
249 JSString* jsStringWithCache(ExecState*, TestObj::EnumA);
250
251 JSString* jsStringWithCache(ExecState* state, TestObj::EnumA enumerationValue)
252 {
253     static NeverDestroyed<const String> values[] = {
254         ASCIILiteral("A"),
255     };
256     static_assert(static_cast<size_t>(TestObj::EnumA::A) == 0, "TestObj::EnumA::A is not 0 as expected");
257     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
258     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
259 }
260
261 template<> struct JSValueTraits<TestObj::EnumA> {
262     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumA value) { return jsStringWithCache(state, value); }
263 };
264
265 template<> Optional<TestObj::EnumA> parse<TestObj::EnumA>(ExecState& state, JSValue value)
266 {
267     auto stringValue = value.toWTFString(&state);
268     if (stringValue == "A")
269         return TestObj::EnumA::A;
270     return Nullopt;
271 }
272
273 template<> TestObj::EnumA convert<TestObj::EnumA>(ExecState& state, JSValue value)
274 {
275     VM& vm = state.vm();
276     auto throwScope = DECLARE_THROW_SCOPE(vm);
277     auto result = parse<TestObj::EnumA>(state, value);
278     if (UNLIKELY(!result)) {
279         throwTypeError(&state, throwScope);
280         return { };
281     }
282     return result.value();
283 }
284
285 template<> inline const char* expectedEnumerationValues<TestObj::EnumA>()
286 {
287     return "\"A\"";
288 }
289
290 #endif
291
292 #if ENABLE(Condition1) && ENABLE(Condition2)
293
294 JSString* jsStringWithCache(ExecState*, TestObj::EnumB);
295
296 JSString* jsStringWithCache(ExecState* state, TestObj::EnumB enumerationValue)
297 {
298     static NeverDestroyed<const String> values[] = {
299         ASCIILiteral("B"),
300     };
301     static_assert(static_cast<size_t>(TestObj::EnumB::B) == 0, "TestObj::EnumB::B is not 0 as expected");
302     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
303     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
304 }
305
306 template<> struct JSValueTraits<TestObj::EnumB> {
307     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumB value) { return jsStringWithCache(state, value); }
308 };
309
310 template<> Optional<TestObj::EnumB> parse<TestObj::EnumB>(ExecState& state, JSValue value)
311 {
312     auto stringValue = value.toWTFString(&state);
313     if (stringValue == "B")
314         return TestObj::EnumB::B;
315     return Nullopt;
316 }
317
318 template<> TestObj::EnumB convert<TestObj::EnumB>(ExecState& state, JSValue value)
319 {
320     VM& vm = state.vm();
321     auto throwScope = DECLARE_THROW_SCOPE(vm);
322     auto result = parse<TestObj::EnumB>(state, value);
323     if (UNLIKELY(!result)) {
324         throwTypeError(&state, throwScope);
325         return { };
326     }
327     return result.value();
328 }
329
330 template<> inline const char* expectedEnumerationValues<TestObj::EnumB>()
331 {
332     return "\"B\"";
333 }
334
335 #endif
336
337 #if ENABLE(Condition1) || ENABLE(Condition2)
338
339 JSString* jsStringWithCache(ExecState*, TestObj::EnumC);
340
341 JSString* jsStringWithCache(ExecState* state, TestObj::EnumC enumerationValue)
342 {
343     static NeverDestroyed<const String> values[] = {
344         ASCIILiteral("C"),
345     };
346     static_assert(static_cast<size_t>(TestObj::EnumC::C) == 0, "TestObj::EnumC::C is not 0 as expected");
347     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
348     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
349 }
350
351 template<> struct JSValueTraits<TestObj::EnumC> {
352     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::EnumC value) { return jsStringWithCache(state, value); }
353 };
354
355 template<> Optional<TestObj::EnumC> parse<TestObj::EnumC>(ExecState& state, JSValue value)
356 {
357     auto stringValue = value.toWTFString(&state);
358     if (stringValue == "C")
359         return TestObj::EnumC::C;
360     return Nullopt;
361 }
362
363 template<> TestObj::EnumC convert<TestObj::EnumC>(ExecState& state, JSValue value)
364 {
365     VM& vm = state.vm();
366     auto throwScope = DECLARE_THROW_SCOPE(vm);
367     auto result = parse<TestObj::EnumC>(state, value);
368     if (UNLIKELY(!result)) {
369         throwTypeError(&state, throwScope);
370         return { };
371     }
372     return result.value();
373 }
374
375 template<> inline const char* expectedEnumerationValues<TestObj::EnumC>()
376 {
377     return "\"C\"";
378 }
379
380 #endif
381
382 JSString* jsStringWithCache(ExecState*, TestObj::Kind);
383
384 JSString* jsStringWithCache(ExecState* state, TestObj::Kind enumerationValue)
385 {
386     static NeverDestroyed<const String> values[] = {
387         ASCIILiteral("quick"),
388         ASCIILiteral("dead"),
389     };
390     static_assert(static_cast<size_t>(TestObj::Kind::Quick) == 0, "TestObj::Kind::Quick is not 0 as expected");
391     static_assert(static_cast<size_t>(TestObj::Kind::Dead) == 1, "TestObj::Kind::Dead is not 1 as expected");
392     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
393     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
394 }
395
396 template<> struct JSValueTraits<TestObj::Kind> {
397     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Kind value) { return jsStringWithCache(state, value); }
398 };
399
400 template<> Optional<TestObj::Kind> parse<TestObj::Kind>(ExecState& state, JSValue value)
401 {
402     auto stringValue = value.toWTFString(&state);
403     if (stringValue == "quick")
404         return TestObj::Kind::Quick;
405     if (stringValue == "dead")
406         return TestObj::Kind::Dead;
407     return Nullopt;
408 }
409
410 template<> TestObj::Kind convert<TestObj::Kind>(ExecState& state, JSValue value)
411 {
412     VM& vm = state.vm();
413     auto throwScope = DECLARE_THROW_SCOPE(vm);
414     auto result = parse<TestObj::Kind>(state, value);
415     if (UNLIKELY(!result)) {
416         throwTypeError(&state, throwScope);
417         return { };
418     }
419     return result.value();
420 }
421
422 template<> inline const char* expectedEnumerationValues<TestObj::Kind>()
423 {
424     return "\"quick\", \"dead\"";
425 }
426
427 JSString* jsStringWithCache(ExecState*, TestObj::Size);
428
429 JSString* jsStringWithCache(ExecState* state, TestObj::Size enumerationValue)
430 {
431     static NeverDestroyed<const String> values[] = {
432         ASCIILiteral("small"),
433         ASCIILiteral("much-much-larger"),
434     };
435     static_assert(static_cast<size_t>(TestObj::Size::Small) == 0, "TestObj::Size::Small is not 0 as expected");
436     static_assert(static_cast<size_t>(TestObj::Size::MuchMuchLarger) == 1, "TestObj::Size::MuchMuchLarger is not 1 as expected");
437     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
438     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
439 }
440
441 template<> struct JSValueTraits<TestObj::Size> {
442     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Size value) { return jsStringWithCache(state, value); }
443 };
444
445 template<> Optional<TestObj::Size> parse<TestObj::Size>(ExecState& state, JSValue value)
446 {
447     auto stringValue = value.toWTFString(&state);
448     if (stringValue == "small")
449         return TestObj::Size::Small;
450     if (stringValue == "much-much-larger")
451         return TestObj::Size::MuchMuchLarger;
452     return Nullopt;
453 }
454
455 template<> TestObj::Size convert<TestObj::Size>(ExecState& state, JSValue value)
456 {
457     VM& vm = state.vm();
458     auto throwScope = DECLARE_THROW_SCOPE(vm);
459     auto result = parse<TestObj::Size>(state, value);
460     if (UNLIKELY(!result)) {
461         throwTypeError(&state, throwScope);
462         return { };
463     }
464     return result.value();
465 }
466
467 template<> inline const char* expectedEnumerationValues<TestObj::Size>()
468 {
469     return "\"small\", \"much-much-larger\"";
470 }
471
472 JSString* jsStringWithCache(ExecState*, TestObj::Confidence);
473
474 JSString* jsStringWithCache(ExecState* state, TestObj::Confidence enumerationValue)
475 {
476     static NeverDestroyed<const String> values[] = {
477         ASCIILiteral("high"),
478         ASCIILiteral("kinda-low"),
479     };
480     static_assert(static_cast<size_t>(TestObj::Confidence::High) == 0, "TestObj::Confidence::High is not 0 as expected");
481     static_assert(static_cast<size_t>(TestObj::Confidence::KindaLow) == 1, "TestObj::Confidence::KindaLow is not 1 as expected");
482     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
483     return jsStringWithCache(state, values[static_cast<size_t>(enumerationValue)]);
484 }
485
486 template<> struct JSValueTraits<TestObj::Confidence> {
487     static JSString* arrayJSValue(ExecState* state, JSDOMGlobalObject*, TestObj::Confidence value) { return jsStringWithCache(state, value); }
488 };
489
490 template<> Optional<TestObj::Confidence> parse<TestObj::Confidence>(ExecState& state, JSValue value)
491 {
492     auto stringValue = value.toWTFString(&state);
493     if (stringValue == "high")
494         return TestObj::Confidence::High;
495     if (stringValue == "kinda-low")
496         return TestObj::Confidence::KindaLow;
497     return Nullopt;
498 }
499
500 template<> TestObj::Confidence convert<TestObj::Confidence>(ExecState& state, JSValue value)
501 {
502     VM& vm = state.vm();
503     auto throwScope = DECLARE_THROW_SCOPE(vm);
504     auto result = parse<TestObj::Confidence>(state, value);
505     if (UNLIKELY(!result)) {
506         throwTypeError(&state, throwScope);
507         return { };
508     }
509     return result.value();
510 }
511
512 template<> inline const char* expectedEnumerationValues<TestObj::Confidence>()
513 {
514     return "\"high\", \"kinda-low\"";
515 }
516
517 template<> Optional<TestObj::Dictionary> convertDictionary<TestObj::Dictionary>(ExecState& state, JSValue value)
518 {
519     VM& vm = state.vm();
520     auto throwScope = DECLARE_THROW_SCOPE(vm);
521     if (value.isUndefinedOrNull())
522         return TestObj::Dictionary { { }, TestObj::EnumType::EnumValue1, TestObj::EnumType::EmptyString, "defaultString", { }, false, { }, { }, { }, { }, 0, 0, { }, { }, 0, 0, { }, { }, { }, 0, { }, 0, { }, 0, { }, 0, { }, 0, nullptr, jsUndefined(), jsUndefined(), { } };
523     auto* object = value.getObject();
524     if (UNLIKELY(!object || object->type() == RegExpObjectType)) {
525         throwTypeError(&state, throwScope);
526         return Nullopt;
527     }
528     auto enumerationValueWithoutDefault = convertOptional<TestObj::EnumType>(state, object->get(&state, Identifier::fromString(&state, "enumerationValueWithoutDefault")));
529     if (UNLIKELY(throwScope.exception()))
530         return Nullopt;
531     auto enumerationValueWithDefault = convertOptional<TestObj::EnumType>(state, object->get(&state, Identifier::fromString(&state, "enumerationValueWithDefault")), TestObj::EnumType::EnumValue1);
532     if (UNLIKELY(throwScope.exception()))
533         return Nullopt;
534     auto enumerationValueWithEmptyStringDefault = convertOptional<TestObj::EnumType>(state, object->get(&state, Identifier::fromString(&state, "enumerationValueWithEmptyStringDefault")), TestObj::EnumType::EmptyString);
535     if (UNLIKELY(throwScope.exception()))
536         return Nullopt;
537     auto stringWithDefault = convertOptional<String>(state, object->get(&state, Identifier::fromString(&state, "stringWithDefault")), "defaultString");
538     if (UNLIKELY(throwScope.exception()))
539         return Nullopt;
540     auto stringWithoutDefault = convertOptional<String>(state, object->get(&state, Identifier::fromString(&state, "stringWithoutDefault")));
541     if (UNLIKELY(throwScope.exception()))
542         return Nullopt;
543     auto booleanWithDefault = convertOptional<bool>(state, object->get(&state, Identifier::fromString(&state, "booleanWithDefault")), false);
544     if (UNLIKELY(throwScope.exception()))
545         return Nullopt;
546     auto booleanWithoutDefault = convertOptional<bool>(state, object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault")));
547     if (UNLIKELY(throwScope.exception()))
548         return Nullopt;
549     auto sequenceOfStrings = convertOptional<Vector<String>>(state, object->get(&state, Identifier::fromString(&state, "sequenceOfStrings")));
550     if (UNLIKELY(throwScope.exception()))
551         return Nullopt;
552     auto restrictedDouble = convertOptional<double>(state, object->get(&state, Identifier::fromString(&state, "restrictedDouble")), ShouldAllowNonFinite::No);
553     if (UNLIKELY(throwScope.exception()))
554         return Nullopt;
555     auto unrestrictedDouble = convertOptional<double>(state, object->get(&state, Identifier::fromString(&state, "unrestrictedDouble")), ShouldAllowNonFinite::Yes);
556     if (UNLIKELY(throwScope.exception()))
557         return Nullopt;
558     auto restrictedDoubleWithDefault = convertOptional<double>(state, object->get(&state, Identifier::fromString(&state, "restrictedDoubleWithDefault")), ShouldAllowNonFinite::No, 0);
559     if (UNLIKELY(throwScope.exception()))
560         return Nullopt;
561     auto unrestrictedDoubleWithDefault = convertOptional<double>(state, object->get(&state, Identifier::fromString(&state, "unrestrictedDoubleWithDefault")), ShouldAllowNonFinite::Yes, 0);
562     if (UNLIKELY(throwScope.exception()))
563         return Nullopt;
564     auto restrictedFloat = convertOptional<float>(state, object->get(&state, Identifier::fromString(&state, "restrictedFloat")), ShouldAllowNonFinite::No);
565     if (UNLIKELY(throwScope.exception()))
566         return Nullopt;
567     auto unrestrictedFloat = convertOptional<float>(state, object->get(&state, Identifier::fromString(&state, "unrestrictedFloat")), ShouldAllowNonFinite::Yes);
568     if (UNLIKELY(throwScope.exception()))
569         return Nullopt;
570     auto restrictedFloatWithDefault = convertOptional<float>(state, object->get(&state, Identifier::fromString(&state, "restrictedFloatWithDefault")), ShouldAllowNonFinite::No, 0);
571     if (UNLIKELY(throwScope.exception()))
572         return Nullopt;
573     auto unrestrictedFloatWithDefault = convertOptional<float>(state, object->get(&state, Identifier::fromString(&state, "unrestrictedFloatWithDefault")), ShouldAllowNonFinite::Yes, 0);
574     if (UNLIKELY(throwScope.exception()))
575         return Nullopt;
576     auto smallIntegerClamped = convertOptional<int8_t>(state, object->get(&state, Identifier::fromString(&state, "smallIntegerClamped")), Clamp);
577     if (UNLIKELY(throwScope.exception()))
578         return Nullopt;
579     auto smallIntegerWithDefault = convertOptional<int8_t>(state, object->get(&state, Identifier::fromString(&state, "smallIntegerWithDefault")), NormalConversion);
580     if (UNLIKELY(throwScope.exception()))
581         return Nullopt;
582     auto smallUnsignedIntegerEnforcedRange = convertOptional<uint8_t>(state, object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerEnforcedRange")), EnforceRange);
583     if (UNLIKELY(throwScope.exception()))
584         return Nullopt;
585     auto smallUnsignedIntegerWithDefault = convertOptional<uint8_t>(state, object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerWithDefault")), NormalConversion, 0);
586     if (UNLIKELY(throwScope.exception()))
587         return Nullopt;
588     auto integer = convertOptional<int32_t>(state, object->get(&state, Identifier::fromString(&state, "integer")), NormalConversion);
589     if (UNLIKELY(throwScope.exception()))
590         return Nullopt;
591     auto integerWithDefault = convertOptional<int32_t>(state, object->get(&state, Identifier::fromString(&state, "integerWithDefault")), NormalConversion, 0);
592     if (UNLIKELY(throwScope.exception()))
593         return Nullopt;
594     auto unsignedInteger = convertOptional<uint32_t>(state, object->get(&state, Identifier::fromString(&state, "unsignedInteger")), NormalConversion);
595     if (UNLIKELY(throwScope.exception()))
596         return Nullopt;
597     auto unsignedIntegerWithDefault = convertOptional<uint32_t>(state, object->get(&state, Identifier::fromString(&state, "unsignedIntegerWithDefault")), NormalConversion, 0);
598     if (UNLIKELY(throwScope.exception()))
599         return Nullopt;
600     auto largeInteger = convertOptional<int64_t>(state, object->get(&state, Identifier::fromString(&state, "largeInteger")), NormalConversion);
601     if (UNLIKELY(throwScope.exception()))
602         return Nullopt;
603     auto largeIntegerWithDefault = convertOptional<int64_t>(state, object->get(&state, Identifier::fromString(&state, "largeIntegerWithDefault")), NormalConversion, 0);
604     if (UNLIKELY(throwScope.exception()))
605         return Nullopt;
606     auto unsignedLargeInteger = convertOptional<uint64_t>(state, object->get(&state, Identifier::fromString(&state, "unsignedLargeInteger")), NormalConversion);
607     if (UNLIKELY(throwScope.exception()))
608         return Nullopt;
609     auto unsignedLargeIntegerWithDefault = convertOptional<uint64_t>(state, object->get(&state, Identifier::fromString(&state, "unsignedLargeIntegerWithDefault")), NormalConversion, 0);
610     if (UNLIKELY(throwScope.exception()))
611         return Nullopt;
612     auto* nullableNode = convertWrapperType<Node, JSNode>(state, object->get(&state, Identifier::fromString(&state, "nullableNode")), IsNullable::Yes);
613     if (UNLIKELY(throwScope.exception()))
614         return Nullopt;
615     auto anyValue = convertOptional<JSC::JSValue>(state, object->get(&state, Identifier::fromString(&state, "anyValue")), jsUndefined());
616     if (UNLIKELY(throwScope.exception()))
617         return Nullopt;
618     auto anyTypedefValue = convertOptional<JSC::JSValue>(state, object->get(&state, Identifier::fromString(&state, "anyTypedefValue")), jsUndefined());
619     if (UNLIKELY(throwScope.exception()))
620         return Nullopt;
621     auto dictionaryMember = convertDictionary<TestObj::DictionaryThatShouldTolerateNull>(state, object->get(&state, Identifier::fromString(&state, "dictionaryMember")));
622     return TestObj::Dictionary { WTFMove(enumerationValueWithoutDefault), WTFMove(enumerationValueWithDefault), WTFMove(enumerationValueWithEmptyStringDefault), WTFMove(stringWithDefault), WTFMove(stringWithoutDefault), WTFMove(booleanWithDefault), WTFMove(booleanWithoutDefault), WTFMove(sequenceOfStrings), WTFMove(restrictedDouble), WTFMove(unrestrictedDouble), WTFMove(restrictedDoubleWithDefault), WTFMove(unrestrictedDoubleWithDefault), WTFMove(restrictedFloat), WTFMove(unrestrictedFloat), WTFMove(restrictedFloatWithDefault), WTFMove(unrestrictedFloatWithDefault), WTFMove(smallIntegerClamped), WTFMove(smallIntegerWithDefault), WTFMove(smallUnsignedIntegerEnforcedRange), WTFMove(smallUnsignedIntegerWithDefault), WTFMove(integer), WTFMove(integerWithDefault), WTFMove(unsignedInteger), WTFMove(unsignedIntegerWithDefault), WTFMove(largeInteger), WTFMove(largeIntegerWithDefault), WTFMove(unsignedLargeInteger), WTFMove(unsignedLargeIntegerWithDefault), WTFMove(nullableNode), WTFMove(anyValue), WTFMove(anyTypedefValue), dictionaryMember.value() };
623 }
624
625 template<> Optional<TestObj::DictionaryThatShouldNotTolerateNull> convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>(ExecState& state, JSValue value)
626 {
627     VM& vm = state.vm();
628     auto throwScope = DECLARE_THROW_SCOPE(vm);
629     auto* object = value.getObject();
630     if (UNLIKELY(!object || object->type() == RegExpObjectType)) {
631         throwTypeError(&state, throwScope);
632         return Nullopt;
633     }
634     auto requiredEnumerationValue = convert<TestObj::EnumType>(state, object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue")));
635     if (UNLIKELY(throwScope.exception()))
636         return Nullopt;
637     auto booleanWithoutDefault = convertOptional<bool>(state, object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault")));
638     if (UNLIKELY(throwScope.exception()))
639         return Nullopt;
640     auto* nonNullableNode = convertWrapperType<Node, JSNode>(state, object->get(&state, Identifier::fromString(&state, "nonNullableNode")), IsNullable::No);
641     if (UNLIKELY(throwScope.exception()))
642         return Nullopt;
643     auto requiredDictionaryMember = convertDictionary<TestObj::Dictionary>(state, object->get(&state, Identifier::fromString(&state, "requiredDictionaryMember")));
644     return TestObj::DictionaryThatShouldNotTolerateNull { WTFMove(requiredEnumerationValue), WTFMove(booleanWithoutDefault), *nonNullableNode, requiredDictionaryMember.value() };
645 }
646
647 template<> Optional<TestObj::DictionaryThatShouldTolerateNull> convertDictionary<TestObj::DictionaryThatShouldTolerateNull>(ExecState& state, JSValue value)
648 {
649     VM& vm = state.vm();
650     auto throwScope = DECLARE_THROW_SCOPE(vm);
651     if (value.isUndefinedOrNull())
652         return TestObj::DictionaryThatShouldTolerateNull { { }, { } };
653     auto* object = value.getObject();
654     if (UNLIKELY(!object || object->type() == RegExpObjectType)) {
655         throwTypeError(&state, throwScope);
656         return Nullopt;
657     }
658     auto enumerationValue = convertOptional<TestObj::EnumType>(state, object->get(&state, Identifier::fromString(&state, "enumerationValue")));
659     if (UNLIKELY(throwScope.exception()))
660         return Nullopt;
661     auto booleanWithoutDefault = convertOptional<bool>(state, object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault")));
662     return TestObj::DictionaryThatShouldTolerateNull { WTFMove(enumerationValue), WTFMove(booleanWithoutDefault) };
663 }
664
665 template<> Optional<AlternateDictionaryName> convertDictionary<AlternateDictionaryName>(ExecState& state, JSValue value)
666 {
667     VM& vm = state.vm();
668     auto throwScope = DECLARE_THROW_SCOPE(vm);
669     if (value.isUndefinedOrNull())
670         return AlternateDictionaryName { { }, { } };
671     auto* object = value.getObject();
672     if (UNLIKELY(!object || object->type() == RegExpObjectType)) {
673         throwTypeError(&state, throwScope);
674         return Nullopt;
675     }
676     auto enumerationValue = convertOptional<TestObj::EnumType>(state, object->get(&state, Identifier::fromString(&state, "enumerationValue")));
677     if (UNLIKELY(throwScope.exception()))
678         return Nullopt;
679     auto booleanWithoutDefault = convertOptional<bool>(state, object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault")));
680     return AlternateDictionaryName { WTFMove(enumerationValue), WTFMove(booleanWithoutDefault) };
681 }
682
683 // Functions
684
685 #if ENABLE(TEST_FEATURE)
686 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEnabledAtRuntimeOperation(JSC::ExecState*);
687 #endif
688 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(JSC::ExecState*);
689 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(JSC::ExecState*);
690 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(JSC::ExecState*);
691 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(JSC::ExecState*);
692 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(JSC::ExecState*);
693 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(JSC::ExecState*);
694 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(JSC::ExecState*);
695 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(JSC::ExecState*);
696 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(JSC::ExecState*);
697 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(JSC::ExecState*);
698 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjInstanceFunctionUnforgeableMethod(JSC::ExecState*);
699 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString(JSC::ExecState*);
700 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter(JSC::ExecState*);
701 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(JSC::ExecState*);
702 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(JSC::ExecState*);
703 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(JSC::ExecState*);
704 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(JSC::ExecState*);
705 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArg(JSC::ExecState*);
706 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue(JSC::ExecState*);
707 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(JSC::ExecState*);
708 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUSVStringArg(JSC::ExecState*);
709 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg(JSC::ExecState*);
710 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString(JSC::ExecState*);
711 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(JSC::ExecState*);
712 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(JSC::ExecState*);
713 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(JSC::ExecState*);
714 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionWithMessage(JSC::ExecState*);
715 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(JSC::ExecState*);
716 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(JSC::ExecState*);
717 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPrivateMethod(JSC::ExecState*);
718 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPublicAndPrivateMethod(JSC::ExecState*);
719 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(JSC::ExecState*);
720 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(JSC::ExecState*);
721 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(JSC::ExecState*);
722 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(JSC::ExecState*);
723 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(JSC::ExecState*);
724 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(JSC::ExecState*);
725 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(JSC::ExecState*);
726 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(JSC::ExecState*);
727 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(JSC::ExecState*);
728 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(JSC::ExecState*);
729 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(JSC::ExecState*);
730 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDocumentArgument(JSC::ExecState*);
731 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithCallerDocumentArgument(JSC::ExecState*);
732 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithCallerWindowArgument(JSC::ExecState*);
733 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(JSC::ExecState*);
734 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue(JSC::ExecState*);
735 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(JSC::ExecState*);
736 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*);
737 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(JSC::ExecState*);
738 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVString(JSC::ExecState*);
739 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicString(JSC::ExecState*);
740 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue(JSC::ExecState*);
741 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue(JSC::ExecState*);
742 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull(JSC::ExecState*);
743 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(JSC::ExecState*);
744 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull(JSC::ExecState*);
745 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString(JSC::ExecState*);
746 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString(JSC::ExecState*);
747 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString(JSC::ExecState*);
748 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN(JSC::ExecState*);
749 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN(JSC::ExecState*);
750 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLong(JSC::ExecState*);
751 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero(JSC::ExecState*);
752 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong(JSC::ExecState*);
753 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero(JSC::ExecState*);
754 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalSequence(JSC::ExecState*);
755 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty(JSC::ExecState*);
756 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalBoolean(JSC::ExecState*);
757 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse(JSC::ExecState*);
758 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAny(JSC::ExecState*);
759 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper(JSC::ExecState*);
760 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull(JSC::ExecState*);
761 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver(JSC::ExecState*);
762 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*);
763 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*);
764 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*);
765 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg(JSC::ExecState*);
766 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(JSC::ExecState*);
767 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(JSC::ExecState*);
768 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg(JSC::ExecState*);
769 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackArg(JSC::ExecState*);
770 #if ENABLE(Condition1)
771 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(JSC::ExecState*);
772 #endif
773 #if ENABLE(Condition1) && ENABLE(Condition2)
774 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(JSC::ExecState*);
775 #endif
776 #if ENABLE(Condition1) || ENABLE(Condition2)
777 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(JSC::ExecState*);
778 #endif
779 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(JSC::ExecState*);
780 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter(JSC::ExecState*);
781 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(JSC::ExecState*);
782 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(JSC::ExecState*);
783 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod2(JSC::ExecState*);
784 #if ENABLE(Condition1)
785 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(JSC::ExecState*);
786 #endif
787 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(JSC::ExecState*);
788 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithEnforceRange(JSC::ExecState*);
789 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(JSC::ExecState*);
790 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(JSC::ExecState*);
791 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(JSC::ExecState*);
792 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence(JSC::ExecState*);
793 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetElementById(JSC::ExecState*);
794 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(JSC::ExecState*);
795 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(JSC::ExecState*);
796 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(JSC::ExecState*);
797 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert3(JSC::ExecState*);
798 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(JSC::ExecState*);
799 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(JSC::ExecState*);
800 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(JSC::ExecState*);
801 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(JSC::ExecState*);
802 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(JSC::ExecState*);
803 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(JSC::ExecState*);
804 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(JSC::ExecState*);
805 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(JSC::ExecState*);
806 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunction(JSC::ExecState*);
807 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument(JSC::ExecState*);
808 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithException(JSC::ExecState*);
809 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument(JSC::ExecState*);
810 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseOverloadedFunction(JSC::ExecState*);
811 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunction(JSC::ExecState*);
812 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException(JSC::ExecState*);
813 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestCustomPromiseFunction(JSC::ExecState*);
814 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack(JSC::ExecState*);
815 #if ENABLE(CONDITION1) || ENABLE(CONDITION2)
816 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalOverload(JSC::ExecState*);
817 #endif
818 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSingleConditionalOverload(JSC::ExecState*);
819 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAttachShadowRoot(JSC::ExecState*);
820 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToString(JSC::ExecState*);
821
822 // Attributes
823
824 JSC::EncodedJSValue jsTestObjReadOnlyLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
825 JSC::EncodedJSValue jsTestObjReadOnlyStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
826 JSC::EncodedJSValue jsTestObjReadOnlyTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
827 JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
828 JSC::EncodedJSValue jsTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
829 bool setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
830 JSC::EncodedJSValue jsTestObjConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
831 JSC::EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
832 bool setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
833 JSC::EncodedJSValue jsTestObjEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
834 bool setJSTestObjEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
835 JSC::EncodedJSValue jsTestObjByteAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
836 bool setJSTestObjByteAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
837 JSC::EncodedJSValue jsTestObjOctetAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
838 bool setJSTestObjOctetAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
839 JSC::EncodedJSValue jsTestObjShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
840 bool setJSTestObjShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
841 JSC::EncodedJSValue jsTestObjClampedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
842 bool setJSTestObjClampedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
843 JSC::EncodedJSValue jsTestObjEnforceRangeShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
844 bool setJSTestObjEnforceRangeShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
845 JSC::EncodedJSValue jsTestObjUnsignedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
846 bool setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
847 JSC::EncodedJSValue jsTestObjLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
848 bool setJSTestObjLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
849 JSC::EncodedJSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
850 bool setJSTestObjLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
851 JSC::EncodedJSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
852 bool setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
853 JSC::EncodedJSValue jsTestObjStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
854 bool setJSTestObjStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
855 JSC::EncodedJSValue jsTestObjUsvstringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
856 bool setJSTestObjUsvstringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
857 JSC::EncodedJSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
858 bool setJSTestObjTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
859 JSC::EncodedJSValue jsTestObjTestNullableObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
860 bool setJSTestObjTestNullableObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
861 JSC::EncodedJSValue jsTestObjLenientTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
862 bool setJSTestObjLenientTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
863 JSC::EncodedJSValue jsTestObjUnforgeableAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
864 JSC::EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
865 bool setJSTestObjStringAttrTreatingNullAsEmptyString(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
866 JSC::EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
867 bool setJSTestObjUsvstringAttrTreatingNullAsEmptyString(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
868 JSC::EncodedJSValue jsTestObjImplementationEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
869 bool setJSTestObjImplementationEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
870 JSC::EncodedJSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
871 bool setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
872 JSC::EncodedJSValue jsTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
873 bool setJSTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
874 JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
875 bool setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
876 JSC::EncodedJSValue jsTestObjReflectedUSVStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
877 bool setJSTestObjReflectedUSVStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
878 JSC::EncodedJSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
879 bool setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
880 JSC::EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
881 bool setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
882 JSC::EncodedJSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
883 bool setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
884 JSC::EncodedJSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
885 bool setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
886 JSC::EncodedJSValue jsTestObjReflectedUSVURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
887 bool setJSTestObjReflectedUSVURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
888 JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
889 bool setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
890 JSC::EncodedJSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
891 bool setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
892 JSC::EncodedJSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
893 bool setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
894 JSC::EncodedJSValue jsTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
895 bool setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
896 #if ENABLE(TEST_FEATURE)
897 JSC::EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
898 bool setJSTestObjEnabledAtRuntimeAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
899 #endif
900 JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
901 bool setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
902 JSC::EncodedJSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
903 bool setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
904 JSC::EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
905 bool setJSTestObjAttrWithGetterExceptionWithMessage(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
906 JSC::EncodedJSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
907 bool setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
908 JSC::EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
909 bool setJSTestObjAttrWithSetterExceptionWithMessage(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
910 JSC::EncodedJSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
911 bool setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
912 JSC::EncodedJSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
913 bool setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
914 JSC::EncodedJSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
915 bool setJSTestObjCustomAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
916 JSC::EncodedJSValue jsTestObjOnfoo(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
917 bool setJSTestObjOnfoo(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
918 JSC::EncodedJSValue jsTestObjOnwebkitfoo(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
919 bool setJSTestObjOnwebkitfoo(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
920 JSC::EncodedJSValue jsTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
921 bool setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
922 JSC::EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
923 bool setJSTestObjWithCallWithAndSetterCallWithAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
924 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
925 bool setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
926 JSC::EncodedJSValue jsTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
927 bool setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
928 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
929 bool setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
930 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
931 bool setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
932 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
933 bool setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
934 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
935 bool setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
936 JSC::EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
937 bool setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
938 #if ENABLE(Condition1)
939 JSC::EncodedJSValue jsTestObjConditionalAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
940 bool setJSTestObjConditionalAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
941 #endif
942 #if ENABLE(Condition1) && ENABLE(Condition2)
943 JSC::EncodedJSValue jsTestObjConditionalAttr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
944 bool setJSTestObjConditionalAttr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
945 #endif
946 #if ENABLE(Condition1) || ENABLE(Condition2)
947 JSC::EncodedJSValue jsTestObjConditionalAttr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
948 bool setJSTestObjConditionalAttr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
949 #endif
950 #if ENABLE(Condition1)
951 JSC::EncodedJSValue jsTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
952 bool setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
953 #endif
954 #if ENABLE(Condition1) && ENABLE(Condition2)
955 JSC::EncodedJSValue jsTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
956 bool setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
957 #endif
958 #if ENABLE(Condition1) || ENABLE(Condition2)
959 JSC::EncodedJSValue jsTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
960 bool setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
961 #endif
962 JSC::EncodedJSValue jsTestObjCachedAttribute1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
963 JSC::EncodedJSValue jsTestObjCachedAttribute2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
964 JSC::EncodedJSValue jsTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
965 bool setJSTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
966 JSC::EncodedJSValue jsTestObjContentDocument(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
967 JSC::EncodedJSValue jsTestObjMutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
968 bool setJSTestObjMutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
969 JSC::EncodedJSValue jsTestObjImmutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
970 bool setJSTestObjImmutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
971 JSC::EncodedJSValue jsTestObjStrawberry(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
972 bool setJSTestObjStrawberry(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
973 JSC::EncodedJSValue jsTestObjDescription(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
974 JSC::EncodedJSValue jsTestObjId(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
975 bool setJSTestObjId(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
976 JSC::EncodedJSValue jsTestObjHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
977 JSC::EncodedJSValue jsTestObjReplaceableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
978 bool setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
979 JSC::EncodedJSValue jsTestObjNullableDoubleAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
980 JSC::EncodedJSValue jsTestObjNullableLongAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
981 JSC::EncodedJSValue jsTestObjNullableBooleanAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
982 JSC::EncodedJSValue jsTestObjNullableStringAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
983 JSC::EncodedJSValue jsTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
984 bool setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
985 JSC::EncodedJSValue jsTestObjNullableStringSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
986 bool setJSTestObjNullableStringSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
987 JSC::EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
988 bool setJSTestObjNullableUSVStringSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
989 JSC::EncodedJSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
990 bool setJSTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
991 JSC::EncodedJSValue jsTestObjAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
992 JSC::EncodedJSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
993 bool setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
994 JSC::EncodedJSValue jsTestObjPutForwardsAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
995 bool setJSTestObjPutForwardsAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
996 JSC::EncodedJSValue jsTestObjPutForwardsNullableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
997 bool setJSTestObjPutForwardsNullableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
998 JSC::EncodedJSValue jsTestObjStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
999 bool setJSTestObjStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
1000 JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
1001 bool setJSTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
1002
1003 class JSTestObjPrototype : public JSC::JSNonFinalObject {
1004 public:
1005     typedef JSC::JSNonFinalObject Base;
1006     static JSTestObjPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
1007     {
1008         JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure);
1009         ptr->finishCreation(vm);
1010         return ptr;
1011     }
1012
1013     DECLARE_INFO;
1014     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
1015     {
1016         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
1017     }
1018
1019 private:
1020     JSTestObjPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
1021         : JSC::JSNonFinalObject(vm, structure)
1022     {
1023     }
1024
1025     void finishCreation(JSC::VM&);
1026 };
1027
1028 typedef JSDOMConstructor<JSTestObj> JSTestObjConstructor;
1029
1030 /* Hash table */
1031
1032 static const struct CompactHashIndex JSTestObjTableIndex[17] = {
1033     { -1, -1 },
1034     { -1, -1 },
1035     { 5, -1 },
1036     { -1, -1 },
1037     { -1, -1 },
1038     { -1, -1 },
1039     { 4, -1 },
1040     { -1, -1 },
1041     { 1, -1 },
1042     { 2, -1 },
1043     { 0, 16 },
1044     { -1, -1 },
1045     { -1, -1 },
1046     { -1, -1 },
1047     { -1, -1 },
1048     { -1, -1 },
1049     { 3, -1 },
1050 };
1051
1052
1053 static const HashTableValue JSTestObjTableValues[] =
1054 {
1055     { "TestSubObjEnabledBySetting", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestSubObjEnabledBySettingConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestSubObjEnabledBySettingConstructor) } },
1056     { "unforgeableAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnforgeableAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1057 #if ENABLE(Condition1)
1058     { "conditionalAttr4", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr4Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr4Constructor) } },
1059 #else
1060     { 0, 0, NoIntrinsic, { 0, 0 } },
1061 #endif
1062 #if ENABLE(Condition1) && ENABLE(Condition2)
1063     { "conditionalAttr5", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr5Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr5Constructor) } },
1064 #else
1065     { 0, 0, NoIntrinsic, { 0, 0 } },
1066 #endif
1067 #if ENABLE(Condition1) || ENABLE(Condition2)
1068     { "conditionalAttr6", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr6Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr6Constructor) } },
1069 #else
1070     { 0, 0, NoIntrinsic, { 0, 0 } },
1071 #endif
1072     { "unforgeableMethod", DontDelete | ReadOnly | JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjInstanceFunctionUnforgeableMethod), (intptr_t) (0) } },
1073 };
1074
1075 static const HashTable JSTestObjTable = { 6, 15, true, JSTestObjTableValues, JSTestObjTableIndex };
1076 /* Hash table for constructor */
1077
1078 static const HashTableValue JSTestObjConstructorTableValues[] =
1079 {
1080 #if ENABLE(Condition1)
1081     { "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1082 #else
1083     { 0, 0, NoIntrinsic, { 0, 0 } },
1084 #endif
1085     { "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1086     { "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } },
1087     { "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } },
1088     { "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(4) } },
1089     { "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(8) } },
1090     { "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(-1) } },
1091     { "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0xffffffff) } },
1092     { "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x01) } },
1093     { "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0X20) } },
1094     { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x1abc) } },
1095     { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(15) } },
1096     { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1097     { "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1098     { "staticStringAttr", DontDelete, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) } },
1099     { "TestSubObj", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1100     { "nullableStringStaticMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionNullableStringStaticMethod), (intptr_t) (0) } },
1101     { "staticMethodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
1102     { "staticMethodWithCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) } },
1103     { "classMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t) (0) } },
1104     { "classMethodWithOptional", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethodWithOptional), (intptr_t) (0) } },
1105     { "classMethod2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod2), (intptr_t) (1) } },
1106 #if ENABLE(Condition1)
1107     { "overloadedMethod1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionOverloadedMethod1), (intptr_t) (1) } },
1108 #else
1109     { 0, 0, NoIntrinsic, { 0, 0 } },
1110 #endif
1111     { "testStaticPromiseFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionTestStaticPromiseFunction), (intptr_t) (0) } },
1112     { "testStaticPromiseFunctionWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException), (intptr_t) (0) } },
1113 };
1114
1115 #if ENABLE(Condition1)
1116 static_assert(TestObj::CONDITIONAL_CONST == 0, "CONDITIONAL_CONST in TestObj does not match value from IDL");
1117 #endif
1118 static_assert(TestObj::CONST_VALUE_0 == 0, "CONST_VALUE_0 in TestObj does not match value from IDL");
1119 static_assert(TestObj::CONST_VALUE_1 == 1, "CONST_VALUE_1 in TestObj does not match value from IDL");
1120 static_assert(TestObj::CONST_VALUE_2 == 2, "CONST_VALUE_2 in TestObj does not match value from IDL");
1121 static_assert(TestObj::CONST_VALUE_4 == 4, "CONST_VALUE_4 in TestObj does not match value from IDL");
1122 static_assert(TestObj::CONST_VALUE_8 == 8, "CONST_VALUE_8 in TestObj does not match value from IDL");
1123 static_assert(TestObj::CONST_VALUE_9 == -1, "CONST_VALUE_9 in TestObj does not match value from IDL");
1124 static_assert(TestObj::CONST_VALUE_11 == 0xffffffff, "CONST_VALUE_11 in TestObj does not match value from IDL");
1125 static_assert(TestObj::CONST_VALUE_12 == 0x01, "CONST_VALUE_12 in TestObj does not match value from IDL");
1126 static_assert(TestObj::CONST_VALUE_13 == 0X20, "CONST_VALUE_13 in TestObj does not match value from IDL");
1127 static_assert(TestObj::CONST_VALUE_14 == 0x1abc, "CONST_VALUE_14 in TestObj does not match value from IDL");
1128 static_assert(TestObj::CONST_IMPL == 15, "CONST_IMPL in TestObj does not match value from IDL");
1129 static_assert(TestObj::readonly == 0, "readonly in TestObj does not match value from IDL");
1130
1131 template<> EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::construct(ExecState* state)
1132 {
1133     VM& vm = state->vm();
1134     auto throwScope = DECLARE_THROW_SCOPE(vm);
1135     UNUSED_PARAM(throwScope);
1136     auto* castedThis = jsCast<JSTestObjConstructor*>(state->callee());
1137     ASSERT(castedThis);
1138     if (UNLIKELY(state->argumentCount() < 2))
1139         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
1140     if (UNLIKELY(!state->argument(0).isObject()))
1141         return throwArgumentMustBeFunctionError(*state, throwScope, 0, "testCallback", "TestObject", nullptr);
1142     auto testCallback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
1143     if (UNLIKELY(!state->argument(1).isFunction()))
1144         return throwArgumentMustBeFunctionError(*state, throwScope, 1, "testCallbackFunction", "TestObject", nullptr);
1145     auto testCallbackFunction = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject());
1146     ScriptExecutionContext* context = castedThis->scriptExecutionContext();
1147     if (UNLIKELY(!context))
1148         return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, "TestObject");
1149     ASSERT(context->isDocument());
1150     auto& document = downcast<Document>(*context);
1151     auto object = TestObj::create(document, *testCallback, *testCallbackFunction);
1152     return JSValue::encode(toJSNewlyCreated(state, castedThis->globalObject(), WTFMove(object)));
1153 }
1154
1155 template<> JSValue JSTestObjConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
1156 {
1157     UNUSED_PARAM(vm);
1158     return globalObject.functionPrototype();
1159 }
1160
1161 template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
1162 {
1163     putDirect(vm, vm.propertyNames->prototype, JSTestObj::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
1164     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum);
1165     putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
1166     reifyStaticProperties(vm, JSTestObjConstructorTableValues, *this);
1167 }
1168
1169 template<> const ClassInfo JSTestObjConstructor::s_info = { "TestObject", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
1170
1171 /* Hash table for prototype */
1172
1173 static const HashTableValue JSTestObjPrototypeTableValues[] =
1174 {
1175     { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructor) } },
1176     { "readOnlyLongAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1177     { "readOnlyStringAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1178     { "readOnlyTestObjAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1179     { "enumAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnumAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnumAttr) } },
1180     { "byteAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjByteAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjByteAttr) } },
1181     { "octetAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOctetAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOctetAttr) } },
1182     { "shortAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjShortAttr) } },
1183     { "clampedShortAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjClampedShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjClampedShortAttr) } },
1184     { "enforceRangeShortAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnforceRangeShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnforceRangeShortAttr) } },
1185     { "unsignedShortAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedShortAttr) } },
1186     { "longAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongAttr) } },
1187     { "longLongAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongLongAttr) } },
1188     { "unsignedLongLongAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedLongLongAttr) } },
1189     { "stringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttr) } },
1190     { "usvstringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUsvstringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUsvstringAttr) } },
1191     { "testObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestObjAttr) } },
1192     { "testNullableObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestNullableObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestNullableObjAttr) } },
1193     { "lenientTestObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLenientTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLenientTestObjAttr) } },
1194     { "stringAttrTreatingNullAsEmptyString", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrTreatingNullAsEmptyString), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrTreatingNullAsEmptyString) } },
1195     { "usvstringAttrTreatingNullAsEmptyString", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUsvstringAttrTreatingNullAsEmptyString), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUsvstringAttrTreatingNullAsEmptyString) } },
1196     { "implementationEnumAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImplementationEnumAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjImplementationEnumAttr) } },
1197     { "XMLObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjXMLObjAttr) } },
1198     { "create", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCreate) } },
1199     { "reflectedStringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) } },
1200     { "reflectedUSVStringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUSVStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedUSVStringAttr) } },
1201     { "reflectedIntegralAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedIntegralAttr) } },
1202     { "reflectedUnsignedIntegralAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedUnsignedIntegralAttr) } },
1203     { "reflectedBooleanAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedBooleanAttr) } },
1204     { "reflectedURLAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedURLAttr) } },
1205     { "reflectedUSVURLAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUSVURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedUSVURLAttr) } },
1206     { "reflectedStringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) } },
1207     { "reflectedCustomIntegralAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomIntegralAttr) } },
1208     { "reflectedCustomBooleanAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomBooleanAttr) } },
1209     { "reflectedCustomURLAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomURLAttr) } },
1210 #if ENABLE(TEST_FEATURE)
1211     { "enabledAtRuntimeAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnabledAtRuntimeAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnabledAtRuntimeAttribute) } },
1212 #else
1213     { 0, 0, NoIntrinsic, { 0, 0 } },
1214 #endif
1215     { "typedArrayAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTypedArrayAttr) } },
1216     { "attrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithGetterException) } },
1217     { "attrWithGetterExceptionWithMessage", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterExceptionWithMessage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithGetterExceptionWithMessage) } },
1218     { "attrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithSetterException) } },
1219     { "attrWithSetterExceptionWithMessage", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterExceptionWithMessage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithSetterExceptionWithMessage) } },
1220     { "stringAttrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithGetterException) } },
1221     { "stringAttrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithSetterException) } },
1222     { "customAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCustomAttr) } },
1223 #if ENABLE(Condition4)
1224     { "jsBuiltinAttribute", Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinAttributeCodeGenerator), (intptr_t) (setTestObjJsBuiltinAttributeCodeGenerator) } },
1225 #else
1226     { 0, 0, NoIntrinsic, { 0, 0 } },
1227 #endif
1228 #if ENABLE(Condition4)
1229     { "jsBuiltinReadOnlyAttribute", ReadOnly | Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinReadOnlyAttributeCodeGenerator), (intptr_t) (0) } },
1230 #else
1231     { 0, 0, NoIntrinsic, { 0, 0 } },
1232 #endif
1233     { "onfoo", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOnfoo), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOnfoo) } },
1234     { "onwebkitfoo", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOnwebkitfoo), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOnwebkitfoo) } },
1235     { "withScriptStateAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttribute) } },
1236     { "withCallWithAndSetterCallWithAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithCallWithAndSetterCallWithAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithCallWithAndSetterCallWithAttribute) } },
1237     { "withScriptExecutionContextAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttribute) } },
1238     { "withScriptStateAttributeRaises", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttributeRaises) } },
1239     { "withScriptExecutionContextAttributeRaises", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttributeRaises) } },
1240     { "withScriptExecutionContextAndScriptStateAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttribute) } },
1241     { "withScriptExecutionContextAndScriptStateAttributeRaises", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises) } },
1242     { "withScriptExecutionContextAndScriptStateWithSpacesAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute) } },
1243     { "withScriptArgumentsAndCallStackAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptArgumentsAndCallStackAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptArgumentsAndCallStackAttribute) } },
1244 #if ENABLE(Condition1)
1245     { "conditionalAttr1", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr1) } },
1246 #else
1247     { 0, 0, NoIntrinsic, { 0, 0 } },
1248 #endif
1249 #if ENABLE(Condition1) && ENABLE(Condition2)
1250     { "conditionalAttr2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr2) } },
1251 #else
1252     { 0, 0, NoIntrinsic, { 0, 0 } },
1253 #endif
1254 #if ENABLE(Condition1) || ENABLE(Condition2)
1255     { "conditionalAttr3", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr3), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr3) } },
1256 #else
1257     { 0, 0, NoIntrinsic, { 0, 0 } },
1258 #endif
1259     { "cachedAttribute1", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1260     { "cachedAttribute2", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1261     { "anyAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAnyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAnyAttribute) } },
1262     { "contentDocument", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1263     { "mutablePoint", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjMutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjMutablePoint) } },
1264     { "immutablePoint", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImmutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjImmutablePoint) } },
1265     { "strawberry", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrawberry), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrawberry) } },
1266     { "description", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDescription), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1267     { "id", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjId), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjId) } },
1268     { "hash", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1269     { "replaceableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReplaceableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReplaceableAttribute) } },
1270     { "nullableDoubleAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableDoubleAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1271     { "nullableLongAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1272     { "nullableBooleanAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableBooleanAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1273     { "nullableStringAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1274     { "nullableLongSettableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableLongSettableAttribute) } },
1275     { "nullableStringSettableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringSettableAttribute) } },
1276     { "nullableUSVStringSettableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableUSVStringSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableUSVStringSettableAttribute) } },
1277     { "nullableStringValue", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringValue) } },
1278     { "attribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
1279     { "attributeWithReservedEnumType", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) } },
1280     { "putForwardsAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjPutForwardsAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjPutForwardsAttribute) } },
1281     { "putForwardsNullableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjPutForwardsNullableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjPutForwardsNullableAttribute) } },
1282     { "stringifierAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringifierAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringifierAttribute) } },
1283 #if ENABLE(TEST_FEATURE)
1284     { "enabledAtRuntimeOperation", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionEnabledAtRuntimeOperation), (intptr_t) (1) } },
1285 #else
1286     { 0, 0, NoIntrinsic, { 0, 0 } },
1287 #endif
1288     { "voidMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) } },
1289     { "voidMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) } },
1290     { "byteMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethod), (intptr_t) (0) } },
1291     { "byteMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethodWithArgs), (intptr_t) (3) } },
1292     { "octetMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethod), (intptr_t) (0) } },
1293     { "octetMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethodWithArgs), (intptr_t) (3) } },
1294     { "longMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethod), (intptr_t) (0) } },
1295     { "longMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethodWithArgs), (intptr_t) (3) } },
1296     { "objMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t) (0) } },
1297     { "objMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t) (3) } },
1298     { "methodWithArgTreatingNullAsEmptyString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString), (intptr_t) (1) } },
1299     { "methodWithXPathNSResolverParameter", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter), (intptr_t) (1) } },
1300     { "nullableStringMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringMethod), (intptr_t) (0) } },
1301     { "nullableStringSpecialMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringSpecialMethod), (intptr_t) (1) } },
1302     { "methodWithEnumArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithEnumArg), (intptr_t) (1) } },
1303     { "methodWithOptionalEnumArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalEnumArg), (intptr_t) (0) } },
1304     { "methodWithOptionalEnumArgAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue), (intptr_t) (0) } },
1305     { "methodThatRequiresAllArgsAndThrows", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows), (intptr_t) (2) } },
1306     { "methodWithUSVStringArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUSVStringArg), (intptr_t) (1) } },
1307     { "methodWithNullableUSVStringArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg), (intptr_t) (1) } },
1308     { "methodWithUSVStringArgTreatingNullAsEmptyString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString), (intptr_t) (1) } },
1309     { "serializedValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t) (1) } },
1310     { "optionsObject", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOptionsObject), (intptr_t) (1) } },
1311     { "methodWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t) (0) } },
1312     { "methodWithExceptionWithMessage", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithExceptionWithMessage), (intptr_t) (0) } },
1313     { "customMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t) (0) } },
1314     { "customMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t) (3) } },
1315 #if ENABLE(Condition3)
1316     { "jsBuiltinMethod", JSC::Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinMethodCodeGenerator), (intptr_t) (0) } },
1317 #else
1318     { 0, 0, NoIntrinsic, { 0, 0 } },
1319 #endif
1320 #if ENABLE(Condition3)
1321     { "jsBuiltinMethodWithArgs", JSC::Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinMethodWithArgsCodeGenerator), (intptr_t) (3) } },
1322 #else
1323     { 0, 0, NoIntrinsic, { 0, 0 } },
1324 #endif
1325     { "publicAndPrivateMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionPublicAndPrivateMethod), (intptr_t) (1) } },
1326     { "addEventListener", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t) (2) } },
1327     { "removeEventListener", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t) (2) } },
1328     { "withScriptStateVoid", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoid), (intptr_t) (0) } },
1329     { "withScriptStateObj", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObj), (intptr_t) (0) } },
1330     { "withScriptStateVoidException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoidException), (intptr_t) (0) } },
1331     { "withScriptStateObjException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObjException), (intptr_t) (0) } },
1332     { "withScriptExecutionContext", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContext), (intptr_t) (0) } },
1333     { "withScriptExecutionContextAndScriptState", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState), (intptr_t) (0) } },
1334     { "withScriptExecutionContextAndScriptStateObjException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException), (intptr_t) (0) } },
1335     { "withScriptExecutionContextAndScriptStateWithSpaces", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces), (intptr_t) (0) } },
1336     { "withScriptArgumentsAndCallStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack), (intptr_t) (0) } },
1337     { "withDocumentArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithDocumentArgument), (intptr_t) (0) } },
1338     { "withCallerDocumentArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithCallerDocumentArgument), (intptr_t) (0) } },
1339     { "withCallerWindowArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithCallerWindowArgument), (intptr_t) (0) } },
1340     { "methodWithOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t) (0) } },
1341     { "methodWithOptionalArgAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue), (intptr_t) (0) } },
1342     { "methodWithNonOptionalArgAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t) (1) } },
1343     { "methodWithNonOptionalArgAndTwoOptionalArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t) (1) } },
1344     { "methodWithOptionalString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t) (0) } },
1345     { "methodWithOptionalUSVString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalUSVString), (intptr_t) (0) } },
1346     { "methodWithOptionalAtomicString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicString), (intptr_t) (0) } },
1347     { "methodWithOptionalStringAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue), (intptr_t) (0) } },
1348     { "methodWithOptionalAtomicStringAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue), (intptr_t) (0) } },
1349     { "methodWithOptionalStringIsNull", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull), (intptr_t) (0) } },
1350     { "methodWithOptionalStringIsUndefined", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t) (0) } },
1351     { "methodWithOptionalAtomicStringIsNull", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull), (intptr_t) (0) } },
1352     { "methodWithOptionalStringIsEmptyString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString), (intptr_t) (0) } },
1353     { "methodWithOptionalUSVStringIsEmptyString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString), (intptr_t) (0) } },
1354     { "methodWithOptionalAtomicStringIsEmptyString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString), (intptr_t) (0) } },
1355     { "methodWithOptionalDoubleIsNaN", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN), (intptr_t) (0) } },
1356     { "methodWithOptionalFloatIsNaN", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN), (intptr_t) (0) } },
1357     { "methodWithOptionalLongLong", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalLongLong), (intptr_t) (0) } },
1358     { "methodWithOptionalLongLongIsZero", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero), (intptr_t) (0) } },
1359     { "methodWithOptionalUnsignedLongLong", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong), (intptr_t) (0) } },
1360     { "methodWithOptionalUnsignedLongLongIsZero", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero), (intptr_t) (0) } },
1361     { "methodWithOptionalSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalSequence), (intptr_t) (0) } },
1362     { "methodWithOptionalSequenceIsEmpty", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty), (intptr_t) (0) } },
1363     { "methodWithOptionalBoolean", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalBoolean), (intptr_t) (0) } },
1364     { "methodWithOptionalBooleanIsFalse", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse), (intptr_t) (0) } },
1365     { "methodWithOptionalAny", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAny), (intptr_t) (0) } },
1366     { "methodWithOptionalNullableWrapper", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper), (intptr_t) (0) } },
1367     { "methodWithOptionalNullableWrapperIsNull", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull), (intptr_t) (0) } },
1368     { "methodWithOptionalXPathNSResolver", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver), (intptr_t) (0) } },
1369     { "methodWithCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) } },
1370     { "methodWithNonCallbackArgAndCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) } },
1371     { "methodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
1372     { "methodWithCallbackFunctionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg), (intptr_t) (1) } },
1373     { "methodWithNonCallbackArgAndCallbackFunctionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg), (intptr_t) (2) } },
1374     { "methodWithCallbackFunctionAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg), (intptr_t) (0) } },
1375 #if ENABLE(Condition1)
1376     { "conditionalMethod1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) } },
1377 #else
1378     { 0, 0, NoIntrinsic, { 0, 0 } },
1379 #endif
1380 #if ENABLE(Condition1) && ENABLE(Condition2)
1381     { "conditionalMethod2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod2), (intptr_t) (0) } },
1382 #else
1383     { 0, 0, NoIntrinsic, { 0, 0 } },
1384 #endif
1385 #if ENABLE(Condition1) || ENABLE(Condition2)
1386     { "conditionalMethod3", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t) (0) } },
1387 #else
1388     { 0, 0, NoIntrinsic, { 0, 0 } },
1389 #endif
1390     { "overloadedMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t) (0) } },
1391     { "overloadedMethodWithOptionalParameter", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter), (intptr_t) (1) } },
1392     { "classMethodWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t) (2) } },
1393     { "classMethodWithEnforceRange", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithEnforceRange), (intptr_t) (2) } },
1394     { "methodWithUnsignedLongSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence), (intptr_t) (1) } },
1395     { "stringArrayFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStringArrayFunction), (intptr_t) (1) } },
1396     { "domStringListFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionDomStringListFunction), (intptr_t) (1) } },
1397     { "methodWithAndWithoutNullableSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence), (intptr_t) (2) } },
1398     { "getElementById", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetElementById), (intptr_t) (1) } },
1399     { "getSVGDocument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t) (0) } },
1400     { "convert1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t) (1) } },
1401     { "convert2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t) (1) } },
1402     { "convert3", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert3), (intptr_t) (1) } },
1403     { "convert4", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t) (1) } },
1404     { "mutablePointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t) (0) } },
1405     { "immutablePointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionImmutablePointFunction), (intptr_t) (0) } },
1406     { "orange", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOrange), (intptr_t) (0) } },
1407     { "variadicStringMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicStringMethod), (intptr_t) (1) } },
1408     { "variadicDoubleMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicDoubleMethod), (intptr_t) (1) } },
1409     { "variadicNodeMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicNodeMethod), (intptr_t) (1) } },
1410     { "any", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAny), (intptr_t) (2) } },
1411     { "testPromiseFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunction), (intptr_t) (0) } },
1412     { "testPromiseFunctionWithFloatArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument), (intptr_t) (1) } },
1413     { "testPromiseFunctionWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithException), (intptr_t) (0) } },
1414     { "testPromiseFunctionWithOptionalIntArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } },
1415     { "testPromiseOverloadedFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseOverloadedFunction), (intptr_t) (1) } },
1416     { "testCustomPromiseFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestCustomPromiseFunction), (intptr_t) (0) } },
1417     { "methodWithNeedsCustomElementReactionStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack), (intptr_t) (0) } },
1418 #if ENABLE(CONDITION1) || ENABLE(CONDITION2)
1419     { "conditionalOverload", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalOverload), (intptr_t) (1) } },
1420 #else
1421     { 0, 0, NoIntrinsic, { 0, 0 } },
1422 #endif
1423     { "singleConditionalOverload", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSingleConditionalOverload), (intptr_t) (1) } },
1424     { "attachShadowRoot", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAttachShadowRoot), (intptr_t) (1) } },
1425     { "toString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionToString), (intptr_t) (0) } },
1426 #if ENABLE(Condition1)
1427     { "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1428 #else
1429     { 0, 0, NoIntrinsic, { 0, 0 } },
1430 #endif
1431     { "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1432     { "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } },
1433     { "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } },
1434     { "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(4) } },
1435     { "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(8) } },
1436     { "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(-1) } },
1437     { "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0xffffffff) } },
1438     { "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x01) } },
1439     { "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0X20) } },
1440     { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x1abc) } },
1441     { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(15) } },
1442     { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
1443 };
1444
1445 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
1446
1447 void JSTestObjPrototype::finishCreation(VM& vm)
1448 {
1449     Base::finishCreation(vm);
1450     reifyStaticProperties(vm, JSTestObjPrototypeTableValues, *this);
1451 #if ENABLE(TEST_FEATURE)
1452     if (!RuntimeEnabledFeatures::sharedFeatures().testFeatureEnabled()) {
1453         Identifier propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("enabledAtRuntimeOperation"), strlen("enabledAtRuntimeOperation"));
1454         VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
1455         JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
1456     }
1457 #endif
1458 #if ENABLE(TEST_FEATURE)
1459     if (!RuntimeEnabledFeatures::sharedFeatures().testFeatureEnabled()) {
1460         Identifier propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("enabledAtRuntimeAttribute"), strlen("enabledAtRuntimeAttribute"));
1461         VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
1462         JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName);
1463     }
1464 #endif
1465     JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
1466     putDirect(vm, clientData.builtinNames().privateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPrivateMethod), ReadOnly | DontEnum);
1467     putDirect(vm, clientData.builtinNames().publicAndPrivateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPublicAndPrivateMethod), ReadOnly | DontEnum);
1468     if (RuntimeEnabledFeatures::sharedFeatures().domIteratorEnabled()) {
1469         addValueIterableMethods(*globalObject(), *this);
1470     }
1471     JSObject& unscopables = *constructEmptyObject(globalObject()->globalExec(), globalObject()->nullPrototypeObjectStructure());
1472     unscopables.putDirect(vm, Identifier::fromString(&vm, "voidMethod"), jsBoolean(true));
1473     unscopables.putDirect(vm, Identifier::fromString(&vm, "shortAttr"), jsBoolean(true));
1474     putDirectWithoutTransition(vm, vm.propertyNames->unscopablesSymbol, &unscopables, DontEnum | ReadOnly);
1475 }
1476
1477 const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, CREATE_METHOD_TABLE(JSTestObj) };
1478
1479 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestObj>&& impl)
1480     : JSDOMWrapper<TestObj>(structure, globalObject, WTFMove(impl))
1481 {
1482 }
1483
1484 JSObject* JSTestObj::createPrototype(VM& vm, JSGlobalObject* globalObject)
1485 {
1486     return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
1487 }
1488
1489 JSObject* JSTestObj::prototype(VM& vm, JSGlobalObject* globalObject)
1490 {
1491     return getDOMPrototype<JSTestObj>(vm, globalObject);
1492 }
1493
1494 void JSTestObj::destroy(JSC::JSCell* cell)
1495 {
1496     JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
1497     thisObject->JSTestObj::~JSTestObj();
1498 }
1499
1500 bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
1501 {
1502     auto* thisObject = jsCast<JSTestObj*>(object);
1503     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
1504     Optional<uint32_t> optionalIndex = parseIndex(propertyName);
1505     if (optionalIndex) {
1506         unsigned index = optionalIndex.value();
1507         unsigned attributes = ReadOnly;
1508         slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
1509         return true;
1510     }
1511     if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))
1512         return true;
1513     return false;
1514 }
1515
1516 bool JSTestObj::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)
1517 {
1518     auto* thisObject = jsCast<JSTestObj*>(object);
1519     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
1520     if (LIKELY(index <= MAX_ARRAY_INDEX)) {
1521         unsigned attributes = DontDelete | ReadOnly;
1522         slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
1523         return true;
1524     }
1525     return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
1526 }
1527
1528 EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1529 {
1530     VM& vm = state->vm();
1531     auto throwScope = DECLARE_THROW_SCOPE(vm);
1532     UNUSED_PARAM(throwScope);
1533     UNUSED_PARAM(thisValue);
1534     JSValue decodedThisValue = JSValue::decode(thisValue);
1535     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1536     if (UNLIKELY(!castedThis)) {
1537         return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyLongAttr");
1538     }
1539     auto& impl = castedThis->wrapped();
1540     JSValue result = jsNumber(impl.readOnlyLongAttr());
1541     return JSValue::encode(result);
1542 }
1543
1544
1545 EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1546 {
1547     VM& vm = state->vm();
1548     auto throwScope = DECLARE_THROW_SCOPE(vm);
1549     UNUSED_PARAM(throwScope);
1550     UNUSED_PARAM(thisValue);
1551     JSValue decodedThisValue = JSValue::decode(thisValue);
1552     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1553     if (UNLIKELY(!castedThis)) {
1554         return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyStringAttr");
1555     }
1556     auto& impl = castedThis->wrapped();
1557     JSValue result = jsStringWithCache(state, impl.readOnlyStringAttr());
1558     return JSValue::encode(result);
1559 }
1560
1561
1562 EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1563 {
1564     VM& vm = state->vm();
1565     auto throwScope = DECLARE_THROW_SCOPE(vm);
1566     UNUSED_PARAM(throwScope);
1567     UNUSED_PARAM(thisValue);
1568     JSValue decodedThisValue = JSValue::decode(thisValue);
1569     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1570     if (UNLIKELY(!castedThis)) {
1571         return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyTestObjAttr");
1572     }
1573     auto& impl = castedThis->wrapped();
1574     JSValue result = toJS(state, castedThis->globalObject(), impl.readOnlyTestObjAttr());
1575     return JSValue::encode(result);
1576 }
1577
1578
1579 EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1580 {
1581     VM& vm = state->vm();
1582     auto throwScope = DECLARE_THROW_SCOPE(vm);
1583     UNUSED_PARAM(throwScope);
1584     UNUSED_PARAM(thisValue);
1585     JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
1586     return JSValue::encode(result);
1587 }
1588
1589
1590 EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1591 {
1592     VM& vm = state->vm();
1593     auto throwScope = DECLARE_THROW_SCOPE(vm);
1594     UNUSED_PARAM(throwScope);
1595     UNUSED_PARAM(thisValue);
1596     JSValue result = jsStringWithCache(state, TestObj::staticStringAttr());
1597     return JSValue::encode(result);
1598 }
1599
1600
1601 EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
1602 {
1603     VM& vm = state->vm();
1604     auto throwScope = DECLARE_THROW_SCOPE(vm);
1605     UNUSED_PARAM(throwScope);
1606     UNUSED_PARAM(thisValue);
1607     JSValue decodedThisValue = JSValue::decode(thisValue);
1608     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1609     if (UNLIKELY(!castedThis)) {
1610         return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObj");
1611     }
1612     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
1613 }
1614
1615
1616 EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
1617 {
1618     VM& vm = state->vm();
1619     auto throwScope = DECLARE_THROW_SCOPE(vm);
1620     UNUSED_PARAM(throwScope);
1621     UNUSED_PARAM(thisValue);
1622     JSValue decodedThisValue = JSValue::decode(thisValue);
1623     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1624     if (UNLIKELY(!castedThis)) {
1625         return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObjEnabledBySetting");
1626     }
1627     if (UNLIKELY(!castedThis->wrapped().frame()))
1628         return JSValue::encode(jsUndefined());
1629     Settings& settings = castedThis->wrapped().frame()->settings();
1630     if (!settings.testSettingEnabled())
1631         return JSValue::encode(jsUndefined());
1632     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
1633 }
1634
1635
1636 EncodedJSValue jsTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1637 {
1638     VM& vm = state->vm();
1639     auto throwScope = DECLARE_THROW_SCOPE(vm);
1640     UNUSED_PARAM(throwScope);
1641     UNUSED_PARAM(thisValue);
1642     JSValue decodedThisValue = JSValue::decode(thisValue);
1643     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1644     if (UNLIKELY(!castedThis)) {
1645         return throwGetterTypeError(*state, throwScope, "TestObject", "enumAttr");
1646     }
1647     auto& impl = castedThis->wrapped();
1648     JSValue result = jsStringWithCache(state, impl.enumAttr());
1649     return JSValue::encode(result);
1650 }
1651
1652
1653 EncodedJSValue jsTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1654 {
1655     VM& vm = state->vm();
1656     auto throwScope = DECLARE_THROW_SCOPE(vm);
1657     UNUSED_PARAM(throwScope);
1658     UNUSED_PARAM(thisValue);
1659     JSValue decodedThisValue = JSValue::decode(thisValue);
1660     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1661     if (UNLIKELY(!castedThis)) {
1662         return throwGetterTypeError(*state, throwScope, "TestObject", "byteAttr");
1663     }
1664     auto& impl = castedThis->wrapped();
1665     JSValue result = jsNumber(impl.byteAttr());
1666     return JSValue::encode(result);
1667 }
1668
1669
1670 EncodedJSValue jsTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1671 {
1672     VM& vm = state->vm();
1673     auto throwScope = DECLARE_THROW_SCOPE(vm);
1674     UNUSED_PARAM(throwScope);
1675     UNUSED_PARAM(thisValue);
1676     JSValue decodedThisValue = JSValue::decode(thisValue);
1677     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1678     if (UNLIKELY(!castedThis)) {
1679         return throwGetterTypeError(*state, throwScope, "TestObject", "octetAttr");
1680     }
1681     auto& impl = castedThis->wrapped();
1682     JSValue result = jsNumber(impl.octetAttr());
1683     return JSValue::encode(result);
1684 }
1685
1686
1687 EncodedJSValue jsTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1688 {
1689     VM& vm = state->vm();
1690     auto throwScope = DECLARE_THROW_SCOPE(vm);
1691     UNUSED_PARAM(throwScope);
1692     UNUSED_PARAM(thisValue);
1693     JSValue decodedThisValue = JSValue::decode(thisValue);
1694     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1695     if (UNLIKELY(!castedThis)) {
1696         return throwGetterTypeError(*state, throwScope, "TestObject", "shortAttr");
1697     }
1698     auto& impl = castedThis->wrapped();
1699     JSValue result = jsNumber(impl.shortAttr());
1700     return JSValue::encode(result);
1701 }
1702
1703
1704 EncodedJSValue jsTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1705 {
1706     VM& vm = state->vm();
1707     auto throwScope = DECLARE_THROW_SCOPE(vm);
1708     UNUSED_PARAM(throwScope);
1709     UNUSED_PARAM(thisValue);
1710     JSValue decodedThisValue = JSValue::decode(thisValue);
1711     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1712     if (UNLIKELY(!castedThis)) {
1713         return throwGetterTypeError(*state, throwScope, "TestObject", "clampedShortAttr");
1714     }
1715     auto& impl = castedThis->wrapped();
1716     JSValue result = jsNumber(impl.clampedShortAttr());
1717     return JSValue::encode(result);
1718 }
1719
1720
1721 EncodedJSValue jsTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1722 {
1723     VM& vm = state->vm();
1724     auto throwScope = DECLARE_THROW_SCOPE(vm);
1725     UNUSED_PARAM(throwScope);
1726     UNUSED_PARAM(thisValue);
1727     JSValue decodedThisValue = JSValue::decode(thisValue);
1728     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1729     if (UNLIKELY(!castedThis)) {
1730         return throwGetterTypeError(*state, throwScope, "TestObject", "enforceRangeShortAttr");
1731     }
1732     auto& impl = castedThis->wrapped();
1733     JSValue result = jsNumber(impl.enforceRangeShortAttr());
1734     return JSValue::encode(result);
1735 }
1736
1737
1738 EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1739 {
1740     VM& vm = state->vm();
1741     auto throwScope = DECLARE_THROW_SCOPE(vm);
1742     UNUSED_PARAM(throwScope);
1743     UNUSED_PARAM(thisValue);
1744     JSValue decodedThisValue = JSValue::decode(thisValue);
1745     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1746     if (UNLIKELY(!castedThis)) {
1747         return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedShortAttr");
1748     }
1749     auto& impl = castedThis->wrapped();
1750     JSValue result = jsNumber(impl.unsignedShortAttr());
1751     return JSValue::encode(result);
1752 }
1753
1754
1755 EncodedJSValue jsTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1756 {
1757     VM& vm = state->vm();
1758     auto throwScope = DECLARE_THROW_SCOPE(vm);
1759     UNUSED_PARAM(throwScope);
1760     UNUSED_PARAM(thisValue);
1761     JSValue decodedThisValue = JSValue::decode(thisValue);
1762     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1763     if (UNLIKELY(!castedThis)) {
1764         return throwGetterTypeError(*state, throwScope, "TestObject", "longAttr");
1765     }
1766     auto& impl = castedThis->wrapped();
1767     JSValue result = jsNumber(impl.longAttr());
1768     return JSValue::encode(result);
1769 }
1770
1771
1772 EncodedJSValue jsTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1773 {
1774     VM& vm = state->vm();
1775     auto throwScope = DECLARE_THROW_SCOPE(vm);
1776     UNUSED_PARAM(throwScope);
1777     UNUSED_PARAM(thisValue);
1778     JSValue decodedThisValue = JSValue::decode(thisValue);
1779     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1780     if (UNLIKELY(!castedThis)) {
1781         return throwGetterTypeError(*state, throwScope, "TestObject", "longLongAttr");
1782     }
1783     auto& impl = castedThis->wrapped();
1784     JSValue result = jsNumber(impl.longLongAttr());
1785     return JSValue::encode(result);
1786 }
1787
1788
1789 EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1790 {
1791     VM& vm = state->vm();
1792     auto throwScope = DECLARE_THROW_SCOPE(vm);
1793     UNUSED_PARAM(throwScope);
1794     UNUSED_PARAM(thisValue);
1795     JSValue decodedThisValue = JSValue::decode(thisValue);
1796     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1797     if (UNLIKELY(!castedThis)) {
1798         return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedLongLongAttr");
1799     }
1800     auto& impl = castedThis->wrapped();
1801     JSValue result = jsNumber(impl.unsignedLongLongAttr());
1802     return JSValue::encode(result);
1803 }
1804
1805
1806 EncodedJSValue jsTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1807 {
1808     VM& vm = state->vm();
1809     auto throwScope = DECLARE_THROW_SCOPE(vm);
1810     UNUSED_PARAM(throwScope);
1811     UNUSED_PARAM(thisValue);
1812     JSValue decodedThisValue = JSValue::decode(thisValue);
1813     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1814     if (UNLIKELY(!castedThis)) {
1815         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttr");
1816     }
1817     auto& impl = castedThis->wrapped();
1818     JSValue result = jsStringWithCache(state, impl.stringAttr());
1819     return JSValue::encode(result);
1820 }
1821
1822
1823 EncodedJSValue jsTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1824 {
1825     VM& vm = state->vm();
1826     auto throwScope = DECLARE_THROW_SCOPE(vm);
1827     UNUSED_PARAM(throwScope);
1828     UNUSED_PARAM(thisValue);
1829     JSValue decodedThisValue = JSValue::decode(thisValue);
1830     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1831     if (UNLIKELY(!castedThis)) {
1832         return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttr");
1833     }
1834     auto& impl = castedThis->wrapped();
1835     JSValue result = jsStringWithCache(state, impl.usvstringAttr());
1836     return JSValue::encode(result);
1837 }
1838
1839
1840 EncodedJSValue jsTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1841 {
1842     VM& vm = state->vm();
1843     auto throwScope = DECLARE_THROW_SCOPE(vm);
1844     UNUSED_PARAM(throwScope);
1845     UNUSED_PARAM(thisValue);
1846     JSValue decodedThisValue = JSValue::decode(thisValue);
1847     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1848     if (UNLIKELY(!castedThis)) {
1849         return throwGetterTypeError(*state, throwScope, "TestObject", "testObjAttr");
1850     }
1851     auto& impl = castedThis->wrapped();
1852     JSValue result = toJS(state, castedThis->globalObject(), impl.testObjAttr());
1853     return JSValue::encode(result);
1854 }
1855
1856
1857 EncodedJSValue jsTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1858 {
1859     VM& vm = state->vm();
1860     auto throwScope = DECLARE_THROW_SCOPE(vm);
1861     UNUSED_PARAM(throwScope);
1862     UNUSED_PARAM(thisValue);
1863     JSValue decodedThisValue = JSValue::decode(thisValue);
1864     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1865     if (UNLIKELY(!castedThis)) {
1866         return throwGetterTypeError(*state, throwScope, "TestObject", "testNullableObjAttr");
1867     }
1868     auto& impl = castedThis->wrapped();
1869     JSValue result = toJS(state, castedThis->globalObject(), impl.testNullableObjAttr());
1870     return JSValue::encode(result);
1871 }
1872
1873
1874 EncodedJSValue jsTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1875 {
1876     VM& vm = state->vm();
1877     auto throwScope = DECLARE_THROW_SCOPE(vm);
1878     UNUSED_PARAM(throwScope);
1879     UNUSED_PARAM(thisValue);
1880     JSValue decodedThisValue = JSValue::decode(thisValue);
1881     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1882     if (UNLIKELY(!castedThis)) {
1883         return JSValue::encode(jsUndefined());
1884     }
1885     auto& impl = castedThis->wrapped();
1886     JSValue result = toJS(state, castedThis->globalObject(), impl.lenientTestObjAttr());
1887     return JSValue::encode(result);
1888 }
1889
1890
1891 EncodedJSValue jsTestObjUnforgeableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1892 {
1893     VM& vm = state->vm();
1894     auto throwScope = DECLARE_THROW_SCOPE(vm);
1895     UNUSED_PARAM(throwScope);
1896     UNUSED_PARAM(thisValue);
1897     JSValue decodedThisValue = JSValue::decode(thisValue);
1898     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1899     if (UNLIKELY(!castedThis)) {
1900         return throwGetterTypeError(*state, throwScope, "TestObject", "unforgeableAttr");
1901     }
1902     auto& impl = castedThis->wrapped();
1903     JSValue result = jsStringWithCache(state, impl.unforgeableAttr());
1904     return JSValue::encode(result);
1905 }
1906
1907
1908 EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
1909 {
1910     VM& vm = state->vm();
1911     auto throwScope = DECLARE_THROW_SCOPE(vm);
1912     UNUSED_PARAM(throwScope);
1913     UNUSED_PARAM(thisValue);
1914     JSValue decodedThisValue = JSValue::decode(thisValue);
1915     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1916     if (UNLIKELY(!castedThis)) {
1917         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrTreatingNullAsEmptyString");
1918     }
1919     auto& impl = castedThis->wrapped();
1920     JSValue result = jsStringWithCache(state, impl.stringAttrTreatingNullAsEmptyString());
1921     return JSValue::encode(result);
1922 }
1923
1924
1925 EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
1926 {
1927     VM& vm = state->vm();
1928     auto throwScope = DECLARE_THROW_SCOPE(vm);
1929     UNUSED_PARAM(throwScope);
1930     UNUSED_PARAM(thisValue);
1931     JSValue decodedThisValue = JSValue::decode(thisValue);
1932     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1933     if (UNLIKELY(!castedThis)) {
1934         return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttrTreatingNullAsEmptyString");
1935     }
1936     auto& impl = castedThis->wrapped();
1937     JSValue result = jsStringWithCache(state, impl.usvstringAttrTreatingNullAsEmptyString());
1938     return JSValue::encode(result);
1939 }
1940
1941
1942 EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1943 {
1944     VM& vm = state->vm();
1945     auto throwScope = DECLARE_THROW_SCOPE(vm);
1946     UNUSED_PARAM(throwScope);
1947     UNUSED_PARAM(thisValue);
1948     JSValue decodedThisValue = JSValue::decode(thisValue);
1949     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1950     if (UNLIKELY(!castedThis)) {
1951         return throwGetterTypeError(*state, throwScope, "TestObject", "implementationEnumAttr");
1952     }
1953     auto& impl = castedThis->wrapped();
1954     JSValue result = jsStringWithCache(state, impl.implementationEnumAttr());
1955     return JSValue::encode(result);
1956 }
1957
1958
1959 EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1960 {
1961     VM& vm = state->vm();
1962     auto throwScope = DECLARE_THROW_SCOPE(vm);
1963     UNUSED_PARAM(throwScope);
1964     UNUSED_PARAM(thisValue);
1965     JSValue decodedThisValue = JSValue::decode(thisValue);
1966     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1967     if (UNLIKELY(!castedThis)) {
1968         return throwGetterTypeError(*state, throwScope, "TestObject", "XMLObjAttr");
1969     }
1970     auto& impl = castedThis->wrapped();
1971     JSValue result = toJS(state, castedThis->globalObject(), impl.xmlObjAttr());
1972     return JSValue::encode(result);
1973 }
1974
1975
1976 EncodedJSValue jsTestObjCreate(ExecState* state, EncodedJSValue thisValue, PropertyName)
1977 {
1978     VM& vm = state->vm();
1979     auto throwScope = DECLARE_THROW_SCOPE(vm);
1980     UNUSED_PARAM(throwScope);
1981     UNUSED_PARAM(thisValue);
1982     JSValue decodedThisValue = JSValue::decode(thisValue);
1983     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
1984     if (UNLIKELY(!castedThis)) {
1985         return throwGetterTypeError(*state, throwScope, "TestObject", "create");
1986     }
1987     auto& impl = castedThis->wrapped();
1988     JSValue result = jsBoolean(impl.isCreate());
1989     return JSValue::encode(result);
1990 }
1991
1992
1993 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
1994 {
1995     VM& vm = state->vm();
1996     auto throwScope = DECLARE_THROW_SCOPE(vm);
1997     UNUSED_PARAM(throwScope);
1998     UNUSED_PARAM(thisValue);
1999     JSValue decodedThisValue = JSValue::decode(thisValue);
2000     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2001     if (UNLIKELY(!castedThis)) {
2002         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
2003     }
2004     auto& impl = castedThis->wrapped();
2005     JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr));
2006     return JSValue::encode(result);
2007 }
2008
2009
2010 EncodedJSValue jsTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2011 {
2012     VM& vm = state->vm();
2013     auto throwScope = DECLARE_THROW_SCOPE(vm);
2014     UNUSED_PARAM(throwScope);
2015     UNUSED_PARAM(thisValue);
2016     JSValue decodedThisValue = JSValue::decode(thisValue);
2017     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2018     if (UNLIKELY(!castedThis)) {
2019         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVStringAttr");
2020     }
2021     auto& impl = castedThis->wrapped();
2022     JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr));
2023     return JSValue::encode(result);
2024 }
2025
2026
2027 EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2028 {
2029     VM& vm = state->vm();
2030     auto throwScope = DECLARE_THROW_SCOPE(vm);
2031     UNUSED_PARAM(throwScope);
2032     UNUSED_PARAM(thisValue);
2033     JSValue decodedThisValue = JSValue::decode(thisValue);
2034     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2035     if (UNLIKELY(!castedThis)) {
2036         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedIntegralAttr");
2037     }
2038     auto& impl = castedThis->wrapped();
2039     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
2040     return JSValue::encode(result);
2041 }
2042
2043
2044 EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2045 {
2046     VM& vm = state->vm();
2047     auto throwScope = DECLARE_THROW_SCOPE(vm);
2048     UNUSED_PARAM(throwScope);
2049     UNUSED_PARAM(thisValue);
2050     JSValue decodedThisValue = JSValue::decode(thisValue);
2051     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2052     if (UNLIKELY(!castedThis)) {
2053         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUnsignedIntegralAttr");
2054     }
2055     auto& impl = castedThis->wrapped();
2056     JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
2057     return JSValue::encode(result);
2058 }
2059
2060
2061 EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2062 {
2063     VM& vm = state->vm();
2064     auto throwScope = DECLARE_THROW_SCOPE(vm);
2065     UNUSED_PARAM(throwScope);
2066     UNUSED_PARAM(thisValue);
2067     JSValue decodedThisValue = JSValue::decode(thisValue);
2068     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2069     if (UNLIKELY(!castedThis)) {
2070         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedBooleanAttr");
2071     }
2072     auto& impl = castedThis->wrapped();
2073     JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedbooleanattrAttr));
2074     return JSValue::encode(result);
2075 }
2076
2077
2078 EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2079 {
2080     VM& vm = state->vm();
2081     auto throwScope = DECLARE_THROW_SCOPE(vm);
2082     UNUSED_PARAM(throwScope);
2083     UNUSED_PARAM(thisValue);
2084     JSValue decodedThisValue = JSValue::decode(thisValue);
2085     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2086     if (UNLIKELY(!castedThis)) {
2087         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedURLAttr");
2088     }
2089     auto& impl = castedThis->wrapped();
2090     JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
2091     return JSValue::encode(result);
2092 }
2093
2094
2095 EncodedJSValue jsTestObjReflectedUSVURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2096 {
2097     VM& vm = state->vm();
2098     auto throwScope = DECLARE_THROW_SCOPE(vm);
2099     UNUSED_PARAM(throwScope);
2100     UNUSED_PARAM(thisValue);
2101     JSValue decodedThisValue = JSValue::decode(thisValue);
2102     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2103     if (UNLIKELY(!castedThis)) {
2104         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVURLAttr");
2105     }
2106     auto& impl = castedThis->wrapped();
2107     JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedusvurlattrAttr));
2108     return JSValue::encode(result);
2109 }
2110
2111
2112 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2113 {
2114     VM& vm = state->vm();
2115     auto throwScope = DECLARE_THROW_SCOPE(vm);
2116     UNUSED_PARAM(throwScope);
2117     UNUSED_PARAM(thisValue);
2118     JSValue decodedThisValue = JSValue::decode(thisValue);
2119     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2120     if (UNLIKELY(!castedThis)) {
2121         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
2122     }
2123     auto& impl = castedThis->wrapped();
2124     JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr));
2125     return JSValue::encode(result);
2126 }
2127
2128
2129 EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2130 {
2131     VM& vm = state->vm();
2132     auto throwScope = DECLARE_THROW_SCOPE(vm);
2133     UNUSED_PARAM(throwScope);
2134     UNUSED_PARAM(thisValue);
2135     JSValue decodedThisValue = JSValue::decode(thisValue);
2136     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2137     if (UNLIKELY(!castedThis)) {
2138         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomIntegralAttr");
2139     }
2140     auto& impl = castedThis->wrapped();
2141     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
2142     return JSValue::encode(result);
2143 }
2144
2145
2146 EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2147 {
2148     VM& vm = state->vm();
2149     auto throwScope = DECLARE_THROW_SCOPE(vm);
2150     UNUSED_PARAM(throwScope);
2151     UNUSED_PARAM(thisValue);
2152     JSValue decodedThisValue = JSValue::decode(thisValue);
2153     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2154     if (UNLIKELY(!castedThis)) {
2155         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomBooleanAttr");
2156     }
2157     auto& impl = castedThis->wrapped();
2158     JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::customContentBooleanAttrAttr));
2159     return JSValue::encode(result);
2160 }
2161
2162
2163 EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2164 {
2165     VM& vm = state->vm();
2166     auto throwScope = DECLARE_THROW_SCOPE(vm);
2167     UNUSED_PARAM(throwScope);
2168     UNUSED_PARAM(thisValue);
2169     JSValue decodedThisValue = JSValue::decode(thisValue);
2170     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2171     if (UNLIKELY(!castedThis)) {
2172         return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomURLAttr");
2173     }
2174     auto& impl = castedThis->wrapped();
2175     JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
2176     return JSValue::encode(result);
2177 }
2178
2179
2180 #if ENABLE(TEST_FEATURE)
2181 EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2182 {
2183     VM& vm = state->vm();
2184     auto throwScope = DECLARE_THROW_SCOPE(vm);
2185     UNUSED_PARAM(throwScope);
2186     UNUSED_PARAM(thisValue);
2187     JSValue decodedThisValue = JSValue::decode(thisValue);
2188     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2189     if (UNLIKELY(!castedThis)) {
2190         return throwGetterTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeAttribute");
2191     }
2192     auto& impl = castedThis->wrapped();
2193     JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
2194     return JSValue::encode(result);
2195 }
2196
2197 #endif
2198
2199 EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2200 {
2201     VM& vm = state->vm();
2202     auto throwScope = DECLARE_THROW_SCOPE(vm);
2203     UNUSED_PARAM(throwScope);
2204     UNUSED_PARAM(thisValue);
2205     JSValue decodedThisValue = JSValue::decode(thisValue);
2206     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2207     if (UNLIKELY(!castedThis)) {
2208         return throwGetterTypeError(*state, throwScope, "TestObject", "typedArrayAttr");
2209     }
2210     auto& impl = castedThis->wrapped();
2211     JSValue result = toJS(state, castedThis->globalObject(), impl.typedArrayAttr());
2212     return JSValue::encode(result);
2213 }
2214
2215
2216 EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2217 {
2218     VM& vm = state->vm();
2219     auto throwScope = DECLARE_THROW_SCOPE(vm);
2220     UNUSED_PARAM(throwScope);
2221     UNUSED_PARAM(thisValue);
2222     JSValue decodedThisValue = JSValue::decode(thisValue);
2223     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2224     if (UNLIKELY(!castedThis)) {
2225         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterException");
2226     }
2227     ExceptionCode ec = 0;
2228     auto& impl = castedThis->wrapped();
2229     JSValue result = jsNumber(impl.attrWithGetterException(ec));
2230     setDOMException(state, ec);
2231     return JSValue::encode(result);
2232 }
2233
2234
2235 EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
2236 {
2237     VM& vm = state->vm();
2238     auto throwScope = DECLARE_THROW_SCOPE(vm);
2239     UNUSED_PARAM(throwScope);
2240     UNUSED_PARAM(thisValue);
2241     JSValue decodedThisValue = JSValue::decode(thisValue);
2242     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2243     if (UNLIKELY(!castedThis)) {
2244         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterExceptionWithMessage");
2245     }
2246     ExceptionCodeWithMessage ec;
2247     auto& impl = castedThis->wrapped();
2248     JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
2249     setDOMException(state, ec);
2250     return JSValue::encode(result);
2251 }
2252
2253
2254 EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2255 {
2256     VM& vm = state->vm();
2257     auto throwScope = DECLARE_THROW_SCOPE(vm);
2258     UNUSED_PARAM(throwScope);
2259     UNUSED_PARAM(thisValue);
2260     JSValue decodedThisValue = JSValue::decode(thisValue);
2261     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2262     if (UNLIKELY(!castedThis)) {
2263         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterException");
2264     }
2265     auto& impl = castedThis->wrapped();
2266     JSValue result = jsNumber(impl.attrWithSetterException());
2267     return JSValue::encode(result);
2268 }
2269
2270
2271 EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
2272 {
2273     VM& vm = state->vm();
2274     auto throwScope = DECLARE_THROW_SCOPE(vm);
2275     UNUSED_PARAM(throwScope);
2276     UNUSED_PARAM(thisValue);
2277     JSValue decodedThisValue = JSValue::decode(thisValue);
2278     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2279     if (UNLIKELY(!castedThis)) {
2280         return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterExceptionWithMessage");
2281     }
2282     auto& impl = castedThis->wrapped();
2283     JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
2284     return JSValue::encode(result);
2285 }
2286
2287
2288 EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2289 {
2290     VM& vm = state->vm();
2291     auto throwScope = DECLARE_THROW_SCOPE(vm);
2292     UNUSED_PARAM(throwScope);
2293     UNUSED_PARAM(thisValue);
2294     JSValue decodedThisValue = JSValue::decode(thisValue);
2295     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2296     if (UNLIKELY(!castedThis)) {
2297         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithGetterException");
2298     }
2299     ExceptionCode ec = 0;
2300     auto& impl = castedThis->wrapped();
2301     JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
2302     setDOMException(state, ec);
2303     return JSValue::encode(result);
2304 }
2305
2306
2307 EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
2308 {
2309     VM& vm = state->vm();
2310     auto throwScope = DECLARE_THROW_SCOPE(vm);
2311     UNUSED_PARAM(throwScope);
2312     UNUSED_PARAM(thisValue);
2313     JSValue decodedThisValue = JSValue::decode(thisValue);
2314     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2315     if (UNLIKELY(!castedThis)) {
2316         return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithSetterException");
2317     }
2318     auto& impl = castedThis->wrapped();
2319     JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
2320     return JSValue::encode(result);
2321 }
2322
2323
2324 EncodedJSValue jsTestObjCustomAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
2325 {
2326     VM& vm = state->vm();
2327     auto throwScope = DECLARE_THROW_SCOPE(vm);
2328     UNUSED_PARAM(throwScope);
2329     UNUSED_PARAM(thisValue);
2330     JSValue decodedThisValue = JSValue::decode(thisValue);
2331     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2332     if (UNLIKELY(!castedThis)) {
2333         return throwGetterTypeError(*state, throwScope, "TestObject", "customAttr");
2334     }
2335     return JSValue::encode(castedThis->customAttr(*state));
2336 }
2337
2338
2339 EncodedJSValue jsTestObjOnfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
2340 {
2341     VM& vm = state->vm();
2342     auto throwScope = DECLARE_THROW_SCOPE(vm);
2343     UNUSED_PARAM(throwScope);
2344     UNUSED_PARAM(thisValue);
2345     JSValue decodedThisValue = JSValue::decode(thisValue);
2346     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2347     if (UNLIKELY(!castedThis)) {
2348         return throwGetterTypeError(*state, throwScope, "TestObject", "onfoo");
2349     }
2350     UNUSED_PARAM(state);
2351     return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
2352 }
2353
2354
2355 EncodedJSValue jsTestObjOnwebkitfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
2356 {
2357     VM& vm = state->vm();
2358     auto throwScope = DECLARE_THROW_SCOPE(vm);
2359     UNUSED_PARAM(throwScope);
2360     UNUSED_PARAM(thisValue);
2361     JSValue decodedThisValue = JSValue::decode(thisValue);
2362     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2363     if (UNLIKELY(!castedThis)) {
2364         return throwGetterTypeError(*state, throwScope, "TestObject", "onwebkitfoo");
2365     }
2366     UNUSED_PARAM(state);
2367     return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
2368 }
2369
2370
2371 EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2372 {
2373     VM& vm = state->vm();
2374     auto throwScope = DECLARE_THROW_SCOPE(vm);
2375     UNUSED_PARAM(throwScope);
2376     UNUSED_PARAM(thisValue);
2377     JSValue decodedThisValue = JSValue::decode(thisValue);
2378     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2379     if (UNLIKELY(!castedThis)) {
2380         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttribute");
2381     }
2382     auto& impl = castedThis->wrapped();
2383     JSValue result = jsNumber(impl.withScriptStateAttribute(*state));
2384     return JSValue::encode(result);
2385 }
2386
2387
2388 EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2389 {
2390     VM& vm = state->vm();
2391     auto throwScope = DECLARE_THROW_SCOPE(vm);
2392     UNUSED_PARAM(throwScope);
2393     UNUSED_PARAM(thisValue);
2394     JSValue decodedThisValue = JSValue::decode(thisValue);
2395     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2396     if (UNLIKELY(!castedThis)) {
2397         return throwGetterTypeError(*state, throwScope, "TestObject", "withCallWithAndSetterCallWithAttribute");
2398     }
2399     auto& impl = castedThis->wrapped();
2400     JSValue result = jsNumber(impl.withCallWithAndSetterCallWithAttribute(*state));
2401     return JSValue::encode(result);
2402 }
2403
2404
2405 EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2406 {
2407     VM& vm = state->vm();
2408     auto throwScope = DECLARE_THROW_SCOPE(vm);
2409     UNUSED_PARAM(throwScope);
2410     UNUSED_PARAM(thisValue);
2411     JSValue decodedThisValue = JSValue::decode(thisValue);
2412     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2413     if (UNLIKELY(!castedThis)) {
2414         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttribute");
2415     }
2416     auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2417     if (!context)
2418         return JSValue::encode(jsUndefined());
2419     auto& impl = castedThis->wrapped();
2420     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttribute(*context));
2421     return JSValue::encode(result);
2422 }
2423
2424
2425 EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2426 {
2427     VM& vm = state->vm();
2428     auto throwScope = DECLARE_THROW_SCOPE(vm);
2429     UNUSED_PARAM(throwScope);
2430     UNUSED_PARAM(thisValue);
2431     JSValue decodedThisValue = JSValue::decode(thisValue);
2432     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2433     if (UNLIKELY(!castedThis)) {
2434         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttributeRaises");
2435     }
2436     ExceptionCode ec = 0;
2437     auto& impl = castedThis->wrapped();
2438     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
2439     setDOMException(state, ec);
2440     return JSValue::encode(result);
2441 }
2442
2443
2444 EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2445 {
2446     VM& vm = state->vm();
2447     auto throwScope = DECLARE_THROW_SCOPE(vm);
2448     UNUSED_PARAM(throwScope);
2449     UNUSED_PARAM(thisValue);
2450     JSValue decodedThisValue = JSValue::decode(thisValue);
2451     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2452     if (UNLIKELY(!castedThis)) {
2453         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttributeRaises");
2454     }
2455     ExceptionCode ec = 0;
2456     auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2457     if (!context)
2458         return JSValue::encode(jsUndefined());
2459     auto& impl = castedThis->wrapped();
2460     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
2461     setDOMException(state, ec);
2462     return JSValue::encode(result);
2463 }
2464
2465
2466 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2467 {
2468     VM& vm = state->vm();
2469     auto throwScope = DECLARE_THROW_SCOPE(vm);
2470     UNUSED_PARAM(throwScope);
2471     UNUSED_PARAM(thisValue);
2472     JSValue decodedThisValue = JSValue::decode(thisValue);
2473     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2474     if (UNLIKELY(!castedThis)) {
2475         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttribute");
2476     }
2477     auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2478     if (!context)
2479         return JSValue::encode(jsUndefined());
2480     auto& impl = castedThis->wrapped();
2481     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
2482     return JSValue::encode(result);
2483 }
2484
2485
2486 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
2487 {
2488     VM& vm = state->vm();
2489     auto throwScope = DECLARE_THROW_SCOPE(vm);
2490     UNUSED_PARAM(throwScope);
2491     UNUSED_PARAM(thisValue);
2492     JSValue decodedThisValue = JSValue::decode(thisValue);
2493     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2494     if (UNLIKELY(!castedThis)) {
2495         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttributeRaises");
2496     }
2497     ExceptionCode ec = 0;
2498     auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2499     if (!context)
2500         return JSValue::encode(jsUndefined());
2501     auto& impl = castedThis->wrapped();
2502     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
2503     setDOMException(state, ec);
2504     return JSValue::encode(result);
2505 }
2506
2507
2508 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2509 {
2510     VM& vm = state->vm();
2511     auto throwScope = DECLARE_THROW_SCOPE(vm);
2512     UNUSED_PARAM(throwScope);
2513     UNUSED_PARAM(thisValue);
2514     JSValue decodedThisValue = JSValue::decode(thisValue);
2515     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2516     if (UNLIKELY(!castedThis)) {
2517         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
2518     }
2519     auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2520     if (!context)
2521         return JSValue::encode(jsUndefined());
2522     auto& impl = castedThis->wrapped();
2523     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
2524     return JSValue::encode(result);
2525 }
2526
2527
2528 EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2529 {
2530     VM& vm = state->vm();
2531     auto throwScope = DECLARE_THROW_SCOPE(vm);
2532     UNUSED_PARAM(throwScope);
2533     UNUSED_PARAM(thisValue);
2534     JSValue decodedThisValue = JSValue::decode(thisValue);
2535     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2536     if (UNLIKELY(!castedThis)) {
2537         return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptArgumentsAndCallStackAttribute");
2538     }
2539     auto& impl = castedThis->wrapped();
2540     JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
2541     return JSValue::encode(result);
2542 }
2543
2544
2545 #if ENABLE(Condition1)
2546 EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
2547 {
2548     VM& vm = state->vm();
2549     auto throwScope = DECLARE_THROW_SCOPE(vm);
2550     UNUSED_PARAM(throwScope);
2551     UNUSED_PARAM(thisValue);
2552     JSValue decodedThisValue = JSValue::decode(thisValue);
2553     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2554     if (UNLIKELY(!castedThis)) {
2555         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr1");
2556     }
2557     auto& impl = castedThis->wrapped();
2558     JSValue result = jsNumber(impl.conditionalAttr1());
2559     return JSValue::encode(result);
2560 }
2561
2562 #endif
2563
2564 #if ENABLE(Condition1) && ENABLE(Condition2)
2565 EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
2566 {
2567     VM& vm = state->vm();
2568     auto throwScope = DECLARE_THROW_SCOPE(vm);
2569     UNUSED_PARAM(throwScope);
2570     UNUSED_PARAM(thisValue);
2571     JSValue decodedThisValue = JSValue::decode(thisValue);
2572     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2573     if (UNLIKELY(!castedThis)) {
2574         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr2");
2575     }
2576     auto& impl = castedThis->wrapped();
2577     JSValue result = jsNumber(impl.conditionalAttr2());
2578     return JSValue::encode(result);
2579 }
2580
2581 #endif
2582
2583 #if ENABLE(Condition1) || ENABLE(Condition2)
2584 EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
2585 {
2586     VM& vm = state->vm();
2587     auto throwScope = DECLARE_THROW_SCOPE(vm);
2588     UNUSED_PARAM(throwScope);
2589     UNUSED_PARAM(thisValue);
2590     JSValue decodedThisValue = JSValue::decode(thisValue);
2591     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2592     if (UNLIKELY(!castedThis)) {
2593         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr3");
2594     }
2595     auto& impl = castedThis->wrapped();
2596     JSValue result = jsNumber(impl.conditionalAttr3());
2597     return JSValue::encode(result);
2598 }
2599
2600 #endif
2601
2602 #if ENABLE(Condition1)
2603 EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2604 {
2605     VM& vm = state->vm();
2606     auto throwScope = DECLARE_THROW_SCOPE(vm);
2607     UNUSED_PARAM(throwScope);
2608     UNUSED_PARAM(thisValue);
2609     JSValue decodedThisValue = JSValue::decode(thisValue);
2610     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2611     if (UNLIKELY(!castedThis)) {
2612         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr4");
2613     }
2614     return JSValue::encode(JSTestObjectA::getConstructor(state->vm(), castedThis->globalObject()));
2615 }
2616
2617 #endif
2618
2619 #if ENABLE(Condition1) && ENABLE(Condition2)
2620 EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2621 {
2622     VM& vm = state->vm();
2623     auto throwScope = DECLARE_THROW_SCOPE(vm);
2624     UNUSED_PARAM(throwScope);
2625     UNUSED_PARAM(thisValue);
2626     JSValue decodedThisValue = JSValue::decode(thisValue);
2627     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2628     if (UNLIKELY(!castedThis)) {
2629         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr5");
2630     }
2631     return JSValue::encode(JSTestObjectB::getConstructor(state->vm(), castedThis->globalObject()));
2632 }
2633
2634 #endif
2635
2636 #if ENABLE(Condition1) || ENABLE(Condition2)
2637 EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
2638 {
2639     VM& vm = state->vm();
2640     auto throwScope = DECLARE_THROW_SCOPE(vm);
2641     UNUSED_PARAM(throwScope);
2642     UNUSED_PARAM(thisValue);
2643     JSValue decodedThisValue = JSValue::decode(thisValue);
2644     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2645     if (UNLIKELY(!castedThis)) {
2646         return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr6");
2647     }
2648     return JSValue::encode(JSTestObjectC::getConstructor(state->vm(), castedThis->globalObject()));
2649 }
2650
2651 #endif
2652
2653 EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, EncodedJSValue thisValue, PropertyName)
2654 {
2655     VM& vm = state->vm();
2656     auto throwScope = DECLARE_THROW_SCOPE(vm);
2657     UNUSED_PARAM(throwScope);
2658     UNUSED_PARAM(thisValue);
2659     JSValue decodedThisValue = JSValue::decode(thisValue);
2660     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2661     if (UNLIKELY(!castedThis)) {
2662         return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute1");
2663     }
2664     if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
2665         return JSValue::encode(cachedValue);
2666     auto& impl = castedThis->wrapped();
2667     JSValue result = impl.cachedAttribute1();
2668     castedThis->m_cachedAttribute1.set(state->vm(), castedThis, result);
2669     return JSValue::encode(result);
2670 }
2671
2672
2673 EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, EncodedJSValue thisValue, PropertyName)
2674 {
2675     VM& vm = state->vm();
2676     auto throwScope = DECLARE_THROW_SCOPE(vm);
2677     UNUSED_PARAM(throwScope);
2678     UNUSED_PARAM(thisValue);
2679     JSValue decodedThisValue = JSValue::decode(thisValue);
2680     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2681     if (UNLIKELY(!castedThis)) {
2682         return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute2");
2683     }
2684     if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
2685         return JSValue::encode(cachedValue);
2686     auto& impl = castedThis->wrapped();
2687     JSValue result = impl.cachedAttribute2();
2688     castedThis->m_cachedAttribute2.set(state->vm(), castedThis, result);
2689     return JSValue::encode(result);
2690 }
2691
2692
2693 EncodedJSValue jsTestObjAnyAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2694 {
2695     VM& vm = state->vm();
2696     auto throwScope = DECLARE_THROW_SCOPE(vm);
2697     UNUSED_PARAM(throwScope);
2698     UNUSED_PARAM(thisValue);
2699     JSValue decodedThisValue = JSValue::decode(thisValue);
2700     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2701     if (UNLIKELY(!castedThis)) {
2702         return throwGetterTypeError(*state, throwScope, "TestObject", "anyAttribute");
2703     }
2704     auto& impl = castedThis->wrapped();
2705     JSValue result = impl.anyAttribute();
2706     return JSValue::encode(result);
2707 }
2708
2709
2710 EncodedJSValue jsTestObjContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName)
2711 {
2712     VM& vm = state->vm();
2713     auto throwScope = DECLARE_THROW_SCOPE(vm);
2714     UNUSED_PARAM(throwScope);
2715     UNUSED_PARAM(thisValue);
2716     JSValue decodedThisValue = JSValue::decode(thisValue);
2717     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2718     if (UNLIKELY(!castedThis)) {
2719         return throwGetterTypeError(*state, throwScope, "TestObject", "contentDocument");
2720     }
2721     auto& impl = castedThis->wrapped();
2722     return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis->globalObject(), impl.contentDocument()) : jsNull());
2723 }
2724
2725
2726 EncodedJSValue jsTestObjMutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
2727 {
2728     VM& vm = state->vm();
2729     auto throwScope = DECLARE_THROW_SCOPE(vm);
2730     UNUSED_PARAM(throwScope);
2731     UNUSED_PARAM(thisValue);
2732     JSValue decodedThisValue = JSValue::decode(thisValue);
2733     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2734     if (UNLIKELY(!castedThis)) {
2735         return throwGetterTypeError(*state, throwScope, "TestObject", "mutablePoint");
2736     }
2737     auto& impl = castedThis->wrapped();
2738     JSValue result = toJS(state, castedThis->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
2739     return JSValue::encode(result);
2740 }
2741
2742
2743 EncodedJSValue jsTestObjImmutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
2744 {
2745     VM& vm = state->vm();
2746     auto throwScope = DECLARE_THROW_SCOPE(vm);
2747     UNUSED_PARAM(throwScope);
2748     UNUSED_PARAM(thisValue);
2749     JSValue decodedThisValue = JSValue::decode(thisValue);
2750     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2751     if (UNLIKELY(!castedThis)) {
2752         return throwGetterTypeError(*state, throwScope, "TestObject", "immutablePoint");
2753     }
2754     auto& impl = castedThis->wrapped();
2755     JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
2756     return JSValue::encode(result);
2757 }
2758
2759
2760 EncodedJSValue jsTestObjStrawberry(ExecState* state, EncodedJSValue thisValue, PropertyName)
2761 {
2762     VM& vm = state->vm();
2763     auto throwScope = DECLARE_THROW_SCOPE(vm);
2764     UNUSED_PARAM(throwScope);
2765     UNUSED_PARAM(thisValue);
2766     JSValue decodedThisValue = JSValue::decode(thisValue);
2767     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2768     if (UNLIKELY(!castedThis)) {
2769         return throwGetterTypeError(*state, throwScope, "TestObject", "strawberry");
2770     }
2771     auto& impl = castedThis->wrapped();
2772     JSValue result = jsNumber(impl.blueberry());
2773     return JSValue::encode(result);
2774 }
2775
2776
2777 EncodedJSValue jsTestObjDescription(ExecState* state, EncodedJSValue thisValue, PropertyName)
2778 {
2779     VM& vm = state->vm();
2780     auto throwScope = DECLARE_THROW_SCOPE(vm);
2781     UNUSED_PARAM(throwScope);
2782     UNUSED_PARAM(thisValue);
2783     JSValue decodedThisValue = JSValue::decode(thisValue);
2784     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2785     if (UNLIKELY(!castedThis)) {
2786         return throwGetterTypeError(*state, throwScope, "TestObject", "description");
2787     }
2788     auto& impl = castedThis->wrapped();
2789     JSValue result = jsNumber(impl.description());
2790     return JSValue::encode(result);
2791 }
2792
2793
2794 EncodedJSValue jsTestObjId(ExecState* state, EncodedJSValue thisValue, PropertyName)
2795 {
2796     VM& vm = state->vm();
2797     auto throwScope = DECLARE_THROW_SCOPE(vm);
2798     UNUSED_PARAM(throwScope);
2799     UNUSED_PARAM(thisValue);
2800     JSValue decodedThisValue = JSValue::decode(thisValue);
2801     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2802     if (UNLIKELY(!castedThis)) {
2803         return throwGetterTypeError(*state, throwScope, "TestObject", "id");
2804     }
2805     auto& impl = castedThis->wrapped();
2806     JSValue result = jsNumber(impl.id());
2807     return JSValue::encode(result);
2808 }
2809
2810
2811 EncodedJSValue jsTestObjHash(ExecState* state, EncodedJSValue thisValue, PropertyName)
2812 {
2813     VM& vm = state->vm();
2814     auto throwScope = DECLARE_THROW_SCOPE(vm);
2815     UNUSED_PARAM(throwScope);
2816     UNUSED_PARAM(thisValue);
2817     JSValue decodedThisValue = JSValue::decode(thisValue);
2818     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2819     if (UNLIKELY(!castedThis)) {
2820         return throwGetterTypeError(*state, throwScope, "TestObject", "hash");
2821     }
2822     auto& impl = castedThis->wrapped();
2823     JSValue result = jsStringWithCache(state, impl.hash());
2824     return JSValue::encode(result);
2825 }
2826
2827
2828 EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2829 {
2830     VM& vm = state->vm();
2831     auto throwScope = DECLARE_THROW_SCOPE(vm);
2832     UNUSED_PARAM(throwScope);
2833     UNUSED_PARAM(thisValue);
2834     JSValue decodedThisValue = JSValue::decode(thisValue);
2835     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2836     if (UNLIKELY(!castedThis)) {
2837         return throwGetterTypeError(*state, throwScope, "TestObject", "replaceableAttribute");
2838     }
2839     auto& impl = castedThis->wrapped();
2840     JSValue result = jsNumber(impl.replaceableAttribute());
2841     return JSValue::encode(result);
2842 }
2843
2844
2845 EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2846 {
2847     VM& vm = state->vm();
2848     auto throwScope = DECLARE_THROW_SCOPE(vm);
2849     UNUSED_PARAM(throwScope);
2850     UNUSED_PARAM(thisValue);
2851     JSValue decodedThisValue = JSValue::decode(thisValue);
2852     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2853     if (UNLIKELY(!castedThis)) {
2854         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableDoubleAttribute");
2855     }
2856     auto& impl = castedThis->wrapped();
2857     JSValue result = toNullableJSNumber(impl.nullableDoubleAttribute());
2858     return JSValue::encode(result);
2859 }
2860
2861
2862 EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2863 {
2864     VM& vm = state->vm();
2865     auto throwScope = DECLARE_THROW_SCOPE(vm);
2866     UNUSED_PARAM(throwScope);
2867     UNUSED_PARAM(thisValue);
2868     JSValue decodedThisValue = JSValue::decode(thisValue);
2869     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2870     if (UNLIKELY(!castedThis)) {
2871         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongAttribute");
2872     }
2873     auto& impl = castedThis->wrapped();
2874     JSValue result = toNullableJSNumber(impl.nullableLongAttribute());
2875     return JSValue::encode(result);
2876 }
2877
2878
2879 EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2880 {
2881     VM& vm = state->vm();
2882     auto throwScope = DECLARE_THROW_SCOPE(vm);
2883     UNUSED_PARAM(throwScope);
2884     UNUSED_PARAM(thisValue);
2885     JSValue decodedThisValue = JSValue::decode(thisValue);
2886     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2887     if (UNLIKELY(!castedThis)) {
2888         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableBooleanAttribute");
2889     }
2890     auto& impl = castedThis->wrapped();
2891     JSValue result = jsBoolean(impl.nullableBooleanAttribute());
2892     return JSValue::encode(result);
2893 }
2894
2895
2896 EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2897 {
2898     VM& vm = state->vm();
2899     auto throwScope = DECLARE_THROW_SCOPE(vm);
2900     UNUSED_PARAM(throwScope);
2901     UNUSED_PARAM(thisValue);
2902     JSValue decodedThisValue = JSValue::decode(thisValue);
2903     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2904     if (UNLIKELY(!castedThis)) {
2905         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringAttribute");
2906     }
2907     auto& impl = castedThis->wrapped();
2908     JSValue result = jsStringOrNull(state, impl.nullableStringAttribute());
2909     return JSValue::encode(result);
2910 }
2911
2912
2913 EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2914 {
2915     VM& vm = state->vm();
2916     auto throwScope = DECLARE_THROW_SCOPE(vm);
2917     UNUSED_PARAM(throwScope);
2918     UNUSED_PARAM(thisValue);
2919     JSValue decodedThisValue = JSValue::decode(thisValue);
2920     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2921     if (UNLIKELY(!castedThis)) {
2922         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongSettableAttribute");
2923     }
2924     auto& impl = castedThis->wrapped();
2925     JSValue result = toNullableJSNumber(impl.nullableLongSettableAttribute());
2926     return JSValue::encode(result);
2927 }
2928
2929
2930 EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2931 {
2932     VM& vm = state->vm();
2933     auto throwScope = DECLARE_THROW_SCOPE(vm);
2934     UNUSED_PARAM(throwScope);
2935     UNUSED_PARAM(thisValue);
2936     JSValue decodedThisValue = JSValue::decode(thisValue);
2937     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2938     if (UNLIKELY(!castedThis)) {
2939         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringSettableAttribute");
2940     }
2941     auto& impl = castedThis->wrapped();
2942     JSValue result = jsStringOrNull(state, impl.nullableStringSettableAttribute());
2943     return JSValue::encode(result);
2944 }
2945
2946
2947 EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2948 {
2949     VM& vm = state->vm();
2950     auto throwScope = DECLARE_THROW_SCOPE(vm);
2951     UNUSED_PARAM(throwScope);
2952     UNUSED_PARAM(thisValue);
2953     JSValue decodedThisValue = JSValue::decode(thisValue);
2954     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2955     if (UNLIKELY(!castedThis)) {
2956         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableUSVStringSettableAttribute");
2957     }
2958     auto& impl = castedThis->wrapped();
2959     JSValue result = jsStringOrNull(state, impl.nullableUSVStringSettableAttribute());
2960     return JSValue::encode(result);
2961 }
2962
2963
2964 EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
2965 {
2966     VM& vm = state->vm();
2967     auto throwScope = DECLARE_THROW_SCOPE(vm);
2968     UNUSED_PARAM(throwScope);
2969     UNUSED_PARAM(thisValue);
2970     JSValue decodedThisValue = JSValue::decode(thisValue);
2971     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2972     if (UNLIKELY(!castedThis)) {
2973         return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringValue");
2974     }
2975     ExceptionCode ec = 0;
2976     auto& impl = castedThis->wrapped();
2977     JSValue result = toNullableJSNumber(impl.nullableStringValue(ec));
2978     setDOMException(state, ec);
2979     return JSValue::encode(result);
2980 }
2981
2982
2983 EncodedJSValue jsTestObjAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
2984 {
2985     VM& vm = state->vm();
2986     auto throwScope = DECLARE_THROW_SCOPE(vm);
2987     UNUSED_PARAM(throwScope);
2988     UNUSED_PARAM(thisValue);
2989     JSValue decodedThisValue = JSValue::decode(thisValue);
2990     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
2991     if (UNLIKELY(!castedThis)) {
2992         return throwGetterTypeError(*state, throwScope, "TestObject", "attribute");
2993     }
2994     auto& impl = castedThis->wrapped();
2995     JSValue result = jsStringWithCache(state, impl.attribute());
2996     return JSValue::encode(result);
2997 }
2998
2999
3000 EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, EncodedJSValue thisValue, PropertyName)
3001 {
3002     VM& vm = state->vm();
3003     auto throwScope = DECLARE_THROW_SCOPE(vm);
3004     UNUSED_PARAM(throwScope);
3005     UNUSED_PARAM(thisValue);
3006     JSValue decodedThisValue = JSValue::decode(thisValue);
3007     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
3008     if (UNLIKELY(!castedThis)) {
3009         return throwGetterTypeError(*state, throwScope, "TestObject", "attributeWithReservedEnumType");
3010     }
3011     auto& impl = castedThis->wrapped();
3012     JSValue result = jsStringWithCache(state, impl.attributeWithReservedEnumType());
3013     return JSValue::encode(result);
3014 }
3015
3016
3017 EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3018 {
3019     VM& vm = state->vm();
3020     auto throwScope = DECLARE_THROW_SCOPE(vm);
3021     UNUSED_PARAM(throwScope);
3022     UNUSED_PARAM(thisValue);
3023     JSValue decodedThisValue = JSValue::decode(thisValue);
3024     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
3025     if (UNLIKELY(!castedThis)) {
3026         return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsAttribute");
3027     }
3028     auto& impl = castedThis->wrapped();
3029     JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsAttribute());
3030     return JSValue::encode(result);
3031 }
3032
3033
3034 EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3035 {
3036     VM& vm = state->vm();
3037     auto throwScope = DECLARE_THROW_SCOPE(vm);
3038     UNUSED_PARAM(throwScope);
3039     UNUSED_PARAM(thisValue);
3040     JSValue decodedThisValue = JSValue::decode(thisValue);
3041     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
3042     if (UNLIKELY(!castedThis)) {
3043         return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsNullableAttribute");
3044     }
3045     auto& impl = castedThis->wrapped();
3046     JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsNullableAttribute());
3047     return JSValue::encode(result);
3048 }
3049
3050
3051 EncodedJSValue jsTestObjStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
3052 {
3053     VM& vm = state->vm();
3054     auto throwScope = DECLARE_THROW_SCOPE(vm);
3055     UNUSED_PARAM(throwScope);
3056     UNUSED_PARAM(thisValue);
3057     JSValue decodedThisValue = JSValue::decode(thisValue);
3058     auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
3059     if (UNLIKELY(!castedThis)) {
3060         return throwGetterTypeError(*state, throwScope, "TestObject", "stringifierAttribute");
3061     }
3062     auto& impl = castedThis->wrapped();
3063     JSValue result = jsStringWithCache(state, impl.stringifierAttribute());
3064     return JSValue::encode(result);
3065 }
3066
3067
3068 EncodedJSValue jsTestObjConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
3069 {
3070     VM& vm = state->vm();
3071     auto throwScope = DECLARE_THROW_SCOPE(vm);
3072     JSTestObjPrototype* domObject = jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue));
3073     if (UNLIKELY(!domObject))
3074         return throwVMTypeError(state, throwScope);
3075     return JSValue::encode(JSTestObj::getConstructor(state->vm(), domObject->globalObject()));
3076 }
3077
3078 bool setJSTestObjConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3079 {
3080     VM& vm = state->vm();
3081     auto throwScope = DECLARE_THROW_SCOPE(vm);
3082     JSValue value = JSValue::decode(encodedValue);
3083     JSTestObjPrototype* domObject = jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue));
3084     if (UNLIKELY(!domObject)) {
3085         throwVMTypeError(state, throwScope);
3086         return false;
3087     }
3088     // Shadowing a built-in constructor
3089     return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
3090 }
3091
3092 bool setJSTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3093 {
3094     VM& vm = state->vm();
3095     auto throwScope = DECLARE_THROW_SCOPE(vm);
3096     UNUSED_PARAM(throwScope);
3097     JSValue value = JSValue::decode(encodedValue);
3098     auto nativeValue = value.toWTFString(state);
3099     if (UNLIKELY(throwScope.exception()))
3100         return false;
3101     TestObj::setStaticStringAttr(WTFMove(nativeValue));
3102     return true;
3103 }
3104
3105
3106 bool setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3107 {
3108     VM& vm = state->vm();
3109     auto throwScope = DECLARE_THROW_SCOPE(vm);
3110     UNUSED_PARAM(throwScope);
3111     JSValue value = JSValue::decode(encodedValue);
3112     UNUSED_PARAM(thisValue);
3113     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3114     if (UNLIKELY(!castedThis)) {
3115         return throwSetterTypeError(*state, throwScope, "TestObject", "TestSubObjEnabledBySetting");
3116     }
3117     // Shadowing a built-in constructor.
3118     return castedThis->putDirect(state->vm(), Identifier::fromString(state, "TestSubObjEnabledBySetting"), value);
3119 }
3120
3121
3122 bool setJSTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3123 {
3124     VM& vm = state->vm();
3125     auto throwScope = DECLARE_THROW_SCOPE(vm);
3126     UNUSED_PARAM(throwScope);
3127     JSValue value = JSValue::decode(encodedValue);
3128     UNUSED_PARAM(thisValue);
3129     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3130     if (UNLIKELY(!castedThis)) {
3131         return throwSetterTypeError(*state, throwScope, "TestObject", "enumAttr");
3132     }
3133     auto& impl = castedThis->wrapped();
3134     auto nativeValue = parse<TestObj::EnumType>(*state, value);
3135     if (UNLIKELY(throwScope.exception()))
3136         return false;
3137     if (UNLIKELY(!nativeValue))
3138         return false;
3139     impl.setEnumAttr(nativeValue.value());
3140     return true;
3141 }
3142
3143
3144 bool setJSTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3145 {
3146     VM& vm = state->vm();
3147     auto throwScope = DECLARE_THROW_SCOPE(vm);
3148     UNUSED_PARAM(throwScope);
3149     JSValue value = JSValue::decode(encodedValue);
3150     UNUSED_PARAM(thisValue);
3151     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3152     if (UNLIKELY(!castedThis)) {
3153         return throwSetterTypeError(*state, throwScope, "TestObject", "byteAttr");
3154     }
3155     auto& impl = castedThis->wrapped();
3156     auto nativeValue = convert<int8_t>(*state, value, NormalConversion);
3157     if (UNLIKELY(throwScope.exception()))
3158         return false;
3159     impl.setByteAttr(WTFMove(nativeValue));
3160     return true;
3161 }
3162
3163
3164 bool setJSTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3165 {
3166     VM& vm = state->vm();
3167     auto throwScope = DECLARE_THROW_SCOPE(vm);
3168     UNUSED_PARAM(throwScope);
3169     JSValue value = JSValue::decode(encodedValue);
3170     UNUSED_PARAM(thisValue);
3171     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3172     if (UNLIKELY(!castedThis)) {
3173         return throwSetterTypeError(*state, throwScope, "TestObject", "octetAttr");
3174     }
3175     auto& impl = castedThis->wrapped();
3176     auto nativeValue = convert<uint8_t>(*state, value, NormalConversion);
3177     if (UNLIKELY(throwScope.exception()))
3178         return false;
3179     impl.setOctetAttr(WTFMove(nativeValue));
3180     return true;
3181 }
3182
3183
3184 bool setJSTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3185 {
3186     VM& vm = state->vm();
3187     auto throwScope = DECLARE_THROW_SCOPE(vm);
3188     UNUSED_PARAM(throwScope);
3189     JSValue value = JSValue::decode(encodedValue);
3190     UNUSED_PARAM(thisValue);
3191     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3192     if (UNLIKELY(!castedThis)) {
3193         return throwSetterTypeError(*state, throwScope, "TestObject", "shortAttr");
3194     }
3195     auto& impl = castedThis->wrapped();
3196     auto nativeValue = convert<int16_t>(*state, value, NormalConversion);
3197     if (UNLIKELY(throwScope.exception()))
3198         return false;
3199     impl.setShortAttr(WTFMove(nativeValue));
3200     return true;
3201 }
3202
3203
3204 bool setJSTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3205 {
3206     VM& vm = state->vm();
3207     auto throwScope = DECLARE_THROW_SCOPE(vm);
3208     UNUSED_PARAM(throwScope);
3209     JSValue value = JSValue::decode(encodedValue);
3210     UNUSED_PARAM(thisValue);
3211     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3212     if (UNLIKELY(!castedThis)) {
3213         return throwSetterTypeError(*state, throwScope, "TestObject", "clampedShortAttr");
3214     }
3215     auto& impl = castedThis->wrapped();
3216     auto nativeValue = convert<int16_t>(*state, value, Clamp);
3217     if (UNLIKELY(throwScope.exception()))
3218         return false;
3219     impl.setClampedShortAttr(WTFMove(nativeValue));
3220     return true;
3221 }
3222
3223
3224 bool setJSTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3225 {
3226     VM& vm = state->vm();
3227     auto throwScope = DECLARE_THROW_SCOPE(vm);
3228     UNUSED_PARAM(throwScope);
3229     JSValue value = JSValue::decode(encodedValue);
3230     UNUSED_PARAM(thisValue);
3231     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3232     if (UNLIKELY(!castedThis)) {
3233         return throwSetterTypeError(*state, throwScope, "TestObject", "enforceRangeShortAttr");
3234     }
3235     auto& impl = castedThis->wrapped();
3236     auto nativeValue = convert<int16_t>(*state, value, EnforceRange);
3237     if (UNLIKELY(throwScope.exception()))
3238         return false;
3239     impl.setEnforceRangeShortAttr(WTFMove(nativeValue));
3240     return true;
3241 }
3242
3243
3244 bool setJSTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3245 {
3246     VM& vm = state->vm();
3247     auto throwScope = DECLARE_THROW_SCOPE(vm);
3248     UNUSED_PARAM(throwScope);
3249     JSValue value = JSValue::decode(encodedValue);
3250     UNUSED_PARAM(thisValue);
3251     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3252     if (UNLIKELY(!castedThis)) {
3253         return throwSetterTypeError(*state, throwScope, "TestObject", "unsignedShortAttr");
3254     }
3255     auto& impl = castedThis->wrapped();
3256     auto nativeValue = convert<uint16_t>(*state, value, NormalConversion);
3257     if (UNLIKELY(throwScope.exception()))
3258         return false;
3259     impl.setUnsignedShortAttr(WTFMove(nativeValue));
3260     return true;
3261 }
3262
3263
3264 bool setJSTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3265 {
3266     VM& vm = state->vm();
3267     auto throwScope = DECLARE_THROW_SCOPE(vm);
3268     UNUSED_PARAM(throwScope);
3269     JSValue value = JSValue::decode(encodedValue);
3270     UNUSED_PARAM(thisValue);
3271     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3272     if (UNLIKELY(!castedThis)) {
3273         return throwSetterTypeError(*state, throwScope, "TestObject", "longAttr");
3274     }
3275     auto& impl = castedThis->wrapped();
3276     auto nativeValue = convert<int32_t>(*state, value, NormalConversion);
3277     if (UNLIKELY(throwScope.exception()))
3278         return false;
3279     impl.setLongAttr(WTFMove(nativeValue));
3280     return true;
3281 }
3282
3283
3284 bool setJSTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3285 {
3286     VM& vm = state->vm();
3287     auto throwScope = DECLARE_THROW_SCOPE(vm);
3288     UNUSED_PARAM(throwScope);
3289     JSValue value = JSValue::decode(encodedValue);
3290     UNUSED_PARAM(thisValue);
3291     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3292     if (UNLIKELY(!castedThis)) {
3293         return throwSetterTypeError(*state, throwScope, "TestObject", "longLongAttr");
3294     }
3295     auto& impl = castedThis->wrapped();
3296     auto nativeValue = convert<int64_t>(*state, value, NormalConversion);
3297     if (UNLIKELY(throwScope.exception()))
3298         return false;
3299     impl.setLongLongAttr(WTFMove(nativeValue));
3300     return true;
3301 }
3302
3303
3304 bool setJSTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3305 {
3306     VM& vm = state->vm();
3307     auto throwScope = DECLARE_THROW_SCOPE(vm);
3308     UNUSED_PARAM(throwScope);
3309     JSValue value = JSValue::decode(encodedValue);
3310     UNUSED_PARAM(thisValue);
3311     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3312     if (UNLIKELY(!castedThis)) {
3313         return throwSetterTypeError(*state, throwScope, "TestObject", "unsignedLongLongAttr");
3314     }
3315     auto& impl = castedThis->wrapped();
3316     auto nativeValue = convert<uint64_t>(*state, value, NormalConversion);
3317     if (UNLIKELY(throwScope.exception()))
3318         return false;
3319     impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
3320     return true;
3321 }
3322
3323
3324 bool setJSTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3325 {
3326     VM& vm = state->vm();
3327     auto throwScope = DECLARE_THROW_SCOPE(vm);
3328     UNUSED_PARAM(throwScope);
3329     JSValue value = JSValue::decode(encodedValue);
3330     UNUSED_PARAM(thisValue);
3331     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3332     if (UNLIKELY(!castedThis)) {
3333         return throwSetterTypeError(*state, throwScope, "TestObject", "stringAttr");
3334     }
3335     auto& impl = castedThis->wrapped();
3336     auto nativeValue = value.toWTFString(state);
3337     if (UNLIKELY(throwScope.exception()))
3338         return false;
3339     impl.setStringAttr(WTFMove(nativeValue));
3340     return true;
3341 }
3342
3343
3344 bool setJSTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3345 {
3346     VM& vm = state->vm();
3347     auto throwScope = DECLARE_THROW_SCOPE(vm);
3348     UNUSED_PARAM(throwScope);
3349     JSValue value = JSValue::decode(encodedValue);
3350     UNUSED_PARAM(thisValue);
3351     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3352     if (UNLIKELY(!castedThis)) {
3353         return throwSetterTypeError(*state, throwScope, "TestObject", "usvstringAttr");
3354     }
3355     auto& impl = castedThis->wrapped();
3356     auto nativeValue = valueToUSVString(state, value);
3357     if (UNLIKELY(throwScope.exception()))
3358         return false;
3359     impl.setUsvstringAttr(WTFMove(nativeValue));
3360     return true;
3361 }
3362
3363
3364 bool setJSTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3365 {
3366     VM& vm = state->vm();
3367     auto throwScope = DECLARE_THROW_SCOPE(vm);
3368     UNUSED_PARAM(throwScope);
3369     JSValue value = JSValue::decode(encodedValue);
3370     UNUSED_PARAM(thisValue);
3371     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3372     if (UNLIKELY(!castedThis)) {
3373         return throwSetterTypeError(*state, throwScope, "TestObject", "testObjAttr");
3374     }
3375     auto& impl = castedThis->wrapped();
3376     auto nativeValue = JSTestObj::toWrapped(value);
3377     if (UNLIKELY(!nativeValue)) {
3378         throwAttributeTypeError(*state, throwScope, "TestObject", "testObjAttr", "TestObj");
3379         return false;
3380     }
3381     impl.setTestObjAttr(*nativeValue);
3382     return true;
3383 }
3384
3385
3386 bool setJSTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3387 {
3388     VM& vm = state->vm();
3389     auto throwScope = DECLARE_THROW_SCOPE(vm);
3390     UNUSED_PARAM(throwScope);
3391     JSValue value = JSValue::decode(encodedValue);
3392     UNUSED_PARAM(thisValue);
3393     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3394     if (UNLIKELY(!castedThis)) {
3395         return throwSetterTypeError(*state, throwScope, "TestObject", "testNullableObjAttr");
3396     }
3397     auto& impl = castedThis->wrapped();
3398     TestObj* nativeValue = nullptr;
3399     if (!value.isUndefinedOrNull()) {
3400         nativeValue = JSTestObj::toWrapped(value);
3401         if (UNLIKELY(!nativeValue)) {
3402             throwAttributeTypeError(*state, throwScope, "TestObject", "testNullableObjAttr", "TestObj");
3403             return false;
3404         }
3405     }
3406     impl.setTestNullableObjAttr(WTFMove(nativeValue));
3407     return true;
3408 }
3409
3410
3411 bool setJSTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3412 {
3413     VM& vm = state->vm();
3414     auto throwScope = DECLARE_THROW_SCOPE(vm);
3415     UNUSED_PARAM(throwScope);
3416     JSValue value = JSValue::decode(encodedValue);
3417     UNUSED_PARAM(thisValue);
3418     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3419     if (UNLIKELY(!castedThis)) {
3420         return false;
3421     }
3422     auto& impl = castedThis->wrapped();
3423     auto nativeValue = JSTestObj::toWrapped(value);
3424     if (UNLIKELY(!nativeValue)) {
3425         throwAttributeTypeError(*state, throwScope, "TestObject", "lenientTestObjAttr", "TestObj");
3426         return false;
3427     }
3428     impl.setLenientTestObjAttr(*nativeValue);
3429     return true;
3430 }
3431
3432
3433 bool setJSTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3434 {
3435     VM& vm = state->vm();
3436     auto throwScope = DECLARE_THROW_SCOPE(vm);
3437     UNUSED_PARAM(throwScope);
3438     JSValue value = JSValue::decode(encodedValue);
3439     UNUSED_PARAM(thisValue);
3440     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3441     if (UNLIKELY(!castedThis)) {
3442         return throwSetterTypeError(*state, throwScope, "TestObject", "stringAttrTreatingNullAsEmptyString");
3443     }
3444     auto& impl = castedThis->wrapped();
3445     auto nativeValue = valueToStringTreatingNullAsEmptyString(state, value);
3446     if (UNLIKELY(throwScope.exception()))
3447         return false;
3448     impl.setStringAttrTreatingNullAsEmptyString(WTFMove(nativeValue));
3449     return true;
3450 }
3451
3452
3453 bool setJSTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3454 {
3455     VM& vm = state->vm();
3456     auto throwScope = DECLARE_THROW_SCOPE(vm);
3457     UNUSED_PARAM(throwScope);
3458     JSValue value = JSValue::decode(encodedValue);
3459     UNUSED_PARAM(thisValue);
3460     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3461     if (UNLIKELY(!castedThis)) {
3462         return throwSetterTypeError(*state, throwScope, "TestObject", "usvstringAttrTreatingNullAsEmptyString");
3463     }
3464     auto& impl = castedThis->wrapped();
3465     auto nativeValue = valueToUSVStringTreatingNullAsEmptyString(state, value);
3466     if (UNLIKELY(throwScope.exception()))
3467         return false;
3468     impl.setUsvstringAttrTreatingNullAsEmptyString(WTFMove(nativeValue));
3469     return true;
3470 }
3471
3472
3473 bool setJSTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3474 {
3475     VM& vm = state->vm();
3476     auto throwScope = DECLARE_THROW_SCOPE(vm);
3477     UNUSED_PARAM(throwScope);
3478     JSValue value = JSValue::decode(encodedValue);
3479     UNUSED_PARAM(thisValue);
3480     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3481     if (UNLIKELY(!castedThis)) {
3482         return throwSetterTypeError(*state, throwScope, "TestObject", "implementationEnumAttr");
3483     }
3484     auto& impl = castedThis->wrapped();
3485     auto nativeValue = parse<AlternateEnumName>(*state, value);
3486     if (UNLIKELY(throwScope.exception()))
3487         return false;
3488     if (UNLIKELY(!nativeValue))
3489         return false;
3490     impl.setImplementationEnumAttr(nativeValue.value());
3491     return true;
3492 }
3493
3494
3495 bool setJSTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3496 {
3497     VM& vm = state->vm();
3498     auto throwScope = DECLARE_THROW_SCOPE(vm);
3499     UNUSED_PARAM(throwScope);
3500     JSValue value = JSValue::decode(encodedValue);
3501     UNUSED_PARAM(thisValue);
3502     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3503     if (UNLIKELY(!castedThis)) {
3504         return throwSetterTypeError(*state, throwScope, "TestObject", "XMLObjAttr");
3505     }
3506     auto& impl = castedThis->wrapped();
3507     auto nativeValue = JSTestObj::toWrapped(value);
3508     if (UNLIKELY(!nativeValue)) {
3509         throwAttributeTypeError(*state, throwScope, "TestObject", "XMLObjAttr", "TestObj");
3510         return false;
3511     }
3512     impl.setXMLObjAttr(*nativeValue);
3513     return true;
3514 }
3515
3516
3517 bool setJSTestObjCreate(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3518 {
3519     VM& vm = state->vm();
3520     auto throwScope = DECLARE_THROW_SCOPE(vm);
3521     UNUSED_PARAM(throwScope);
3522     JSValue value = JSValue::decode(encodedValue);
3523     UNUSED_PARAM(thisValue);
3524     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3525     if (UNLIKELY(!castedThis)) {
3526         return throwSetterTypeError(*state, throwScope, "TestObject", "create");
3527     }
3528     auto& impl = castedThis->wrapped();
3529     auto nativeValue = value.toBoolean(state);
3530     if (UNLIKELY(throwScope.exception()))
3531         return false;
3532     impl.setCreate(WTFMove(nativeValue));
3533     return true;
3534 }
3535
3536
3537 bool setJSTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3538 {
3539     VM& vm = state->vm();
3540     auto throwScope = DECLARE_THROW_SCOPE(vm);
3541     UNUSED_PARAM(throwScope);
3542     JSValue value = JSValue::decode(encodedValue);
3543     UNUSED_PARAM(thisValue);
3544     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3545     if (UNLIKELY(!castedThis)) {
3546         return throwSetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
3547     }
3548     auto& impl = castedThis->wrapped();
3549     auto nativeValue = value.toWTFString(state);
3550     if (UNLIKELY(throwScope.exception()))
3551         return false;
3552     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, WTFMove(nativeValue));
3553     return true;
3554 }
3555
3556
3557 bool setJSTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3558 {
3559     VM& vm = state->vm();
3560     auto throwScope = DECLARE_THROW_SCOPE(vm);
3561     UNUSED_PARAM(throwScope);
3562     JSValue value = JSValue::decode(encodedValue);
3563     UNUSED_PARAM(thisValue);
3564     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3565     if (UNLIKELY(!castedThis)) {
3566         return throwSetterTypeError(*state, throwScope, "TestObject", "reflectedUSVStringAttr");
3567     }
3568     auto& impl = castedThis->wrapped();
3569     auto nativeValue = valueToUSVString(state, value);
3570     if (UNLIKELY(throwScope.exception()))
3571         return false;
3572     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr, WTFMove(nativeValue));
3573     return true;
3574 }
3575
3576
3577 bool setJSTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3578 {
3579     VM& vm = state->vm();
3580     auto throwScope = DECLARE_THROW_SCOPE(vm);
3581     UNUSED_PARAM(throwScope);
3582     JSValue value = JSValue::decode(encodedValue);
3583     UNUSED_PARAM(thisValue);
3584     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3585     if (UNLIKELY(!castedThis)) {
3586         return throwSetterTypeError(*state, throwScope, "TestObject", "reflectedIntegralAttr");
3587     }
3588     auto& impl = castedThis->wrapped();
3589     auto nativeValue = convert<int32_t>(*state, value, NormalConversion);
3590     if (UNLIKELY(throwScope.exception()))
3591         return false;
3592     impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, WTFMove(nativeValue));
3593     return true;
3594 }
3595
3596
3597 bool setJSTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3598 {
3599     VM& vm = state->vm();
3600     auto throwScope = DECLARE_THROW_SCOPE(vm);
3601     UNUSED_PARAM(throwScope);
3602     JSValue value = JSValue::decode(encodedValue);
3603     UNUSED_PARAM(thisValue);
3604     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3605     if (UNLIKELY(!castedThis)) {
3606         return throwSetterTypeError(*state, throwScope, "TestObject", "reflectedUnsignedIntegralAttr");
3607     }
3608     auto& impl = castedThis->wrapped();
3609     auto nativeValue = convert<uint32_t>(*state, value, NormalConversion);
3610     if (UNLIKELY(throwScope.exception()))
3611         return false;
3612     impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, WTFMove(nativeValue));
3613     return true;
3614 }
3615
3616
3617 bool setJSTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3618 {
3619     VM& vm = state->vm();
3620     auto throwScope = DECLARE_THROW_SCOPE(vm);
3621     UNUSED_PARAM(throwScope);
3622     JSValue value = JSValue::decode(encodedValue);
3623     UNUSED_PARAM(thisValue);
3624     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3625     if (UNLIKELY(!castedThis)) {
3626         return throwSetterTypeError(*state, throwScope, "TestObject", "reflectedBooleanAttr");
3627     }
3628     auto& impl = castedThis->wrapped();
3629     auto nativeValue = value.toBoolean(state);
3630     if (UNLIKELY(throwScope.exception()))
3631         return false;
3632     impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, WTFMove(nativeValue));
3633     return true;
3634 }
3635
3636
3637 bool setJSTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3638 {
3639     VM& vm = state->vm();
3640     auto throwScope = DECLARE_THROW_SCOPE(vm);
3641     UNUSED_PARAM(throwScope);
3642     JSValue value = JSValue::decode(encodedValue);
3643     UNUSED_PARAM(thisValue);
3644     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3645     if (UNLIKELY(!castedThis)) {
3646         return throwSetterTypeError(*state, throwScope, "TestObject", "reflectedURLAttr");
3647     }
3648     auto& impl = castedThis->wrapped();
3649     auto nativeValue = value.toWTFString(state);
3650     if (UNLIKELY(throwScope.exception()))
3651         return false;
3652     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, WTFMove(nativeValue));
3653     return true;
3654 }
3655