[WebIDL] Replace use of __is_polymorphic with standard std::is_polymorphic<>::value
[WebKit.git] / Source / WebCore / bindings / scripts / test / JS / JSTestTypedefs.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 "JSTestTypedefs.h"
23
24 #include "JSDOMAttribute.h"
25 #include "JSDOMBinding.h"
26 #include "JSDOMConstructor.h"
27 #include "JSDOMConvertBoolean.h"
28 #include "JSDOMConvertBufferSource.h"
29 #include "JSDOMConvertCallbacks.h"
30 #include "JSDOMConvertInterface.h"
31 #include "JSDOMConvertNullable.h"
32 #include "JSDOMConvertNumbers.h"
33 #include "JSDOMConvertSequences.h"
34 #include "JSDOMConvertSerializedScriptValue.h"
35 #include "JSDOMConvertStrings.h"
36 #include "JSDOMConvertUnion.h"
37 #include "JSDOMExceptionHandling.h"
38 #include "JSDOMGlobalObject.h"
39 #include "JSDOMOperation.h"
40 #include "JSDOMWrapperCache.h"
41 #include "JSSVGPoint.h"
42 #include "JSTestCallbackFunction.h"
43 #include "JSTestCallbackInterface.h"
44 #include "JSTestEventTarget.h"
45 #include "JSTestSubObj.h"
46 #include "SerializedScriptValue.h"
47 #include <runtime/FunctionPrototype.h>
48 #include <runtime/JSArray.h>
49 #include <runtime/JSCInlines.h>
50 #include <wtf/GetPtr.h>
51 #include <wtf/Variant.h>
52
53 using namespace JSC;
54
55 namespace WebCore {
56
57 // Functions
58
59 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(JSC::ExecState*);
60 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(JSC::ExecState*);
61 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
62 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceArg(JSC::ExecState*);
63 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(JSC::ExecState*);
64 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(JSC::ExecState*);
65 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg(JSC::ExecState*);
66 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(JSC::ExecState*);
67 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(JSC::ExecState*);
68 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef(JSC::ExecState*);
69 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionPointFunction(JSC::ExecState*);
70 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(JSC::ExecState*);
71 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction2(JSC::ExecState*);
72 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(JSC::ExecState*);
73 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(JSC::ExecState*);
74
75 // Attributes
76
77 JSC::EncodedJSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
78 bool setJSTestTypedefsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
79 JSC::EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
80 bool setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
81 JSC::EncodedJSValue jsTestTypedefsSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
82 bool setJSTestTypedefsSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
83 JSC::EncodedJSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
84 JSC::EncodedJSValue jsTestTypedefsAttributeWithClamp(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
85 bool setJSTestTypedefsAttributeWithClamp(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
86 JSC::EncodedJSValue jsTestTypedefsAttributeWithClampInTypedef(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
87 bool setJSTestTypedefsAttributeWithClampInTypedef(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
88 JSC::EncodedJSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
89 bool setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
90 JSC::EncodedJSValue jsTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
91 bool setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
92 JSC::EncodedJSValue jsTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
93 bool setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
94 JSC::EncodedJSValue jsTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
95 bool setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
96 JSC::EncodedJSValue jsTestTypedefsBufferSourceAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
97 bool setJSTestTypedefsBufferSourceAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
98 JSC::EncodedJSValue jsTestTypedefsDomTimeStampAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
99 bool setJSTestTypedefsDomTimeStampAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
100
101 class JSTestTypedefsPrototype : public JSC::JSNonFinalObject {
102 public:
103     using Base = JSC::JSNonFinalObject;
104     static JSTestTypedefsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
105     {
106         JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure);
107         ptr->finishCreation(vm);
108         return ptr;
109     }
110
111     DECLARE_INFO;
112     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
113     {
114         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
115     }
116
117 private:
118     JSTestTypedefsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
119         : JSC::JSNonFinalObject(vm, structure)
120     {
121     }
122
123     void finishCreation(JSC::VM&);
124 };
125
126 using JSTestTypedefsConstructor = JSDOMConstructor<JSTestTypedefs>;
127
128 /* Hash table */
129
130 static const struct CompactHashIndex JSTestTypedefsTableIndex[2] = {
131     { -1, -1 },
132     { -1, -1 },
133 };
134
135
136 static const HashTableValue JSTestTypedefsTableValues[] =
137 {
138     { 0, 0, NoIntrinsic, { 0, 0 } }
139 };
140
141 static const HashTable JSTestTypedefsTable = { 0, 1, false, JSTestTypedefsTableValues, JSTestTypedefsTableIndex };
142 /* Hash table for constructor */
143
144 static const HashTableValue JSTestTypedefsConstructorTableValues[] =
145 {
146     { "TestSubObj", ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
147 };
148
149 template<> EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::construct(ExecState* state)
150 {
151     VM& vm = state->vm();
152     auto throwScope = DECLARE_THROW_SCOPE(vm);
153     UNUSED_PARAM(throwScope);
154     auto* castedThis = jsCast<JSTestTypedefsConstructor*>(state->jsCallee());
155     ASSERT(castedThis);
156     if (UNLIKELY(state->argumentCount() < 3))
157         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
158     auto hello = convert<IDLDOMString>(*state, state->uncheckedArgument(0));
159     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
160     auto testCallbackFunction = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*state, state->uncheckedArgument(1), *castedThis->globalObject(), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(state, scope, 1, "testCallbackFunction", "TestTypedefs", nullptr); });
161     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
162     auto testCallbackInterface = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*state, state->uncheckedArgument(2), *castedThis->globalObject(), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(state, scope, 2, "testCallbackInterface", "TestTypedefs", nullptr); });
163     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
164     auto object = TestTypedefs::create(WTFMove(hello), testCallbackFunction.releaseNonNull(), testCallbackInterface.releaseNonNull());
165     return JSValue::encode(toJSNewlyCreated<IDLInterface<TestTypedefs>>(*state, *castedThis->globalObject(), WTFMove(object)));
166 }
167
168 template<> JSValue JSTestTypedefsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
169 {
170     UNUSED_PARAM(vm);
171     return globalObject.functionPrototype();
172 }
173
174 template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
175 {
176     putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
177     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum);
178     putDirect(vm, vm.propertyNames->length, jsNumber(3), ReadOnly | DontEnum);
179     reifyStaticProperties(vm, JSTestTypedefsConstructorTableValues, *this);
180 }
181
182 template<> const ClassInfo JSTestTypedefsConstructor::s_info = { "TestTypedefs", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestTypedefsConstructor) };
183
184 /* Hash table for prototype */
185
186 static const HashTableValue JSTestTypedefsPrototypeTableValues[] =
187 {
188     { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsConstructor) } },
189     { "unsignedLongLongAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsUnsignedLongLongAttr) } },
190     { "serializedScriptValue", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsSerializedScriptValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsSerializedScriptValue) } },
191     { "attributeWithClamp", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttributeWithClamp), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttributeWithClamp) } },
192     { "attributeWithClampInTypedef", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttributeWithClampInTypedef), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttributeWithClampInTypedef) } },
193     { "attrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttrWithGetterException) } },
194     { "attrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttrWithSetterException) } },
195     { "stringAttrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsStringAttrWithGetterException) } },
196     { "stringAttrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsStringAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsStringAttrWithSetterException) } },
197     { "bufferSourceAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsBufferSourceAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsBufferSourceAttr) } },
198     { "domTimeStampAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsDomTimeStampAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsDomTimeStampAttr) } },
199     { "func", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFunc), (intptr_t) (0) } },
200     { "setShadow", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionSetShadow), (intptr_t) (3) } },
201     { "methodWithSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
202     { "nullableSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceArg), (intptr_t) (1) } },
203     { "sequenceOfNullablesArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg), (intptr_t) (1) } },
204     { "nullableSequenceOfNullablesArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg), (intptr_t) (1) } },
205     { "nullableSequenceOfUnionsArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg), (intptr_t) (1) } },
206     { "unionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionUnionArg), (intptr_t) (1) } },
207     { "funcWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClamp), (intptr_t) (1) } },
208     { "funcWithClampInTypedef", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef), (intptr_t) (1) } },
209     { "pointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionPointFunction), (intptr_t) (0) } },
210     { "stringSequenceFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringSequenceFunction), (intptr_t) (1) } },
211     { "stringSequenceFunction2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringSequenceFunction2), (intptr_t) (1) } },
212     { "callWithSequenceThatRequiresInclude", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude), (intptr_t) (1) } },
213     { "methodWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMethodWithException), (intptr_t) (0) } },
214 };
215
216 const ClassInfo JSTestTypedefsPrototype::s_info = { "TestTypedefsPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestTypedefsPrototype) };
217
218 void JSTestTypedefsPrototype::finishCreation(VM& vm)
219 {
220     Base::finishCreation(vm);
221     reifyStaticProperties(vm, JSTestTypedefsPrototypeTableValues, *this);
222 }
223
224 const ClassInfo JSTestTypedefs::s_info = { "TestTypedefs", &Base::s_info, &JSTestTypedefsTable, nullptr, CREATE_METHOD_TABLE(JSTestTypedefs) };
225
226 JSTestTypedefs::JSTestTypedefs(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestTypedefs>&& impl)
227     : JSDOMWrapper<TestTypedefs>(structure, globalObject, WTFMove(impl))
228 {
229 }
230
231 void JSTestTypedefs::finishCreation(VM& vm)
232 {
233     Base::finishCreation(vm);
234     ASSERT(inherits(vm, info()));
235
236 }
237
238 JSObject* JSTestTypedefs::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
239 {
240     return JSTestTypedefsPrototype::create(vm, &globalObject, JSTestTypedefsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
241 }
242
243 JSObject* JSTestTypedefs::prototype(VM& vm, JSDOMGlobalObject& globalObject)
244 {
245     return getDOMPrototype<JSTestTypedefs>(vm, globalObject);
246 }
247
248 JSValue JSTestTypedefs::getConstructor(VM& vm, const JSGlobalObject* globalObject)
249 {
250     return getDOMConstructor<JSTestTypedefsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
251 }
252
253 void JSTestTypedefs::destroy(JSC::JSCell* cell)
254 {
255     JSTestTypedefs* thisObject = static_cast<JSTestTypedefs*>(cell);
256     thisObject->JSTestTypedefs::~JSTestTypedefs();
257 }
258
259 template<> inline JSTestTypedefs* IDLAttribute<JSTestTypedefs>::cast(ExecState& state, EncodedJSValue thisValue)
260 {
261     return jsDynamicDowncast<JSTestTypedefs*>(state.vm(), JSValue::decode(thisValue));
262 }
263
264 template<> inline JSTestTypedefs* IDLOperation<JSTestTypedefs>::cast(ExecState& state)
265 {
266     return jsDynamicDowncast<JSTestTypedefs*>(state.vm(), state.thisValue());
267 }
268
269 EncodedJSValue jsTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
270 {
271     VM& vm = state->vm();
272     auto throwScope = DECLARE_THROW_SCOPE(vm);
273     auto* prototype = jsDynamicDowncast<JSTestTypedefsPrototype*>(vm, JSValue::decode(thisValue));
274     if (UNLIKELY(!prototype))
275         return throwVMTypeError(state, throwScope);
276     return JSValue::encode(JSTestTypedefs::getConstructor(state->vm(), prototype->globalObject()));
277 }
278
279 bool setJSTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
280 {
281     VM& vm = state->vm();
282     auto throwScope = DECLARE_THROW_SCOPE(vm);
283     auto* prototype = jsDynamicDowncast<JSTestTypedefsPrototype*>(vm, JSValue::decode(thisValue));
284     if (UNLIKELY(!prototype)) {
285         throwVMTypeError(state, throwScope);
286         return false;
287     }
288     // Shadowing a built-in constructor
289     return prototype->putDirect(state->vm(), state->propertyNames().constructor, JSValue::decode(encodedValue));
290 }
291
292 static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
293 {
294     UNUSED_PARAM(throwScope);
295     UNUSED_PARAM(state);
296     auto& impl = thisObject.wrapped();
297     JSValue result = toJS<IDLUnsignedLongLong>(impl.unsignedLongLongAttr());
298     return result;
299 }
300
301 EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
302 {
303     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsUnsignedLongLongAttrGetter>(*state, thisValue, "unsignedLongLongAttr");
304 }
305
306 static inline bool setJSTestTypedefsUnsignedLongLongAttrSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
307 {
308     UNUSED_PARAM(state);
309     UNUSED_PARAM(throwScope);
310     auto& impl = thisObject.wrapped();
311     auto nativeValue = convert<IDLUnsignedLongLong>(state, value);
312     RETURN_IF_EXCEPTION(throwScope, false);
313     impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
314     return true;
315 }
316
317 bool setJSTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
318 {
319     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsUnsignedLongLongAttrSetter>(*state, thisValue, encodedValue, "unsignedLongLongAttr");
320 }
321
322 static inline JSValue jsTestTypedefsSerializedScriptValueGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
323 {
324     UNUSED_PARAM(throwScope);
325     UNUSED_PARAM(state);
326     auto& impl = thisObject.wrapped();
327     JSValue result = toJS<IDLSerializedScriptValue<SerializedScriptValue>>(state, *thisObject.globalObject(), impl.serializedScriptValue());
328     return result;
329 }
330
331 EncodedJSValue jsTestTypedefsSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
332 {
333     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsSerializedScriptValueGetter>(*state, thisValue, "serializedScriptValue");
334 }
335
336 static inline bool setJSTestTypedefsSerializedScriptValueSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
337 {
338     UNUSED_PARAM(state);
339     UNUSED_PARAM(throwScope);
340     auto& impl = thisObject.wrapped();
341     auto nativeValue = convert<IDLSerializedScriptValue<SerializedScriptValue>>(state, value);
342     RETURN_IF_EXCEPTION(throwScope, false);
343     impl.setSerializedScriptValue(WTFMove(nativeValue));
344     return true;
345 }
346
347 bool setJSTestTypedefsSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
348 {
349     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsSerializedScriptValueSetter>(*state, thisValue, encodedValue, "serializedScriptValue");
350 }
351
352 static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState& state, ThrowScope& throwScope)
353 {
354     UNUSED_PARAM(throwScope);
355     UNUSED_PARAM(state);
356     return JSTestSubObj::getConstructor(state.vm(), thisObject.globalObject());
357 }
358
359 EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
360 {
361     return IDLAttribute<JSTestTypedefs>::getStatic<jsTestTypedefsConstructorTestSubObjGetter>(*state, thisValue, "TestSubObj");
362 }
363
364 static inline JSValue jsTestTypedefsAttributeWithClampGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
365 {
366     UNUSED_PARAM(throwScope);
367     UNUSED_PARAM(state);
368     auto& impl = thisObject.wrapped();
369     JSValue result = toJS<IDLClampAdaptor<IDLUnsignedLongLong>>(impl.attributeWithClamp());
370     return result;
371 }
372
373 EncodedJSValue jsTestTypedefsAttributeWithClamp(ExecState* state, EncodedJSValue thisValue, PropertyName)
374 {
375     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttributeWithClampGetter>(*state, thisValue, "attributeWithClamp");
376 }
377
378 static inline bool setJSTestTypedefsAttributeWithClampSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
379 {
380     UNUSED_PARAM(state);
381     UNUSED_PARAM(throwScope);
382     auto& impl = thisObject.wrapped();
383     auto nativeValue = convert<IDLClampAdaptor<IDLUnsignedLongLong>>(state, value);
384     RETURN_IF_EXCEPTION(throwScope, false);
385     impl.setAttributeWithClamp(WTFMove(nativeValue));
386     return true;
387 }
388
389 bool setJSTestTypedefsAttributeWithClamp(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
390 {
391     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttributeWithClampSetter>(*state, thisValue, encodedValue, "attributeWithClamp");
392 }
393
394 static inline JSValue jsTestTypedefsAttributeWithClampInTypedefGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
395 {
396     UNUSED_PARAM(throwScope);
397     UNUSED_PARAM(state);
398     auto& impl = thisObject.wrapped();
399     JSValue result = toJS<IDLClampAdaptor<IDLLong>>(impl.attributeWithClampInTypedef());
400     return result;
401 }
402
403 EncodedJSValue jsTestTypedefsAttributeWithClampInTypedef(ExecState* state, EncodedJSValue thisValue, PropertyName)
404 {
405     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttributeWithClampInTypedefGetter>(*state, thisValue, "attributeWithClampInTypedef");
406 }
407
408 static inline bool setJSTestTypedefsAttributeWithClampInTypedefSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
409 {
410     UNUSED_PARAM(state);
411     UNUSED_PARAM(throwScope);
412     auto& impl = thisObject.wrapped();
413     auto nativeValue = convert<IDLClampAdaptor<IDLLong>>(state, value);
414     RETURN_IF_EXCEPTION(throwScope, false);
415     impl.setAttributeWithClampInTypedef(WTFMove(nativeValue));
416     return true;
417 }
418
419 bool setJSTestTypedefsAttributeWithClampInTypedef(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
420 {
421     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttributeWithClampInTypedefSetter>(*state, thisValue, encodedValue, "attributeWithClampInTypedef");
422 }
423
424 static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
425 {
426     UNUSED_PARAM(throwScope);
427     UNUSED_PARAM(state);
428     auto& impl = thisObject.wrapped();
429     JSValue result = toJS<IDLLong>(state, throwScope, impl.attrWithGetterException());
430     return result;
431 }
432
433 EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
434 {
435     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttrWithGetterExceptionGetter>(*state, thisValue, "attrWithGetterException");
436 }
437
438 static inline bool setJSTestTypedefsAttrWithGetterExceptionSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
439 {
440     UNUSED_PARAM(state);
441     UNUSED_PARAM(throwScope);
442     auto& impl = thisObject.wrapped();
443     auto nativeValue = convert<IDLLong>(state, value);
444     RETURN_IF_EXCEPTION(throwScope, false);
445     impl.setAttrWithGetterException(WTFMove(nativeValue));
446     return true;
447 }
448
449 bool setJSTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
450 {
451     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttrWithGetterExceptionSetter>(*state, thisValue, encodedValue, "attrWithGetterException");
452 }
453
454 static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
455 {
456     UNUSED_PARAM(throwScope);
457     UNUSED_PARAM(state);
458     auto& impl = thisObject.wrapped();
459     JSValue result = toJS<IDLLong>(impl.attrWithSetterException());
460     return result;
461 }
462
463 EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
464 {
465     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttrWithSetterExceptionGetter>(*state, thisValue, "attrWithSetterException");
466 }
467
468 static inline bool setJSTestTypedefsAttrWithSetterExceptionSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
469 {
470     UNUSED_PARAM(state);
471     UNUSED_PARAM(throwScope);
472     auto& impl = thisObject.wrapped();
473     auto nativeValue = convert<IDLLong>(state, value);
474     RETURN_IF_EXCEPTION(throwScope, false);
475     propagateException(state, throwScope, impl.setAttrWithSetterException(WTFMove(nativeValue)));
476     return true;
477 }
478
479 bool setJSTestTypedefsAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
480 {
481     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttrWithSetterExceptionSetter>(*state, thisValue, encodedValue, "attrWithSetterException");
482 }
483
484 static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
485 {
486     UNUSED_PARAM(throwScope);
487     UNUSED_PARAM(state);
488     auto& impl = thisObject.wrapped();
489     JSValue result = toJS<IDLDOMString>(state, throwScope, impl.stringAttrWithGetterException());
490     return result;
491 }
492
493 EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
494 {
495     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsStringAttrWithGetterExceptionGetter>(*state, thisValue, "stringAttrWithGetterException");
496 }
497
498 static inline bool setJSTestTypedefsStringAttrWithGetterExceptionSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
499 {
500     UNUSED_PARAM(state);
501     UNUSED_PARAM(throwScope);
502     auto& impl = thisObject.wrapped();
503     auto nativeValue = convert<IDLDOMString>(state, value);
504     RETURN_IF_EXCEPTION(throwScope, false);
505     impl.setStringAttrWithGetterException(WTFMove(nativeValue));
506     return true;
507 }
508
509 bool setJSTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
510 {
511     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsStringAttrWithGetterExceptionSetter>(*state, thisValue, encodedValue, "stringAttrWithGetterException");
512 }
513
514 static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
515 {
516     UNUSED_PARAM(throwScope);
517     UNUSED_PARAM(state);
518     auto& impl = thisObject.wrapped();
519     JSValue result = toJS<IDLDOMString>(state, impl.stringAttrWithSetterException());
520     return result;
521 }
522
523 EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
524 {
525     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsStringAttrWithSetterExceptionGetter>(*state, thisValue, "stringAttrWithSetterException");
526 }
527
528 static inline bool setJSTestTypedefsStringAttrWithSetterExceptionSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
529 {
530     UNUSED_PARAM(state);
531     UNUSED_PARAM(throwScope);
532     auto& impl = thisObject.wrapped();
533     auto nativeValue = convert<IDLDOMString>(state, value);
534     RETURN_IF_EXCEPTION(throwScope, false);
535     propagateException(state, throwScope, impl.setStringAttrWithSetterException(WTFMove(nativeValue)));
536     return true;
537 }
538
539 bool setJSTestTypedefsStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
540 {
541     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsStringAttrWithSetterExceptionSetter>(*state, thisValue, encodedValue, "stringAttrWithSetterException");
542 }
543
544 static inline JSValue jsTestTypedefsBufferSourceAttrGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
545 {
546     UNUSED_PARAM(throwScope);
547     UNUSED_PARAM(state);
548     auto& impl = thisObject.wrapped();
549     JSValue result = toJS<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, *thisObject.globalObject(), impl.bufferSourceAttr());
550     return result;
551 }
552
553 EncodedJSValue jsTestTypedefsBufferSourceAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
554 {
555     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsBufferSourceAttrGetter>(*state, thisValue, "bufferSourceAttr");
556 }
557
558 static inline bool setJSTestTypedefsBufferSourceAttrSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
559 {
560     UNUSED_PARAM(state);
561     UNUSED_PARAM(throwScope);
562     auto& impl = thisObject.wrapped();
563     auto nativeValue = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, value);
564     RETURN_IF_EXCEPTION(throwScope, false);
565     impl.setBufferSourceAttr(WTFMove(nativeValue));
566     return true;
567 }
568
569 bool setJSTestTypedefsBufferSourceAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
570 {
571     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsBufferSourceAttrSetter>(*state, thisValue, encodedValue, "bufferSourceAttr");
572 }
573
574 static inline JSValue jsTestTypedefsDomTimeStampAttrGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
575 {
576     UNUSED_PARAM(throwScope);
577     UNUSED_PARAM(state);
578     auto& impl = thisObject.wrapped();
579     JSValue result = toJS<IDLUnsignedLongLong>(impl.domTimeStampAttr());
580     return result;
581 }
582
583 EncodedJSValue jsTestTypedefsDomTimeStampAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
584 {
585     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsDomTimeStampAttrGetter>(*state, thisValue, "domTimeStampAttr");
586 }
587
588 static inline bool setJSTestTypedefsDomTimeStampAttrSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
589 {
590     UNUSED_PARAM(state);
591     UNUSED_PARAM(throwScope);
592     auto& impl = thisObject.wrapped();
593     auto nativeValue = convert<IDLUnsignedLongLong>(state, value);
594     RETURN_IF_EXCEPTION(throwScope, false);
595     impl.setDomTimeStampAttr(WTFMove(nativeValue));
596     return true;
597 }
598
599 bool setJSTestTypedefsDomTimeStampAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
600 {
601     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsDomTimeStampAttrSetter>(*state, thisValue, encodedValue, "domTimeStampAttr");
602 }
603
604 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
605 {
606     UNUSED_PARAM(state);
607     UNUSED_PARAM(throwScope);
608     auto& impl = castedThis->wrapped();
609     auto x = state->argument(0).isUndefined() ? Converter<IDLSequence<IDLLong>>::ReturnType{ } : convert<IDLSequence<IDLLong>>(*state, state->uncheckedArgument(0));
610     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
611     impl.func(WTFMove(x));
612     return JSValue::encode(jsUndefined());
613 }
614
615 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* state)
616 {
617     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionFuncBody>(*state, "func");
618 }
619
620 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSetShadowBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
621 {
622     UNUSED_PARAM(state);
623     UNUSED_PARAM(throwScope);
624     auto& impl = castedThis->wrapped();
625     if (UNLIKELY(state->argumentCount() < 3))
626         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
627     auto width = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(0));
628     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
629     auto height = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(1));
630     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
631     auto blur = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(2));
632     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
633     auto color = state->argument(3).isUndefined() ? String() : convert<IDLDOMString>(*state, state->uncheckedArgument(3));
634     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
635     auto alpha = state->argument(4).isUndefined() ? std::optional<Converter<IDLUnrestrictedFloat>::ReturnType>() : std::optional<Converter<IDLUnrestrictedFloat>::ReturnType>(convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(4)));
636     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
637     impl.setShadow(WTFMove(width), WTFMove(height), WTFMove(blur), WTFMove(color), WTFMove(alpha));
638     return JSValue::encode(jsUndefined());
639 }
640
641 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState* state)
642 {
643     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionSetShadowBody>(*state, "setShadow");
644 }
645
646 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
647 {
648     UNUSED_PARAM(state);
649     UNUSED_PARAM(throwScope);
650     auto& impl = castedThis->wrapped();
651     if (UNLIKELY(state->argumentCount() < 1))
652         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
653     auto sequenceArg = convert<IDLSequence<IDLSerializedScriptValue<SerializedScriptValue>>>(*state, state->uncheckedArgument(0));
654     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
655     return JSValue::encode(toJS<IDLUnsignedLongLong>(impl.methodWithSequenceArg(WTFMove(sequenceArg))));
656 }
657
658 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(ExecState* state)
659 {
660     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody>(*state, "methodWithSequenceArg");
661 }
662
663 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
664 {
665     UNUSED_PARAM(state);
666     UNUSED_PARAM(throwScope);
667     auto& impl = castedThis->wrapped();
668     if (UNLIKELY(state->argumentCount() < 1))
669         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
670     auto sequenceArg = convert<IDLNullable<IDLSequence<IDLDOMString>>>(*state, state->uncheckedArgument(0));
671     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
672     impl.nullableSequenceArg(WTFMove(sequenceArg));
673     return JSValue::encode(jsUndefined());
674 }
675
676 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceArg(ExecState* state)
677 {
678     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionNullableSequenceArgBody>(*state, "nullableSequenceArg");
679 }
680
681 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
682 {
683     UNUSED_PARAM(state);
684     UNUSED_PARAM(throwScope);
685     auto& impl = castedThis->wrapped();
686     if (UNLIKELY(state->argumentCount() < 1))
687         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
688     auto sequenceArg = convert<IDLSequence<IDLNullable<IDLDOMString>>>(*state, state->uncheckedArgument(0));
689     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
690     impl.sequenceOfNullablesArg(WTFMove(sequenceArg));
691     return JSValue::encode(jsUndefined());
692 }
693
694 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(ExecState* state)
695 {
696     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody>(*state, "sequenceOfNullablesArg");
697 }
698
699 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
700 {
701     UNUSED_PARAM(state);
702     UNUSED_PARAM(throwScope);
703     auto& impl = castedThis->wrapped();
704     if (UNLIKELY(state->argumentCount() < 1))
705         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
706     auto sequenceArg = convert<IDLNullable<IDLSequence<IDLNullable<IDLDOMString>>>>(*state, state->uncheckedArgument(0));
707     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
708     impl.nullableSequenceOfNullablesArg(WTFMove(sequenceArg));
709     return JSValue::encode(jsUndefined());
710 }
711
712 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(ExecState* state)
713 {
714     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody>(*state, "nullableSequenceOfNullablesArg");
715 }
716
717 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
718 {
719     UNUSED_PARAM(state);
720     UNUSED_PARAM(throwScope);
721     auto& impl = castedThis->wrapped();
722     if (UNLIKELY(state->argumentCount() < 1))
723         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
724     auto sequenceArg = convert<IDLNullable<IDLSequence<IDLUnion<IDLDOMString, IDLSequence<IDLDOMString>>>>>(*state, state->uncheckedArgument(0));
725     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
726     impl.nullableSequenceOfUnionsArg(WTFMove(sequenceArg));
727     return JSValue::encode(jsUndefined());
728 }
729
730 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg(ExecState* state)
731 {
732     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody>(*state, "nullableSequenceOfUnionsArg");
733 }
734
735 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionUnionArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
736 {
737     UNUSED_PARAM(state);
738     UNUSED_PARAM(throwScope);
739     auto& impl = castedThis->wrapped();
740     if (UNLIKELY(state->argumentCount() < 1))
741         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
742     auto unionArg = convert<IDLUnion<IDLDOMString, IDLLong>>(*state, state->uncheckedArgument(0));
743     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
744     impl.unionArg(WTFMove(unionArg));
745     return JSValue::encode(jsUndefined());
746 }
747
748 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(ExecState* state)
749 {
750     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionUnionArgBody>(*state, "unionArg");
751 }
752
753 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
754 {
755     UNUSED_PARAM(state);
756     UNUSED_PARAM(throwScope);
757     auto& impl = castedThis->wrapped();
758     if (UNLIKELY(state->argumentCount() < 1))
759         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
760     auto arg1 = convert<IDLClampAdaptor<IDLUnsignedLongLong>>(*state, state->uncheckedArgument(0));
761     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
762     auto arg2 = state->argument(1).isUndefined() ? std::optional<Converter<IDLClampAdaptor<IDLUnsignedLongLong>>::ReturnType>() : std::optional<Converter<IDLClampAdaptor<IDLUnsignedLongLong>>::ReturnType>(convert<IDLClampAdaptor<IDLUnsignedLongLong>>(*state, state->uncheckedArgument(1)));
763     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
764     impl.funcWithClamp(WTFMove(arg1), WTFMove(arg2));
765     return JSValue::encode(jsUndefined());
766 }
767
768 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecState* state)
769 {
770     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionFuncWithClampBody>(*state, "funcWithClamp");
771 }
772
773 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
774 {
775     UNUSED_PARAM(state);
776     UNUSED_PARAM(throwScope);
777     auto& impl = castedThis->wrapped();
778     if (UNLIKELY(state->argumentCount() < 1))
779         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
780     auto arg = convert<IDLClampAdaptor<IDLLong>>(*state, state->uncheckedArgument(0));
781     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
782     impl.funcWithClampInTypedef(WTFMove(arg));
783     return JSValue::encode(jsUndefined());
784 }
785
786 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef(ExecState* state)
787 {
788     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody>(*state, "funcWithClampInTypedef");
789 }
790
791 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionPointFunctionBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
792 {
793     UNUSED_PARAM(state);
794     UNUSED_PARAM(throwScope);
795     auto& impl = castedThis->wrapped();
796     return JSValue::encode(toJS<IDLInterface<SVGPoint>>(*state, *castedThis->globalObject(), impl.pointFunction()));
797 }
798
799 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionPointFunction(ExecState* state)
800 {
801     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionPointFunctionBody>(*state, "pointFunction");
802 }
803
804 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
805 {
806     UNUSED_PARAM(state);
807     UNUSED_PARAM(throwScope);
808     auto& impl = castedThis->wrapped();
809     if (UNLIKELY(state->argumentCount() < 1))
810         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
811     auto values = convert<IDLSequence<IDLDOMString>>(*state, state->uncheckedArgument(0));
812     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
813     return JSValue::encode(toJS<IDLSequence<IDLDOMString>>(*state, *castedThis->globalObject(), throwScope, impl.stringSequenceFunction(WTFMove(values))));
814 }
815
816 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(ExecState* state)
817 {
818     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody>(*state, "stringSequenceFunction");
819 }
820
821 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
822 {
823     UNUSED_PARAM(state);
824     UNUSED_PARAM(throwScope);
825     auto& impl = castedThis->wrapped();
826     if (UNLIKELY(state->argumentCount() < 1))
827         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
828     auto values = convert<IDLSequence<IDLDOMString>>(*state, state->uncheckedArgument(0));
829     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
830     return JSValue::encode(toJS<IDLSequence<IDLDOMString>>(*state, *castedThis->globalObject(), throwScope, impl.stringSequenceFunction2(WTFMove(values))));
831 }
832
833 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction2(ExecState* state)
834 {
835     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body>(*state, "stringSequenceFunction2");
836 }
837
838 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
839 {
840     UNUSED_PARAM(state);
841     UNUSED_PARAM(throwScope);
842     auto& impl = castedThis->wrapped();
843     if (UNLIKELY(state->argumentCount() < 1))
844         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
845     auto sequenceArg = convert<IDLSequence<IDLInterface<TestEventTarget>>>(*state, state->uncheckedArgument(0));
846     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
847     return JSValue::encode(toJS<IDLBoolean>(impl.callWithSequenceThatRequiresInclude(WTFMove(sequenceArg))));
848 }
849
850 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(ExecState* state)
851 {
852     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody>(*state, "callWithSequenceThatRequiresInclude");
853 }
854
855 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithExceptionBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
856 {
857     UNUSED_PARAM(state);
858     UNUSED_PARAM(throwScope);
859     auto& impl = castedThis->wrapped();
860     propagateException(*state, throwScope, impl.methodWithException());
861     return JSValue::encode(jsUndefined());
862 }
863
864 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(ExecState* state)
865 {
866     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionMethodWithExceptionBody>(*state, "methodWithException");
867 }
868
869 bool JSTestTypedefsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
870 {
871     UNUSED_PARAM(handle);
872     UNUSED_PARAM(visitor);
873     return false;
874 }
875
876 void JSTestTypedefsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
877 {
878     auto* jsTestTypedefs = static_cast<JSTestTypedefs*>(handle.slot()->asCell());
879     auto& world = *static_cast<DOMWrapperWorld*>(context);
880     uncacheWrapper(world, &jsTestTypedefs->wrapped(), jsTestTypedefs);
881 }
882
883 #if ENABLE(BINDING_INTEGRITY)
884 #if PLATFORM(WIN)
885 #pragma warning(disable: 4483)
886 extern "C" { extern void (*const __identifier("??_7TestTypedefs@WebCore@@6B@")[])(); }
887 #else
888 extern "C" { extern void* _ZTVN7WebCore12TestTypedefsE[]; }
889 #endif
890 #endif
891
892 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestTypedefs>&& impl)
893 {
894
895 #if ENABLE(BINDING_INTEGRITY)
896     void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
897 #if PLATFORM(WIN)
898     void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestTypedefs@WebCore@@6B@"));
899 #else
900     void* expectedVTablePointer = &_ZTVN7WebCore12TestTypedefsE[2];
901 #endif
902
903     // If this fails TestTypedefs does not have a vtable, so you need to add the
904     // ImplementationLacksVTable attribute to the interface definition
905     static_assert(std::is_polymorphic<TestTypedefs>::value, "TestTypedefs is not polymorphic");
906
907     // If you hit this assertion you either have a use after free bug, or
908     // TestTypedefs has subclasses. If TestTypedefs has subclasses that get passed
909     // to toJS() we currently require TestTypedefs you to opt out of binding hardening
910     // by adding the SkipVTableValidation attribute to the interface IDL definition
911     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
912 #endif
913     return createWrapper<TestTypedefs>(globalObject, WTFMove(impl));
914 }
915
916 JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestTypedefs& impl)
917 {
918     return wrap(state, globalObject, impl);
919 }
920
921 TestTypedefs* JSTestTypedefs::toWrapped(JSC::VM& vm, JSC::JSValue value)
922 {
923     if (auto* wrapper = jsDynamicDowncast<JSTestTypedefs*>(vm, value))
924         return &wrapper->wrapped();
925     return nullptr;
926 }
927
928 }