Replace WTF::move with WTFMove
[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 "DOMStringList.h"
26 #include "Dictionary.h"
27 #include "Document.h"
28 #include "ExceptionCode.h"
29 #include "Frame.h"
30 #include "HTMLNames.h"
31 #include "JSDOMBinding.h"
32 #include "JSDOMConstructor.h"
33 #include "JSDOMPromise.h"
34 #include "JSDOMStringList.h"
35 #include "JSDocument.h"
36 #include "JSEventListener.h"
37 #include "JSNode.h"
38 #include "JSSVGDocument.h"
39 #include "JSSVGPoint.h"
40 #include "JSScriptProfile.h"
41 #include "JSTestCallback.h"
42 #include "JSTestCallbackFunction.h"
43 #include "JSTestNode.h"
44 #include "JSTestObj.h"
45 #include "JSTestSubObj.h"
46 #include "JSbool.h"
47 #include "SVGDocument.h"
48 #include "SVGPoint.h"
49 #include "SVGStaticPropertyTearOff.h"
50 #include "ScriptProfile.h"
51 #include "SerializedScriptValue.h"
52 #include "Settings.h"
53 #include "TestNode.h"
54 #include "TestObj.h"
55 #include "URL.h"
56 #include "WebCoreJSClientData.h"
57 #include "bool.h"
58 #include <bindings/ScriptValue.h>
59 #include <inspector/ScriptArguments.h>
60 #include <inspector/ScriptCallStackFactory.h>
61 #include <runtime/Error.h>
62 #include <runtime/JSArray.h>
63 #include <runtime/JSString.h>
64 #include <runtime/Symbol.h>
65 #include <wtf/GetPtr.h>
66
67 #if ENABLE(Condition1)
68 #include "JSTestObjectA.h"
69 #endif
70
71 #if ENABLE(Condition1) && ENABLE(Condition2)
72 #include "JSTestObjectB.h"
73 #endif
74
75 #if ENABLE(Condition1) || ENABLE(Condition2)
76 #include "JSTestObjectC.h"
77 #endif
78
79 #if ENABLE(Condition3) || ENABLE(Condition4)
80 #include "TestObjBuiltins.h"
81 #endif
82
83 using namespace JSC;
84
85 namespace WebCore {
86
87 // Functions
88
89 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(JSC::ExecState*);
90 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(JSC::ExecState*);
91 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(JSC::ExecState*);
92 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(JSC::ExecState*);
93 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(JSC::ExecState*);
94 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(JSC::ExecState*);
95 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(JSC::ExecState*);
96 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(JSC::ExecState*);
97 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(JSC::ExecState*);
98 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(JSC::ExecState*);
99 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
100 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(JSC::ExecState*);
101 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(JSC::ExecState*);
102 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue(JSC::ExecState*);
103 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(JSC::ExecState*);
104 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(JSC::ExecState*);
105 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(JSC::ExecState*);
106 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(JSC::ExecState*);
107 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionWithMessage(JSC::ExecState*);
108 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(JSC::ExecState*);
109 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(JSC::ExecState*);
110 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPrivateMethod(JSC::ExecState*);
111 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(JSC::ExecState*);
112 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(JSC::ExecState*);
113 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(JSC::ExecState*);
114 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(JSC::ExecState*);
115 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(JSC::ExecState*);
116 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(JSC::ExecState*);
117 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(JSC::ExecState*);
118 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(JSC::ExecState*);
119 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(JSC::ExecState*);
120 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(JSC::ExecState*);
121 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(JSC::ExecState*);
122 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(JSC::ExecState*);
123 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue(JSC::ExecState*);
124 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(JSC::ExecState*);
125 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*);
126 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(JSC::ExecState*);
127 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue(JSC::ExecState*);
128 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(JSC::ExecState*);
129 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString(JSC::ExecState*);
130 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*);
131 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*);
132 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*);
133 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg(JSC::ExecState*);
134 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(JSC::ExecState*);
135 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(JSC::ExecState*);
136 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg(JSC::ExecState*);
137 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackArg(JSC::ExecState*);
138 #if ENABLE(Condition1)
139 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(JSC::ExecState*);
140 #endif
141 #if ENABLE(Condition1) && ENABLE(Condition2)
142 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(JSC::ExecState*);
143 #endif
144 #if ENABLE(Condition1) || ENABLE(Condition2)
145 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(JSC::ExecState*);
146 #endif
147 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(JSC::ExecState*);
148 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter(JSC::ExecState*);
149 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(JSC::ExecState*);
150 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(JSC::ExecState*);
151 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod2(JSC::ExecState*);
152 #if ENABLE(Condition1)
153 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(JSC::ExecState*);
154 #endif
155 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(JSC::ExecState*);
156 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(JSC::ExecState*);
157 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(JSC::ExecState*);
158 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(JSC::ExecState*);
159 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence(JSC::ExecState*);
160 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2(JSC::ExecState*);
161 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(JSC::ExecState*);
162 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(JSC::ExecState*);
163 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(JSC::ExecState*);
164 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(JSC::ExecState*);
165 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(JSC::ExecState*);
166 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(JSC::ExecState*);
167 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(JSC::ExecState*);
168 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(JSC::ExecState*);
169 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(JSC::ExecState*);
170 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequence(JSC::ExecState*);
171 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(JSC::ExecState*);
172 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(JSC::ExecState*);
173 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(JSC::ExecState*);
174 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(JSC::ExecState*);
175 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(JSC::ExecState*);
176 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunction(JSC::ExecState*);
177 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument(JSC::ExecState*);
178 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithException(JSC::ExecState*);
179 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument(JSC::ExecState*);
180
181 // Attributes
182
183 JSC::EncodedJSValue jsTestObjReadOnlyLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
184 JSC::EncodedJSValue jsTestObjReadOnlyStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
185 JSC::EncodedJSValue jsTestObjReadOnlyTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
186 JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
187 JSC::EncodedJSValue jsTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
188 void setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
189 JSC::EncodedJSValue jsTestObjConstructorTestSubObj(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
190 JSC::EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
191 void setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
192 JSC::EncodedJSValue jsTestObjEnumAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
193 void setJSTestObjEnumAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
194 JSC::EncodedJSValue jsTestObjByteAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
195 void setJSTestObjByteAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
196 JSC::EncodedJSValue jsTestObjOctetAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
197 void setJSTestObjOctetAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
198 JSC::EncodedJSValue jsTestObjShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
199 void setJSTestObjShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
200 JSC::EncodedJSValue jsTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
201 void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
202 JSC::EncodedJSValue jsTestObjLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
203 void setJSTestObjLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
204 JSC::EncodedJSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
205 void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
206 JSC::EncodedJSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
207 void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
208 JSC::EncodedJSValue jsTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
209 void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
210 JSC::EncodedJSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
211 void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
212 JSC::EncodedJSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
213 void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
214 JSC::EncodedJSValue jsTestObjCreate(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
215 void setJSTestObjCreate(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
216 JSC::EncodedJSValue jsTestObjReadOnlySymbolAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
217 JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlySymbolAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
218 JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
219 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
220 JSC::EncodedJSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
221 void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
222 JSC::EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
223 void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
224 JSC::EncodedJSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
225 void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
226 JSC::EncodedJSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
227 void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
228 JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
229 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
230 JSC::EncodedJSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
231 void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
232 JSC::EncodedJSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
233 void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
234 JSC::EncodedJSValue jsTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
235 void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
236 JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
237 void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
238 JSC::EncodedJSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
239 void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
240 JSC::EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
241 void setJSTestObjAttrWithGetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
242 JSC::EncodedJSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
243 void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
244 JSC::EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
245 void setJSTestObjAttrWithSetterExceptionWithMessage(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
246 JSC::EncodedJSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
247 void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
248 JSC::EncodedJSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
249 void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
250 JSC::EncodedJSValue jsTestObjStrictTypeCheckingAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
251 void setJSTestObjStrictTypeCheckingAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
252 JSC::EncodedJSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
253 void setJSTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
254 JSC::EncodedJSValue jsTestObjOnfoo(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
255 void setJSTestObjOnfoo(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
256 JSC::EncodedJSValue jsTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
257 void setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
258 JSC::EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
259 void setJSTestObjWithCallWithAndSetterCallWithAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
260 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
261 void setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
262 JSC::EncodedJSValue jsTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
263 void setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
264 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
265 void setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
266 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
267 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
268 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
269 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
270 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
271 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
272 JSC::EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
273 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
274 #if ENABLE(Condition1)
275 JSC::EncodedJSValue jsTestObjConditionalAttr1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
276 void setJSTestObjConditionalAttr1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
277 #endif
278 #if ENABLE(Condition1) && ENABLE(Condition2)
279 JSC::EncodedJSValue jsTestObjConditionalAttr2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
280 void setJSTestObjConditionalAttr2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
281 #endif
282 #if ENABLE(Condition1) || ENABLE(Condition2)
283 JSC::EncodedJSValue jsTestObjConditionalAttr3(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
284 void setJSTestObjConditionalAttr3(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
285 #endif
286 #if ENABLE(Condition1)
287 JSC::EncodedJSValue jsTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
288 void setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
289 #endif
290 #if ENABLE(Condition1) && ENABLE(Condition2)
291 JSC::EncodedJSValue jsTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
292 void setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
293 #endif
294 #if ENABLE(Condition1) || ENABLE(Condition2)
295 JSC::EncodedJSValue jsTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
296 void setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
297 #endif
298 JSC::EncodedJSValue jsTestObjCachedAttribute1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
299 JSC::EncodedJSValue jsTestObjCachedAttribute2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
300 JSC::EncodedJSValue jsTestObjAnyAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
301 void setJSTestObjAnyAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
302 JSC::EncodedJSValue jsTestObjContentDocument(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
303 JSC::EncodedJSValue jsTestObjMutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
304 void setJSTestObjMutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
305 JSC::EncodedJSValue jsTestObjImmutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
306 void setJSTestObjImmutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
307 JSC::EncodedJSValue jsTestObjStrawberry(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
308 void setJSTestObjStrawberry(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
309 JSC::EncodedJSValue jsTestObjStrictFloat(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
310 void setJSTestObjStrictFloat(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
311 JSC::EncodedJSValue jsTestObjDescription(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
312 JSC::EncodedJSValue jsTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
313 void setJSTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
314 JSC::EncodedJSValue jsTestObjHash(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
315 JSC::EncodedJSValue jsTestObjReplaceableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
316 void setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
317 JSC::EncodedJSValue jsTestObjNullableDoubleAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
318 JSC::EncodedJSValue jsTestObjNullableLongAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
319 JSC::EncodedJSValue jsTestObjNullableBooleanAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
320 JSC::EncodedJSValue jsTestObjNullableStringAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
321 JSC::EncodedJSValue jsTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
322 void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
323 JSC::EncodedJSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
324 void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
325 JSC::EncodedJSValue jsTestObjAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
326 JSC::EncodedJSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
327 void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
328 JSC::EncodedJSValue jsTestObjPutForwardsAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
329 void setJSTestObjPutForwardsAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
330 JSC::EncodedJSValue jsTestObjPutForwardsNullableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
331 void setJSTestObjPutForwardsNullableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
332 JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
333
334 class JSTestObjPrototype : public JSC::JSNonFinalObject {
335 public:
336     typedef JSC::JSNonFinalObject Base;
337     static JSTestObjPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
338     {
339         JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure);
340         ptr->finishCreation(vm);
341         return ptr;
342     }
343
344     DECLARE_INFO;
345     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
346     {
347         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
348     }
349
350 private:
351     JSTestObjPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
352         : JSC::JSNonFinalObject(vm, structure)
353     {
354     }
355
356     void finishCreation(JSC::VM&);
357 };
358
359 typedef JSDOMConstructor<JSTestObj> JSTestObjConstructor;
360
361 /* Hash table */
362
363 static const struct CompactHashIndex JSTestObjTableIndex[17] = {
364     { 5, -1 },
365     { -1, -1 },
366     { -1, -1 },
367     { -1, -1 },
368     { -1, -1 },
369     { -1, -1 },
370     { 4, -1 },
371     { -1, -1 },
372     { -1, -1 },
373     { 2, -1 },
374     { 0, 16 },
375     { -1, -1 },
376     { 1, -1 },
377     { -1, -1 },
378     { -1, -1 },
379     { -1, -1 },
380     { 3, -1 },
381 };
382
383
384 static const HashTableValue JSTestObjTableValues[] =
385 {
386     { "TestSubObjEnabledBySetting", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestSubObjEnabledBySettingConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestSubObjEnabledBySettingConstructor) } },
387     { "customAttr", DontDelete | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCustomAttr) } },
388 #if ENABLE(Condition1)
389     { "conditionalAttr4", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr4Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr4Constructor) } },
390 #else
391     { 0, 0, NoIntrinsic, { 0, 0 } },
392 #endif
393 #if ENABLE(Condition1) && ENABLE(Condition2)
394     { "conditionalAttr5", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr5Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr5Constructor) } },
395 #else
396     { 0, 0, NoIntrinsic, { 0, 0 } },
397 #endif
398 #if ENABLE(Condition1) || ENABLE(Condition2)
399     { "conditionalAttr6", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr6Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr6Constructor) } },
400 #else
401     { 0, 0, NoIntrinsic, { 0, 0 } },
402 #endif
403     { "contentDocument", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
404 };
405
406 static const HashTable JSTestObjTable = { 6, 15, true, JSTestObjTableValues, JSTestObjTableIndex };
407 /* Hash table for constructor */
408
409 static const HashTableValue JSTestObjConstructorTableValues[] =
410 {
411 #if ENABLE(Condition1)
412     { "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
413 #else
414     { 0, 0, NoIntrinsic, { 0, 0 } },
415 #endif
416     { "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
417     { "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } },
418     { "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } },
419     { "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(4) } },
420     { "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(8) } },
421     { "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(-1) } },
422     { "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0xffffffff) } },
423     { "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x01) } },
424     { "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0X20) } },
425     { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x1abc) } },
426     { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(15) } },
427     { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
428     { "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
429     { "staticStringAttr", DontDelete, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) } },
430     { "TestSubObj", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
431     { "staticReadOnlySymbolAttr", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlySymbolAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
432     { "staticMethodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
433     { "staticMethodWithCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) } },
434     { "classMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t) (0) } },
435     { "classMethodWithOptional", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethodWithOptional), (intptr_t) (0) } },
436     { "classMethod2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod2), (intptr_t) (1) } },
437 #if ENABLE(Condition1)
438     { "overloadedMethod1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionOverloadedMethod1), (intptr_t) (1) } },
439 #else
440     { 0, 0, NoIntrinsic, { 0, 0 } },
441 #endif
442 };
443
444
445 #if ENABLE(Condition1)
446 COMPILE_ASSERT(0 == TestObj::CONDITIONAL_CONST, TestObjEnumCONDITIONAL_CONSTIsWrongUseDoNotCheckConstants);
447 #endif
448 COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDoNotCheckConstants);
449 COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDoNotCheckConstants);
450 COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDoNotCheckConstants);
451 COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDoNotCheckConstants);
452 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants);
453 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants);
454 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants);
455 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants);
456 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDoNotCheckConstants);
457 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDoNotCheckConstants);
458 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
459 COMPILE_ASSERT(0 == TestObj::readonly, TestObjEnumreadonlyIsWrongUseDoNotCheckConstants);
460
461 template<> EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::construct(ExecState* state)
462 {
463     auto* castedThis = jsCast<JSTestObjConstructor*>(state->callee());
464     if (UNLIKELY(state->argumentCount() < 2))
465         return throwVMError(state, createNotEnoughArgumentsError(state));
466     if (!state->argument(0).isObject())
467         return throwArgumentMustBeFunctionError(*state, 0, "testCallback", "TestObj", nullptr);
468     RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
469     if (!state->argument(1).isFunction())
470         return throwArgumentMustBeFunctionError(*state, 1, "testCallbackFunction", "TestObj", nullptr);
471     RefPtr<TestCallbackFunction> testCallbackFunction = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject());
472     RefPtr<TestObj> object = TestObj::create(testCallback, testCallbackFunction);
473     return JSValue::encode(asObject(toJS(state, castedThis->globalObject(), object.get())));
474 }
475
476 template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
477 {
478     putDirect(vm, vm.propertyNames->prototype, JSTestObj::getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
479     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum);
480     putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
481     reifyStaticProperties(vm, JSTestObjConstructorTableValues, *this);
482 }
483
484 template<> const ClassInfo JSTestObjConstructor::s_info = { "TestObjectConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
485
486 /* Hash table for prototype */
487
488 static const HashTableValue JSTestObjPrototypeTableValues[] =
489 {
490     { "constructor", DontEnum | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
491     { "readOnlyLongAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
492     { "readOnlyStringAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
493     { "readOnlyTestObjAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
494     { "enumAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnumAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnumAttr) } },
495     { "byteAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjByteAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjByteAttr) } },
496     { "octetAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOctetAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOctetAttr) } },
497     { "shortAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjShortAttr) } },
498     { "unsignedShortAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedShortAttr) } },
499     { "longAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongAttr) } },
500     { "longLongAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongLongAttr) } },
501     { "unsignedLongLongAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedLongLongAttr) } },
502     { "stringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttr) } },
503     { "testObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestObjAttr) } },
504     { "XMLObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjXMLObjAttr) } },
505     { "create", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCreate) } },
506     { "readOnlySymbolAttr", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlySymbolAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
507     { "reflectedStringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) } },
508     { "reflectedIntegralAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedIntegralAttr) } },
509     { "reflectedUnsignedIntegralAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedUnsignedIntegralAttr) } },
510     { "reflectedBooleanAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedBooleanAttr) } },
511     { "reflectedURLAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedURLAttr) } },
512     { "reflectedStringAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) } },
513     { "reflectedCustomIntegralAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomIntegralAttr) } },
514     { "reflectedCustomBooleanAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomBooleanAttr) } },
515     { "reflectedCustomURLAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomURLAttr) } },
516     { "typedArrayAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTypedArrayAttr) } },
517     { "attrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithGetterException) } },
518     { "attrWithGetterExceptionWithMessage", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterExceptionWithMessage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithGetterExceptionWithMessage) } },
519     { "attrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithSetterException) } },
520     { "attrWithSetterExceptionWithMessage", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterExceptionWithMessage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithSetterExceptionWithMessage) } },
521     { "stringAttrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithGetterException) } },
522     { "stringAttrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithSetterException) } },
523     { "strictTypeCheckingAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrictTypeCheckingAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrictTypeCheckingAttribute) } },
524 #if ENABLE(Condition4)
525     { "jsBuiltinAttribute", Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinAttributeCodeGenerator), (intptr_t) (setTestObjJsBuiltinAttributeCodeGenerator) } },
526 #else
527     { 0, 0, NoIntrinsic, { 0, 0 } },
528 #endif
529 #if ENABLE(Condition4)
530     { "jsBuiltinReadOnlyAttribute", ReadOnly | Accessor | Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinReadOnlyAttributeCodeGenerator), (intptr_t) (0) } },
531 #else
532     { 0, 0, NoIntrinsic, { 0, 0 } },
533 #endif
534     { "onfoo", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOnfoo), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOnfoo) } },
535     { "withScriptStateAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttribute) } },
536     { "withCallWithAndSetterCallWithAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithCallWithAndSetterCallWithAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithCallWithAndSetterCallWithAttribute) } },
537     { "withScriptExecutionContextAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttribute) } },
538     { "withScriptStateAttributeRaises", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttributeRaises) } },
539     { "withScriptExecutionContextAttributeRaises", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttributeRaises) } },
540     { "withScriptExecutionContextAndScriptStateAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttribute) } },
541     { "withScriptExecutionContextAndScriptStateAttributeRaises", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises) } },
542     { "withScriptExecutionContextAndScriptStateWithSpacesAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute) } },
543     { "withScriptArgumentsAndCallStackAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptArgumentsAndCallStackAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptArgumentsAndCallStackAttribute) } },
544 #if ENABLE(Condition1)
545     { "conditionalAttr1", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr1) } },
546 #else
547     { 0, 0, NoIntrinsic, { 0, 0 } },
548 #endif
549 #if ENABLE(Condition1) && ENABLE(Condition2)
550     { "conditionalAttr2", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr2) } },
551 #else
552     { 0, 0, NoIntrinsic, { 0, 0 } },
553 #endif
554 #if ENABLE(Condition1) || ENABLE(Condition2)
555     { "conditionalAttr3", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr3), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr3) } },
556 #else
557     { 0, 0, NoIntrinsic, { 0, 0 } },
558 #endif
559     { "cachedAttribute1", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
560     { "cachedAttribute2", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
561     { "anyAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAnyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAnyAttribute) } },
562     { "mutablePoint", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjMutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjMutablePoint) } },
563     { "immutablePoint", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImmutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjImmutablePoint) } },
564     { "strawberry", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrawberry), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrawberry) } },
565     { "strictFloat", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrictFloat), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrictFloat) } },
566     { "description", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDescription), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
567     { "id", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjId), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjId) } },
568     { "hash", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
569     { "replaceableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReplaceableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReplaceableAttribute) } },
570     { "nullableDoubleAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableDoubleAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
571     { "nullableLongAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
572     { "nullableBooleanAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableBooleanAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
573     { "nullableStringAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
574     { "nullableLongSettableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableLongSettableAttribute) } },
575     { "nullableStringValue", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringValue) } },
576     { "attribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
577     { "attributeWithReservedEnumType", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) } },
578     { "putForwardsAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjPutForwardsAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjPutForwardsAttribute) } },
579     { "putForwardsNullableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjPutForwardsNullableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjPutForwardsNullableAttribute) } },
580 #if ENABLE(Condition1)
581     { "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
582 #else
583     { 0, 0, NoIntrinsic, { 0, 0 } },
584 #endif
585     { "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
586     { "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(1) } },
587     { "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(2) } },
588     { "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(4) } },
589     { "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(8) } },
590     { "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(-1) } },
591     { "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0xffffffff) } },
592     { "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x01) } },
593     { "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0X20) } },
594     { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0x1abc) } },
595     { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(15) } },
596     { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, { (long long)(0) } },
597     { "voidMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) } },
598     { "voidMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) } },
599     { "byteMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethod), (intptr_t) (0) } },
600     { "byteMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethodWithArgs), (intptr_t) (3) } },
601     { "octetMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethod), (intptr_t) (0) } },
602     { "octetMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethodWithArgs), (intptr_t) (3) } },
603     { "longMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethod), (intptr_t) (0) } },
604     { "longMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethodWithArgs), (intptr_t) (3) } },
605     { "objMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t) (0) } },
606     { "objMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t) (3) } },
607     { "methodWithSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
608     { "methodReturningSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t) (1) } },
609     { "methodWithEnumArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithEnumArg), (intptr_t) (1) } },
610     { "methodWithOptionalEnumArgAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue), (intptr_t) (0) } },
611     { "methodThatRequiresAllArgsAndThrows", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows), (intptr_t) (2) } },
612     { "serializedValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t) (1) } },
613     { "optionsObject", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOptionsObject), (intptr_t) (1) } },
614     { "methodWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t) (0) } },
615     { "methodWithExceptionWithMessage", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithExceptionWithMessage), (intptr_t) (0) } },
616     { "customMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t) (0) } },
617     { "customMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t) (3) } },
618     { "customBindingMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomBindingMethod), (intptr_t) (0) } },
619     { "customBindingMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomBindingMethodWithArgs), (intptr_t) (3) } },
620 #if ENABLE(Condition3)
621     { "jsBuiltinMethod", JSC::Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinMethodCodeGenerator), (intptr_t) (0) } },
622 #else
623     { 0, 0, NoIntrinsic, { 0, 0 } },
624 #endif
625 #if ENABLE(Condition3)
626     { "jsBuiltinMethodWithArgs", JSC::Builtin, NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testObjJsBuiltinMethodWithArgsCodeGenerator), (intptr_t) (3) } },
627 #else
628     { 0, 0, NoIntrinsic, { 0, 0 } },
629 #endif
630     { "addEventListener", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t) (2) } },
631     { "removeEventListener", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t) (2) } },
632     { "withScriptStateVoid", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoid), (intptr_t) (0) } },
633     { "withScriptStateObj", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObj), (intptr_t) (0) } },
634     { "withScriptStateVoidException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoidException), (intptr_t) (0) } },
635     { "withScriptStateObjException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObjException), (intptr_t) (0) } },
636     { "withScriptExecutionContext", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContext), (intptr_t) (0) } },
637     { "withScriptExecutionContextAndScriptState", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState), (intptr_t) (0) } },
638     { "withScriptExecutionContextAndScriptStateObjException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException), (intptr_t) (0) } },
639     { "withScriptExecutionContextAndScriptStateWithSpaces", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces), (intptr_t) (0) } },
640     { "withScriptArgumentsAndCallStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack), (intptr_t) (0) } },
641     { "methodWithOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t) (0) } },
642     { "methodWithOptionalArgAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue), (intptr_t) (0) } },
643     { "methodWithNonOptionalArgAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t) (1) } },
644     { "methodWithNonOptionalArgAndTwoOptionalArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t) (1) } },
645     { "methodWithOptionalString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t) (0) } },
646     { "methodWithOptionalStringAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue), (intptr_t) (0) } },
647     { "methodWithOptionalStringIsUndefined", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t) (0) } },
648     { "methodWithOptionalStringIsNullString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString), (intptr_t) (0) } },
649     { "methodWithCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) } },
650     { "methodWithNonCallbackArgAndCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) } },
651     { "methodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
652     { "methodWithCallbackFunctionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg), (intptr_t) (1) } },
653     { "methodWithNonCallbackArgAndCallbackFunctionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg), (intptr_t) (2) } },
654     { "methodWithCallbackFunctionAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg), (intptr_t) (0) } },
655 #if ENABLE(Condition1)
656     { "conditionalMethod1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) } },
657 #else
658     { 0, 0, NoIntrinsic, { 0, 0 } },
659 #endif
660 #if ENABLE(Condition1) && ENABLE(Condition2)
661     { "conditionalMethod2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod2), (intptr_t) (0) } },
662 #else
663     { 0, 0, NoIntrinsic, { 0, 0 } },
664 #endif
665 #if ENABLE(Condition1) || ENABLE(Condition2)
666     { "conditionalMethod3", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t) (0) } },
667 #else
668     { 0, 0, NoIntrinsic, { 0, 0 } },
669 #endif
670     { "overloadedMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t) (2) } },
671     { "overloadedMethodWithOptionalParameter", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter), (intptr_t) (1) } },
672     { "classMethodWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t) (2) } },
673     { "methodWithUnsignedLongSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence), (intptr_t) (1) } },
674     { "stringArrayFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStringArrayFunction), (intptr_t) (1) } },
675     { "domStringListFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionDomStringListFunction), (intptr_t) (1) } },
676     { "methodWithAndWithoutNullableSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence), (intptr_t) (2) } },
677     { "methodWithAndWithoutNullableSequence2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2), (intptr_t) (2) } },
678     { "getSVGDocument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t) (0) } },
679     { "convert1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t) (1) } },
680     { "convert2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t) (1) } },
681     { "convert4", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t) (1) } },
682     { "convert5", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t) (1) } },
683     { "mutablePointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t) (0) } },
684     { "immutablePointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionImmutablePointFunction), (intptr_t) (0) } },
685     { "orange", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOrange), (intptr_t) (0) } },
686     { "strictFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunction), (intptr_t) (3) } },
687     { "strictFunctionWithSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunctionWithSequence), (intptr_t) (2) } },
688     { "strictFunctionWithArray", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunctionWithArray), (intptr_t) (2) } },
689     { "variadicStringMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicStringMethod), (intptr_t) (1) } },
690     { "variadicDoubleMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicDoubleMethod), (intptr_t) (1) } },
691     { "variadicNodeMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicNodeMethod), (intptr_t) (1) } },
692     { "any", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAny), (intptr_t) (2) } },
693     { "testPromiseFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunction), (intptr_t) (0) } },
694     { "testPromiseFunctionWithFloatArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument), (intptr_t) (1) } },
695     { "testPromiseFunctionWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithException), (intptr_t) (0) } },
696     { "testPromiseFunctionWithOptionalIntArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } },
697 };
698
699 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
700
701 void JSTestObjPrototype::finishCreation(VM& vm)
702 {
703     Base::finishCreation(vm);
704     reifyStaticProperties(vm, JSTestObjPrototypeTableValues, *this);
705     JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
706     putDirect(vm, clientData.builtinNames().privateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPrivateMethod), ReadOnly | DontEnum);
707 }
708
709 const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, CREATE_METHOD_TABLE(JSTestObj) };
710
711 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestObj>&& impl)
712     : JSDOMWrapper<TestObj>(structure, globalObject, WTFMove(impl))
713 {
714 }
715
716 JSObject* JSTestObj::createPrototype(VM& vm, JSGlobalObject* globalObject)
717 {
718     return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
719 }
720
721 JSObject* JSTestObj::getPrototype(VM& vm, JSGlobalObject* globalObject)
722 {
723     return getDOMPrototype<JSTestObj>(vm, globalObject);
724 }
725
726 void JSTestObj::destroy(JSC::JSCell* cell)
727 {
728     JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
729     thisObject->JSTestObj::~JSTestObj();
730 }
731
732 bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
733 {
734     auto* thisObject = jsCast<JSTestObj*>(object);
735     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
736     if (getStaticValueSlot<JSTestObj, Base>(state, JSTestObjTable, thisObject, propertyName, slot))
737         return true;
738     return false;
739 }
740
741 EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
742 {
743     UNUSED_PARAM(state);
744     UNUSED_PARAM(slotBase);
745     UNUSED_PARAM(thisValue);
746     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
747     if (UNLIKELY(!castedThis)) {
748         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
749             return reportDeprecatedGetterError(*state, "TestObj", "readOnlyLongAttr");
750         return throwGetterTypeError(*state, "TestObj", "readOnlyLongAttr");
751     }
752     auto& impl = castedThis->wrapped();
753     JSValue result = jsNumber(impl.readOnlyLongAttr());
754     return JSValue::encode(result);
755 }
756
757
758 EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
759 {
760     UNUSED_PARAM(state);
761     UNUSED_PARAM(slotBase);
762     UNUSED_PARAM(thisValue);
763     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
764     if (UNLIKELY(!castedThis)) {
765         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
766             return reportDeprecatedGetterError(*state, "TestObj", "readOnlyStringAttr");
767         return throwGetterTypeError(*state, "TestObj", "readOnlyStringAttr");
768     }
769     auto& impl = castedThis->wrapped();
770     JSValue result = jsStringWithCache(state, impl.readOnlyStringAttr());
771     return JSValue::encode(result);
772 }
773
774
775 EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
776 {
777     UNUSED_PARAM(state);
778     UNUSED_PARAM(slotBase);
779     UNUSED_PARAM(thisValue);
780     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
781     if (UNLIKELY(!castedThis)) {
782         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
783             return reportDeprecatedGetterError(*state, "TestObj", "readOnlyTestObjAttr");
784         return throwGetterTypeError(*state, "TestObj", "readOnlyTestObjAttr");
785     }
786     auto& impl = castedThis->wrapped();
787     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.readOnlyTestObjAttr()));
788     return JSValue::encode(result);
789 }
790
791
792 EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
793 {
794     UNUSED_PARAM(state);
795     UNUSED_PARAM(slotBase);
796     UNUSED_PARAM(thisValue);
797     JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
798     return JSValue::encode(result);
799 }
800
801
802 EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
803 {
804     UNUSED_PARAM(state);
805     UNUSED_PARAM(slotBase);
806     UNUSED_PARAM(thisValue);
807     JSValue result = jsStringWithCache(state, TestObj::staticStringAttr());
808     return JSValue::encode(result);
809 }
810
811
812 EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
813 {
814     UNUSED_PARAM(state);
815     UNUSED_PARAM(slotBase);
816     UNUSED_PARAM(thisValue);
817     auto* castedThis = jsCast<JSTestObj*>(slotBase);
818     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
819 }
820
821
822 EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
823 {
824     UNUSED_PARAM(state);
825     UNUSED_PARAM(slotBase);
826     UNUSED_PARAM(thisValue);
827     auto* castedThis = jsCast<JSTestObj*>(slotBase);
828     if (!castedThis->wrapped().frame())
829         return JSValue::encode(jsUndefined());
830     Settings& settings = castedThis->wrapped().frame()->settings();
831     if (!settings.testSettingEnabled())
832         return JSValue::encode(jsUndefined());
833     return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
834 }
835
836
837 EncodedJSValue jsTestObjEnumAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
838 {
839     UNUSED_PARAM(state);
840     UNUSED_PARAM(slotBase);
841     UNUSED_PARAM(thisValue);
842     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
843     if (UNLIKELY(!castedThis)) {
844         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
845             return reportDeprecatedGetterError(*state, "TestObj", "enumAttr");
846         return throwGetterTypeError(*state, "TestObj", "enumAttr");
847     }
848     auto& impl = castedThis->wrapped();
849     JSValue result = jsStringWithCache(state, impl.enumAttr());
850     return JSValue::encode(result);
851 }
852
853
854 EncodedJSValue jsTestObjByteAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
855 {
856     UNUSED_PARAM(state);
857     UNUSED_PARAM(slotBase);
858     UNUSED_PARAM(thisValue);
859     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
860     if (UNLIKELY(!castedThis)) {
861         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
862             return reportDeprecatedGetterError(*state, "TestObj", "byteAttr");
863         return throwGetterTypeError(*state, "TestObj", "byteAttr");
864     }
865     auto& impl = castedThis->wrapped();
866     JSValue result = jsNumber(impl.byteAttr());
867     return JSValue::encode(result);
868 }
869
870
871 EncodedJSValue jsTestObjOctetAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
872 {
873     UNUSED_PARAM(state);
874     UNUSED_PARAM(slotBase);
875     UNUSED_PARAM(thisValue);
876     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
877     if (UNLIKELY(!castedThis)) {
878         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
879             return reportDeprecatedGetterError(*state, "TestObj", "octetAttr");
880         return throwGetterTypeError(*state, "TestObj", "octetAttr");
881     }
882     auto& impl = castedThis->wrapped();
883     JSValue result = jsNumber(impl.octetAttr());
884     return JSValue::encode(result);
885 }
886
887
888 EncodedJSValue jsTestObjShortAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
889 {
890     UNUSED_PARAM(state);
891     UNUSED_PARAM(slotBase);
892     UNUSED_PARAM(thisValue);
893     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
894     if (UNLIKELY(!castedThis)) {
895         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
896             return reportDeprecatedGetterError(*state, "TestObj", "shortAttr");
897         return throwGetterTypeError(*state, "TestObj", "shortAttr");
898     }
899     auto& impl = castedThis->wrapped();
900     JSValue result = jsNumber(impl.shortAttr());
901     return JSValue::encode(result);
902 }
903
904
905 EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
906 {
907     UNUSED_PARAM(state);
908     UNUSED_PARAM(slotBase);
909     UNUSED_PARAM(thisValue);
910     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
911     if (UNLIKELY(!castedThis)) {
912         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
913             return reportDeprecatedGetterError(*state, "TestObj", "unsignedShortAttr");
914         return throwGetterTypeError(*state, "TestObj", "unsignedShortAttr");
915     }
916     auto& impl = castedThis->wrapped();
917     JSValue result = jsNumber(impl.unsignedShortAttr());
918     return JSValue::encode(result);
919 }
920
921
922 EncodedJSValue jsTestObjLongAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
923 {
924     UNUSED_PARAM(state);
925     UNUSED_PARAM(slotBase);
926     UNUSED_PARAM(thisValue);
927     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
928     if (UNLIKELY(!castedThis)) {
929         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
930             return reportDeprecatedGetterError(*state, "TestObj", "longAttr");
931         return throwGetterTypeError(*state, "TestObj", "longAttr");
932     }
933     auto& impl = castedThis->wrapped();
934     JSValue result = jsNumber(impl.longAttr());
935     return JSValue::encode(result);
936 }
937
938
939 EncodedJSValue jsTestObjLongLongAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
940 {
941     UNUSED_PARAM(state);
942     UNUSED_PARAM(slotBase);
943     UNUSED_PARAM(thisValue);
944     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
945     if (UNLIKELY(!castedThis)) {
946         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
947             return reportDeprecatedGetterError(*state, "TestObj", "longLongAttr");
948         return throwGetterTypeError(*state, "TestObj", "longLongAttr");
949     }
950     auto& impl = castedThis->wrapped();
951     JSValue result = jsNumber(impl.longLongAttr());
952     return JSValue::encode(result);
953 }
954
955
956 EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
957 {
958     UNUSED_PARAM(state);
959     UNUSED_PARAM(slotBase);
960     UNUSED_PARAM(thisValue);
961     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
962     if (UNLIKELY(!castedThis)) {
963         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
964             return reportDeprecatedGetterError(*state, "TestObj", "unsignedLongLongAttr");
965         return throwGetterTypeError(*state, "TestObj", "unsignedLongLongAttr");
966     }
967     auto& impl = castedThis->wrapped();
968     JSValue result = jsNumber(impl.unsignedLongLongAttr());
969     return JSValue::encode(result);
970 }
971
972
973 EncodedJSValue jsTestObjStringAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
974 {
975     UNUSED_PARAM(state);
976     UNUSED_PARAM(slotBase);
977     UNUSED_PARAM(thisValue);
978     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
979     if (UNLIKELY(!castedThis)) {
980         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
981             return reportDeprecatedGetterError(*state, "TestObj", "stringAttr");
982         return throwGetterTypeError(*state, "TestObj", "stringAttr");
983     }
984     auto& impl = castedThis->wrapped();
985     JSValue result = jsStringWithCache(state, impl.stringAttr());
986     return JSValue::encode(result);
987 }
988
989
990 EncodedJSValue jsTestObjTestObjAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
991 {
992     UNUSED_PARAM(state);
993     UNUSED_PARAM(slotBase);
994     UNUSED_PARAM(thisValue);
995     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
996     if (UNLIKELY(!castedThis)) {
997         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
998             return reportDeprecatedGetterError(*state, "TestObj", "testObjAttr");
999         return throwGetterTypeError(*state, "TestObj", "testObjAttr");
1000     }
1001     auto& impl = castedThis->wrapped();
1002     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.testObjAttr()));
1003     return JSValue::encode(result);
1004 }
1005
1006
1007 EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1008 {
1009     UNUSED_PARAM(state);
1010     UNUSED_PARAM(slotBase);
1011     UNUSED_PARAM(thisValue);
1012     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1013     if (UNLIKELY(!castedThis)) {
1014         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1015             return reportDeprecatedGetterError(*state, "TestObj", "XMLObjAttr");
1016         return throwGetterTypeError(*state, "TestObj", "XMLObjAttr");
1017     }
1018     auto& impl = castedThis->wrapped();
1019     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.xmlObjAttr()));
1020     return JSValue::encode(result);
1021 }
1022
1023
1024 EncodedJSValue jsTestObjCreate(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1025 {
1026     UNUSED_PARAM(state);
1027     UNUSED_PARAM(slotBase);
1028     UNUSED_PARAM(thisValue);
1029     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1030     if (UNLIKELY(!castedThis)) {
1031         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1032             return reportDeprecatedGetterError(*state, "TestObj", "create");
1033         return throwGetterTypeError(*state, "TestObj", "create");
1034     }
1035     auto& impl = castedThis->wrapped();
1036     JSValue result = jsBoolean(impl.isCreate());
1037     return JSValue::encode(result);
1038 }
1039
1040
1041 EncodedJSValue jsTestObjReadOnlySymbolAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1042 {
1043     UNUSED_PARAM(state);
1044     UNUSED_PARAM(slotBase);
1045     UNUSED_PARAM(thisValue);
1046     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1047     if (UNLIKELY(!castedThis)) {
1048         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1049             return reportDeprecatedGetterError(*state, "TestObj", "readOnlySymbolAttr");
1050         return throwGetterTypeError(*state, "TestObj", "readOnlySymbolAttr");
1051     }
1052     auto& impl = castedThis->wrapped();
1053     JSValue result = Symbol::create(state->vm(), *(impl.readOnlySymbolAttr()).uid());
1054     return JSValue::encode(result);
1055 }
1056
1057
1058 EncodedJSValue jsTestObjConstructorStaticReadOnlySymbolAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1059 {
1060     UNUSED_PARAM(state);
1061     UNUSED_PARAM(slotBase);
1062     UNUSED_PARAM(thisValue);
1063     JSValue result = Symbol::create(state->vm(), *(TestObj::staticReadOnlySymbolAttr()).uid());
1064     return JSValue::encode(result);
1065 }
1066
1067
1068 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1069 {
1070     UNUSED_PARAM(state);
1071     UNUSED_PARAM(slotBase);
1072     UNUSED_PARAM(thisValue);
1073     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1074     if (UNLIKELY(!castedThis)) {
1075         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1076             return reportDeprecatedGetterError(*state, "TestObj", "reflectedStringAttr");
1077         return throwGetterTypeError(*state, "TestObj", "reflectedStringAttr");
1078     }
1079     auto& impl = castedThis->wrapped();
1080     JSValue result = jsStringWithCache(state, impl.fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
1081     return JSValue::encode(result);
1082 }
1083
1084
1085 EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1086 {
1087     UNUSED_PARAM(state);
1088     UNUSED_PARAM(slotBase);
1089     UNUSED_PARAM(thisValue);
1090     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1091     if (UNLIKELY(!castedThis)) {
1092         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1093             return reportDeprecatedGetterError(*state, "TestObj", "reflectedIntegralAttr");
1094         return throwGetterTypeError(*state, "TestObj", "reflectedIntegralAttr");
1095     }
1096     auto& impl = castedThis->wrapped();
1097     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
1098     return JSValue::encode(result);
1099 }
1100
1101
1102 EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1103 {
1104     UNUSED_PARAM(state);
1105     UNUSED_PARAM(slotBase);
1106     UNUSED_PARAM(thisValue);
1107     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1108     if (UNLIKELY(!castedThis)) {
1109         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1110             return reportDeprecatedGetterError(*state, "TestObj", "reflectedUnsignedIntegralAttr");
1111         return throwGetterTypeError(*state, "TestObj", "reflectedUnsignedIntegralAttr");
1112     }
1113     auto& impl = castedThis->wrapped();
1114     JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
1115     return JSValue::encode(result);
1116 }
1117
1118
1119 EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1120 {
1121     UNUSED_PARAM(state);
1122     UNUSED_PARAM(slotBase);
1123     UNUSED_PARAM(thisValue);
1124     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1125     if (UNLIKELY(!castedThis)) {
1126         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1127             return reportDeprecatedGetterError(*state, "TestObj", "reflectedBooleanAttr");
1128         return throwGetterTypeError(*state, "TestObj", "reflectedBooleanAttr");
1129     }
1130     auto& impl = castedThis->wrapped();
1131     JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
1132     return JSValue::encode(result);
1133 }
1134
1135
1136 EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1137 {
1138     UNUSED_PARAM(state);
1139     UNUSED_PARAM(slotBase);
1140     UNUSED_PARAM(thisValue);
1141     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1142     if (UNLIKELY(!castedThis)) {
1143         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1144             return reportDeprecatedGetterError(*state, "TestObj", "reflectedURLAttr");
1145         return throwGetterTypeError(*state, "TestObj", "reflectedURLAttr");
1146     }
1147     auto& impl = castedThis->wrapped();
1148     JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
1149     return JSValue::encode(result);
1150 }
1151
1152
1153 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1154 {
1155     UNUSED_PARAM(state);
1156     UNUSED_PARAM(slotBase);
1157     UNUSED_PARAM(thisValue);
1158     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1159     if (UNLIKELY(!castedThis)) {
1160         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1161             return reportDeprecatedGetterError(*state, "TestObj", "reflectedStringAttr");
1162         return throwGetterTypeError(*state, "TestObj", "reflectedStringAttr");
1163     }
1164     auto& impl = castedThis->wrapped();
1165     JSValue result = jsStringWithCache(state, impl.fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
1166     return JSValue::encode(result);
1167 }
1168
1169
1170 EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1171 {
1172     UNUSED_PARAM(state);
1173     UNUSED_PARAM(slotBase);
1174     UNUSED_PARAM(thisValue);
1175     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1176     if (UNLIKELY(!castedThis)) {
1177         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1178             return reportDeprecatedGetterError(*state, "TestObj", "reflectedCustomIntegralAttr");
1179         return throwGetterTypeError(*state, "TestObj", "reflectedCustomIntegralAttr");
1180     }
1181     auto& impl = castedThis->wrapped();
1182     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
1183     return JSValue::encode(result);
1184 }
1185
1186
1187 EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1188 {
1189     UNUSED_PARAM(state);
1190     UNUSED_PARAM(slotBase);
1191     UNUSED_PARAM(thisValue);
1192     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1193     if (UNLIKELY(!castedThis)) {
1194         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1195             return reportDeprecatedGetterError(*state, "TestObj", "reflectedCustomBooleanAttr");
1196         return throwGetterTypeError(*state, "TestObj", "reflectedCustomBooleanAttr");
1197     }
1198     auto& impl = castedThis->wrapped();
1199     JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
1200     return JSValue::encode(result);
1201 }
1202
1203
1204 EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1205 {
1206     UNUSED_PARAM(state);
1207     UNUSED_PARAM(slotBase);
1208     UNUSED_PARAM(thisValue);
1209     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1210     if (UNLIKELY(!castedThis)) {
1211         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1212             return reportDeprecatedGetterError(*state, "TestObj", "reflectedCustomURLAttr");
1213         return throwGetterTypeError(*state, "TestObj", "reflectedCustomURLAttr");
1214     }
1215     auto& impl = castedThis->wrapped();
1216     JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
1217     return JSValue::encode(result);
1218 }
1219
1220
1221 EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1222 {
1223     UNUSED_PARAM(state);
1224     UNUSED_PARAM(slotBase);
1225     UNUSED_PARAM(thisValue);
1226     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1227     if (UNLIKELY(!castedThis)) {
1228         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1229             return reportDeprecatedGetterError(*state, "TestObj", "typedArrayAttr");
1230         return throwGetterTypeError(*state, "TestObj", "typedArrayAttr");
1231     }
1232     auto& impl = castedThis->wrapped();
1233     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.typedArrayAttr()));
1234     return JSValue::encode(result);
1235 }
1236
1237
1238 EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1239 {
1240     UNUSED_PARAM(state);
1241     UNUSED_PARAM(slotBase);
1242     UNUSED_PARAM(thisValue);
1243     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1244     if (UNLIKELY(!castedThis)) {
1245         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1246             return reportDeprecatedGetterError(*state, "TestObj", "attrWithGetterException");
1247         return throwGetterTypeError(*state, "TestObj", "attrWithGetterException");
1248     }
1249     ExceptionCode ec = 0;
1250     auto& impl = castedThis->wrapped();
1251     JSValue result = jsNumber(impl.attrWithGetterException(ec));
1252     setDOMException(state, ec);
1253     return JSValue::encode(result);
1254 }
1255
1256
1257 EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1258 {
1259     UNUSED_PARAM(state);
1260     UNUSED_PARAM(slotBase);
1261     UNUSED_PARAM(thisValue);
1262     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1263     if (UNLIKELY(!castedThis)) {
1264         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1265             return reportDeprecatedGetterError(*state, "TestObj", "attrWithGetterExceptionWithMessage");
1266         return throwGetterTypeError(*state, "TestObj", "attrWithGetterExceptionWithMessage");
1267     }
1268     ExceptionCodeWithMessage ec;
1269     auto& impl = castedThis->wrapped();
1270     JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
1271     setDOMException(state, ec);
1272     return JSValue::encode(result);
1273 }
1274
1275
1276 EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1277 {
1278     UNUSED_PARAM(state);
1279     UNUSED_PARAM(slotBase);
1280     UNUSED_PARAM(thisValue);
1281     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1282     if (UNLIKELY(!castedThis)) {
1283         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1284             return reportDeprecatedGetterError(*state, "TestObj", "attrWithSetterException");
1285         return throwGetterTypeError(*state, "TestObj", "attrWithSetterException");
1286     }
1287     auto& impl = castedThis->wrapped();
1288     JSValue result = jsNumber(impl.attrWithSetterException());
1289     return JSValue::encode(result);
1290 }
1291
1292
1293 EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1294 {
1295     UNUSED_PARAM(state);
1296     UNUSED_PARAM(slotBase);
1297     UNUSED_PARAM(thisValue);
1298     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1299     if (UNLIKELY(!castedThis)) {
1300         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1301             return reportDeprecatedGetterError(*state, "TestObj", "attrWithSetterExceptionWithMessage");
1302         return throwGetterTypeError(*state, "TestObj", "attrWithSetterExceptionWithMessage");
1303     }
1304     auto& impl = castedThis->wrapped();
1305     JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
1306     return JSValue::encode(result);
1307 }
1308
1309
1310 EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1311 {
1312     UNUSED_PARAM(state);
1313     UNUSED_PARAM(slotBase);
1314     UNUSED_PARAM(thisValue);
1315     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1316     if (UNLIKELY(!castedThis)) {
1317         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1318             return reportDeprecatedGetterError(*state, "TestObj", "stringAttrWithGetterException");
1319         return throwGetterTypeError(*state, "TestObj", "stringAttrWithGetterException");
1320     }
1321     ExceptionCode ec = 0;
1322     auto& impl = castedThis->wrapped();
1323     JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
1324     setDOMException(state, ec);
1325     return JSValue::encode(result);
1326 }
1327
1328
1329 EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1330 {
1331     UNUSED_PARAM(state);
1332     UNUSED_PARAM(slotBase);
1333     UNUSED_PARAM(thisValue);
1334     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1335     if (UNLIKELY(!castedThis)) {
1336         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1337             return reportDeprecatedGetterError(*state, "TestObj", "stringAttrWithSetterException");
1338         return throwGetterTypeError(*state, "TestObj", "stringAttrWithSetterException");
1339     }
1340     auto& impl = castedThis->wrapped();
1341     JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
1342     return JSValue::encode(result);
1343 }
1344
1345
1346 EncodedJSValue jsTestObjStrictTypeCheckingAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1347 {
1348     UNUSED_PARAM(state);
1349     UNUSED_PARAM(slotBase);
1350     UNUSED_PARAM(thisValue);
1351     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1352     if (UNLIKELY(!castedThis)) {
1353         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1354             return reportDeprecatedGetterError(*state, "TestObj", "strictTypeCheckingAttribute");
1355         return throwGetterTypeError(*state, "TestObj", "strictTypeCheckingAttribute");
1356     }
1357     auto& impl = castedThis->wrapped();
1358     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.strictTypeCheckingAttribute()));
1359     return JSValue::encode(result);
1360 }
1361
1362
1363 EncodedJSValue jsTestObjCustomAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1364 {
1365     UNUSED_PARAM(state);
1366     UNUSED_PARAM(slotBase);
1367     UNUSED_PARAM(thisValue);
1368     auto* castedThis = jsCast<JSTestObj*>(slotBase);
1369     return JSValue::encode(castedThis->customAttr(*state));
1370 }
1371
1372
1373 EncodedJSValue jsTestObjOnfoo(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1374 {
1375     UNUSED_PARAM(state);
1376     UNUSED_PARAM(slotBase);
1377     UNUSED_PARAM(thisValue);
1378     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1379     if (UNLIKELY(!castedThis)) {
1380         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1381             return reportDeprecatedGetterError(*state, "TestObj", "onfoo");
1382         return throwGetterTypeError(*state, "TestObj", "onfoo");
1383     }
1384     UNUSED_PARAM(state);
1385     return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
1386 }
1387
1388
1389 EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1390 {
1391     UNUSED_PARAM(state);
1392     UNUSED_PARAM(slotBase);
1393     UNUSED_PARAM(thisValue);
1394     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1395     if (UNLIKELY(!castedThis)) {
1396         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1397             return reportDeprecatedGetterError(*state, "TestObj", "withScriptStateAttribute");
1398         return throwGetterTypeError(*state, "TestObj", "withScriptStateAttribute");
1399     }
1400     auto& impl = castedThis->wrapped();
1401     JSValue result = jsNumber(impl.withScriptStateAttribute(*state));
1402     return JSValue::encode(result);
1403 }
1404
1405
1406 EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1407 {
1408     UNUSED_PARAM(state);
1409     UNUSED_PARAM(slotBase);
1410     UNUSED_PARAM(thisValue);
1411     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1412     if (UNLIKELY(!castedThis)) {
1413         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1414             return reportDeprecatedGetterError(*state, "TestObj", "withCallWithAndSetterCallWithAttribute");
1415         return throwGetterTypeError(*state, "TestObj", "withCallWithAndSetterCallWithAttribute");
1416     }
1417     auto& impl = castedThis->wrapped();
1418     JSValue result = jsNumber(impl.withCallWithAndSetterCallWithAttribute(*state));
1419     return JSValue::encode(result);
1420 }
1421
1422
1423 EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1424 {
1425     UNUSED_PARAM(state);
1426     UNUSED_PARAM(slotBase);
1427     UNUSED_PARAM(thisValue);
1428     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1429     if (UNLIKELY(!castedThis)) {
1430         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1431             return reportDeprecatedGetterError(*state, "TestObj", "withScriptExecutionContextAttribute");
1432         return throwGetterTypeError(*state, "TestObj", "withScriptExecutionContextAttribute");
1433     }
1434     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
1435     if (!scriptContext)
1436         return JSValue::encode(jsUndefined());
1437     auto& impl = castedThis->wrapped();
1438     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttribute(scriptContext)));
1439     return JSValue::encode(result);
1440 }
1441
1442
1443 EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1444 {
1445     UNUSED_PARAM(state);
1446     UNUSED_PARAM(slotBase);
1447     UNUSED_PARAM(thisValue);
1448     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1449     if (UNLIKELY(!castedThis)) {
1450         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1451             return reportDeprecatedGetterError(*state, "TestObj", "withScriptStateAttributeRaises");
1452         return throwGetterTypeError(*state, "TestObj", "withScriptStateAttributeRaises");
1453     }
1454     ExceptionCode ec = 0;
1455     auto& impl = castedThis->wrapped();
1456     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(*state, ec)));
1457     setDOMException(state, ec);
1458     return JSValue::encode(result);
1459 }
1460
1461
1462 EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1463 {
1464     UNUSED_PARAM(state);
1465     UNUSED_PARAM(slotBase);
1466     UNUSED_PARAM(thisValue);
1467     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1468     if (UNLIKELY(!castedThis)) {
1469         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1470             return reportDeprecatedGetterError(*state, "TestObj", "withScriptExecutionContextAttributeRaises");
1471         return throwGetterTypeError(*state, "TestObj", "withScriptExecutionContextAttributeRaises");
1472     }
1473     ExceptionCode ec = 0;
1474     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
1475     if (!scriptContext)
1476         return JSValue::encode(jsUndefined());
1477     auto& impl = castedThis->wrapped();
1478     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
1479     setDOMException(state, ec);
1480     return JSValue::encode(result);
1481 }
1482
1483
1484 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1485 {
1486     UNUSED_PARAM(state);
1487     UNUSED_PARAM(slotBase);
1488     UNUSED_PARAM(thisValue);
1489     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1490     if (UNLIKELY(!castedThis)) {
1491         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1492             return reportDeprecatedGetterError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
1493         return throwGetterTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
1494     }
1495     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
1496     if (!scriptContext)
1497         return JSValue::encode(jsUndefined());
1498     auto& impl = castedThis->wrapped();
1499     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttribute(*state, scriptContext)));
1500     return JSValue::encode(result);
1501 }
1502
1503
1504 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1505 {
1506     UNUSED_PARAM(state);
1507     UNUSED_PARAM(slotBase);
1508     UNUSED_PARAM(thisValue);
1509     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1510     if (UNLIKELY(!castedThis)) {
1511         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1512             return reportDeprecatedGetterError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
1513         return throwGetterTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
1514     }
1515     ExceptionCode ec = 0;
1516     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
1517     if (!scriptContext)
1518         return JSValue::encode(jsUndefined());
1519     auto& impl = castedThis->wrapped();
1520     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, scriptContext, ec)));
1521     setDOMException(state, ec);
1522     return JSValue::encode(result);
1523 }
1524
1525
1526 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1527 {
1528     UNUSED_PARAM(state);
1529     UNUSED_PARAM(slotBase);
1530     UNUSED_PARAM(thisValue);
1531     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1532     if (UNLIKELY(!castedThis)) {
1533         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1534             return reportDeprecatedGetterError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
1535         return throwGetterTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
1536     }
1537     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
1538     if (!scriptContext)
1539         return JSValue::encode(jsUndefined());
1540     auto& impl = castedThis->wrapped();
1541     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, scriptContext)));
1542     return JSValue::encode(result);
1543 }
1544
1545
1546 EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1547 {
1548     UNUSED_PARAM(state);
1549     UNUSED_PARAM(slotBase);
1550     UNUSED_PARAM(thisValue);
1551     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1552     if (UNLIKELY(!castedThis)) {
1553         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1554             return reportDeprecatedGetterError(*state, "TestObj", "withScriptArgumentsAndCallStackAttribute");
1555         return throwGetterTypeError(*state, "TestObj", "withScriptArgumentsAndCallStackAttribute");
1556     }
1557     auto& impl = castedThis->wrapped();
1558     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
1559     return JSValue::encode(result);
1560 }
1561
1562
1563 #if ENABLE(Condition1)
1564 EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1565 {
1566     UNUSED_PARAM(state);
1567     UNUSED_PARAM(slotBase);
1568     UNUSED_PARAM(thisValue);
1569     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1570     if (UNLIKELY(!castedThis)) {
1571         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1572             return reportDeprecatedGetterError(*state, "TestObj", "conditionalAttr1");
1573         return throwGetterTypeError(*state, "TestObj", "conditionalAttr1");
1574     }
1575     auto& impl = castedThis->wrapped();
1576     JSValue result = jsNumber(impl.conditionalAttr1());
1577     return JSValue::encode(result);
1578 }
1579
1580 #endif
1581
1582 #if ENABLE(Condition1) && ENABLE(Condition2)
1583 EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1584 {
1585     UNUSED_PARAM(state);
1586     UNUSED_PARAM(slotBase);
1587     UNUSED_PARAM(thisValue);
1588     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1589     if (UNLIKELY(!castedThis)) {
1590         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1591             return reportDeprecatedGetterError(*state, "TestObj", "conditionalAttr2");
1592         return throwGetterTypeError(*state, "TestObj", "conditionalAttr2");
1593     }
1594     auto& impl = castedThis->wrapped();
1595     JSValue result = jsNumber(impl.conditionalAttr2());
1596     return JSValue::encode(result);
1597 }
1598
1599 #endif
1600
1601 #if ENABLE(Condition1) || ENABLE(Condition2)
1602 EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1603 {
1604     UNUSED_PARAM(state);
1605     UNUSED_PARAM(slotBase);
1606     UNUSED_PARAM(thisValue);
1607     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1608     if (UNLIKELY(!castedThis)) {
1609         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1610             return reportDeprecatedGetterError(*state, "TestObj", "conditionalAttr3");
1611         return throwGetterTypeError(*state, "TestObj", "conditionalAttr3");
1612     }
1613     auto& impl = castedThis->wrapped();
1614     JSValue result = jsNumber(impl.conditionalAttr3());
1615     return JSValue::encode(result);
1616 }
1617
1618 #endif
1619
1620 #if ENABLE(Condition1)
1621 EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1622 {
1623     UNUSED_PARAM(state);
1624     UNUSED_PARAM(slotBase);
1625     UNUSED_PARAM(thisValue);
1626     auto* castedThis = jsCast<JSTestObj*>(slotBase);
1627     return JSValue::encode(JSTestObjectA::getConstructor(state->vm(), castedThis->globalObject()));
1628 }
1629
1630 #endif
1631
1632 #if ENABLE(Condition1) && ENABLE(Condition2)
1633 EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1634 {
1635     UNUSED_PARAM(state);
1636     UNUSED_PARAM(slotBase);
1637     UNUSED_PARAM(thisValue);
1638     auto* castedThis = jsCast<JSTestObj*>(slotBase);
1639     return JSValue::encode(JSTestObjectB::getConstructor(state->vm(), castedThis->globalObject()));
1640 }
1641
1642 #endif
1643
1644 #if ENABLE(Condition1) || ENABLE(Condition2)
1645 EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1646 {
1647     UNUSED_PARAM(state);
1648     UNUSED_PARAM(slotBase);
1649     UNUSED_PARAM(thisValue);
1650     auto* castedThis = jsCast<JSTestObj*>(slotBase);
1651     return JSValue::encode(JSTestObjectC::getConstructor(state->vm(), castedThis->globalObject()));
1652 }
1653
1654 #endif
1655
1656 EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1657 {
1658     UNUSED_PARAM(state);
1659     UNUSED_PARAM(slotBase);
1660     UNUSED_PARAM(thisValue);
1661     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1662     if (UNLIKELY(!castedThis)) {
1663         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1664             return reportDeprecatedGetterError(*state, "TestObj", "cachedAttribute1");
1665         return throwGetterTypeError(*state, "TestObj", "cachedAttribute1");
1666     }
1667     if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
1668         return JSValue::encode(cachedValue);
1669     auto& impl = castedThis->wrapped();
1670     JSValue result = (impl.cachedAttribute1().hasNoValue() ? jsNull() : impl.cachedAttribute1().jsValue());
1671     castedThis->m_cachedAttribute1.set(state->vm(), castedThis, result);
1672     return JSValue::encode(result);
1673 }
1674
1675
1676 EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1677 {
1678     UNUSED_PARAM(state);
1679     UNUSED_PARAM(slotBase);
1680     UNUSED_PARAM(thisValue);
1681     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1682     if (UNLIKELY(!castedThis)) {
1683         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1684             return reportDeprecatedGetterError(*state, "TestObj", "cachedAttribute2");
1685         return throwGetterTypeError(*state, "TestObj", "cachedAttribute2");
1686     }
1687     if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
1688         return JSValue::encode(cachedValue);
1689     auto& impl = castedThis->wrapped();
1690     JSValue result = (impl.cachedAttribute2().hasNoValue() ? jsNull() : impl.cachedAttribute2().jsValue());
1691     castedThis->m_cachedAttribute2.set(state->vm(), castedThis, result);
1692     return JSValue::encode(result);
1693 }
1694
1695
1696 EncodedJSValue jsTestObjAnyAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1697 {
1698     UNUSED_PARAM(state);
1699     UNUSED_PARAM(slotBase);
1700     UNUSED_PARAM(thisValue);
1701     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1702     if (UNLIKELY(!castedThis)) {
1703         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1704             return reportDeprecatedGetterError(*state, "TestObj", "anyAttribute");
1705         return throwGetterTypeError(*state, "TestObj", "anyAttribute");
1706     }
1707     auto& impl = castedThis->wrapped();
1708     JSValue result = (impl.anyAttribute().hasNoValue() ? jsNull() : impl.anyAttribute().jsValue());
1709     return JSValue::encode(result);
1710 }
1711
1712
1713 EncodedJSValue jsTestObjContentDocument(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1714 {
1715     UNUSED_PARAM(state);
1716     UNUSED_PARAM(slotBase);
1717     UNUSED_PARAM(thisValue);
1718     auto* castedThis = jsCast<JSTestObj*>(slotBase);
1719     auto& impl = castedThis->wrapped();
1720     return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis->globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
1721 }
1722
1723
1724 EncodedJSValue jsTestObjMutablePoint(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1725 {
1726     UNUSED_PARAM(state);
1727     UNUSED_PARAM(slotBase);
1728     UNUSED_PARAM(thisValue);
1729     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1730     if (UNLIKELY(!castedThis)) {
1731         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1732             return reportDeprecatedGetterError(*state, "TestObj", "mutablePoint");
1733         return throwGetterTypeError(*state, "TestObj", "mutablePoint");
1734     }
1735     auto& impl = castedThis->wrapped();
1736     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint)));
1737     return JSValue::encode(result);
1738 }
1739
1740
1741 EncodedJSValue jsTestObjImmutablePoint(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1742 {
1743     UNUSED_PARAM(state);
1744     UNUSED_PARAM(slotBase);
1745     UNUSED_PARAM(thisValue);
1746     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1747     if (UNLIKELY(!castedThis)) {
1748         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1749             return reportDeprecatedGetterError(*state, "TestObj", "immutablePoint");
1750         return throwGetterTypeError(*state, "TestObj", "immutablePoint");
1751     }
1752     auto& impl = castedThis->wrapped();
1753     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint())));
1754     return JSValue::encode(result);
1755 }
1756
1757
1758 EncodedJSValue jsTestObjStrawberry(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1759 {
1760     UNUSED_PARAM(state);
1761     UNUSED_PARAM(slotBase);
1762     UNUSED_PARAM(thisValue);
1763     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1764     if (UNLIKELY(!castedThis)) {
1765         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1766             return reportDeprecatedGetterError(*state, "TestObj", "strawberry");
1767         return throwGetterTypeError(*state, "TestObj", "strawberry");
1768     }
1769     auto& impl = castedThis->wrapped();
1770     JSValue result = jsNumber(impl.blueberry());
1771     return JSValue::encode(result);
1772 }
1773
1774
1775 EncodedJSValue jsTestObjStrictFloat(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1776 {
1777     UNUSED_PARAM(state);
1778     UNUSED_PARAM(slotBase);
1779     UNUSED_PARAM(thisValue);
1780     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1781     if (UNLIKELY(!castedThis)) {
1782         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1783             return reportDeprecatedGetterError(*state, "TestObj", "strictFloat");
1784         return throwGetterTypeError(*state, "TestObj", "strictFloat");
1785     }
1786     auto& impl = castedThis->wrapped();
1787     JSValue result = jsNumber(impl.strictFloat());
1788     return JSValue::encode(result);
1789 }
1790
1791
1792 EncodedJSValue jsTestObjDescription(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1793 {
1794     UNUSED_PARAM(state);
1795     UNUSED_PARAM(slotBase);
1796     UNUSED_PARAM(thisValue);
1797     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1798     if (UNLIKELY(!castedThis)) {
1799         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1800             return reportDeprecatedGetterError(*state, "TestObj", "description");
1801         return throwGetterTypeError(*state, "TestObj", "description");
1802     }
1803     auto& impl = castedThis->wrapped();
1804     JSValue result = jsNumber(impl.description());
1805     return JSValue::encode(result);
1806 }
1807
1808
1809 EncodedJSValue jsTestObjId(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1810 {
1811     UNUSED_PARAM(state);
1812     UNUSED_PARAM(slotBase);
1813     UNUSED_PARAM(thisValue);
1814     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1815     if (UNLIKELY(!castedThis)) {
1816         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1817             return reportDeprecatedGetterError(*state, "TestObj", "id");
1818         return throwGetterTypeError(*state, "TestObj", "id");
1819     }
1820     auto& impl = castedThis->wrapped();
1821     JSValue result = jsNumber(impl.id());
1822     return JSValue::encode(result);
1823 }
1824
1825
1826 EncodedJSValue jsTestObjHash(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1827 {
1828     UNUSED_PARAM(state);
1829     UNUSED_PARAM(slotBase);
1830     UNUSED_PARAM(thisValue);
1831     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1832     if (UNLIKELY(!castedThis)) {
1833         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1834             return reportDeprecatedGetterError(*state, "TestObj", "hash");
1835         return throwGetterTypeError(*state, "TestObj", "hash");
1836     }
1837     auto& impl = castedThis->wrapped();
1838     JSValue result = jsStringWithCache(state, impl.hash());
1839     return JSValue::encode(result);
1840 }
1841
1842
1843 EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1844 {
1845     UNUSED_PARAM(state);
1846     UNUSED_PARAM(slotBase);
1847     UNUSED_PARAM(thisValue);
1848     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1849     if (UNLIKELY(!castedThis)) {
1850         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1851             return reportDeprecatedGetterError(*state, "TestObj", "replaceableAttribute");
1852         return throwGetterTypeError(*state, "TestObj", "replaceableAttribute");
1853     }
1854     auto& impl = castedThis->wrapped();
1855     JSValue result = jsNumber(impl.replaceableAttribute());
1856     return JSValue::encode(result);
1857 }
1858
1859
1860 EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1861 {
1862     UNUSED_PARAM(state);
1863     UNUSED_PARAM(slotBase);
1864     UNUSED_PARAM(thisValue);
1865     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1866     if (UNLIKELY(!castedThis)) {
1867         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1868             return reportDeprecatedGetterError(*state, "TestObj", "nullableDoubleAttribute");
1869         return throwGetterTypeError(*state, "TestObj", "nullableDoubleAttribute");
1870     }
1871     auto& impl = castedThis->wrapped();
1872     JSValue result = toNullableJSNumber(impl.nullableDoubleAttribute());
1873     return JSValue::encode(result);
1874 }
1875
1876
1877 EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1878 {
1879     UNUSED_PARAM(state);
1880     UNUSED_PARAM(slotBase);
1881     UNUSED_PARAM(thisValue);
1882     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1883     if (UNLIKELY(!castedThis)) {
1884         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1885             return reportDeprecatedGetterError(*state, "TestObj", "nullableLongAttribute");
1886         return throwGetterTypeError(*state, "TestObj", "nullableLongAttribute");
1887     }
1888     auto& impl = castedThis->wrapped();
1889     JSValue result = toNullableJSNumber(impl.nullableLongAttribute());
1890     return JSValue::encode(result);
1891 }
1892
1893
1894 EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1895 {
1896     UNUSED_PARAM(state);
1897     UNUSED_PARAM(slotBase);
1898     UNUSED_PARAM(thisValue);
1899     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1900     if (UNLIKELY(!castedThis)) {
1901         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1902             return reportDeprecatedGetterError(*state, "TestObj", "nullableBooleanAttribute");
1903         return throwGetterTypeError(*state, "TestObj", "nullableBooleanAttribute");
1904     }
1905     auto& impl = castedThis->wrapped();
1906     JSValue result = jsBoolean(impl.nullableBooleanAttribute());
1907     return JSValue::encode(result);
1908 }
1909
1910
1911 EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1912 {
1913     UNUSED_PARAM(state);
1914     UNUSED_PARAM(slotBase);
1915     UNUSED_PARAM(thisValue);
1916     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1917     if (UNLIKELY(!castedThis)) {
1918         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1919             return reportDeprecatedGetterError(*state, "TestObj", "nullableStringAttribute");
1920         return throwGetterTypeError(*state, "TestObj", "nullableStringAttribute");
1921     }
1922     auto& impl = castedThis->wrapped();
1923     JSValue result = jsStringWithCache(state, impl.nullableStringAttribute());
1924     return JSValue::encode(result);
1925 }
1926
1927
1928 EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1929 {
1930     UNUSED_PARAM(state);
1931     UNUSED_PARAM(slotBase);
1932     UNUSED_PARAM(thisValue);
1933     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1934     if (UNLIKELY(!castedThis)) {
1935         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1936             return reportDeprecatedGetterError(*state, "TestObj", "nullableLongSettableAttribute");
1937         return throwGetterTypeError(*state, "TestObj", "nullableLongSettableAttribute");
1938     }
1939     auto& impl = castedThis->wrapped();
1940     JSValue result = toNullableJSNumber(impl.nullableLongSettableAttribute());
1941     return JSValue::encode(result);
1942 }
1943
1944
1945 EncodedJSValue jsTestObjNullableStringValue(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1946 {
1947     UNUSED_PARAM(state);
1948     UNUSED_PARAM(slotBase);
1949     UNUSED_PARAM(thisValue);
1950     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1951     if (UNLIKELY(!castedThis)) {
1952         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1953             return reportDeprecatedGetterError(*state, "TestObj", "nullableStringValue");
1954         return throwGetterTypeError(*state, "TestObj", "nullableStringValue");
1955     }
1956     ExceptionCode ec = 0;
1957     auto& impl = castedThis->wrapped();
1958     JSValue result = toNullableJSNumber(impl.nullableStringValue(ec));
1959     setDOMException(state, ec);
1960     return JSValue::encode(result);
1961 }
1962
1963
1964 EncodedJSValue jsTestObjAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1965 {
1966     UNUSED_PARAM(state);
1967     UNUSED_PARAM(slotBase);
1968     UNUSED_PARAM(thisValue);
1969     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1970     if (UNLIKELY(!castedThis)) {
1971         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1972             return reportDeprecatedGetterError(*state, "TestObj", "attribute");
1973         return throwGetterTypeError(*state, "TestObj", "attribute");
1974     }
1975     auto& impl = castedThis->wrapped();
1976     JSValue result = jsStringWithCache(state, impl.attribute());
1977     return JSValue::encode(result);
1978 }
1979
1980
1981 EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1982 {
1983     UNUSED_PARAM(state);
1984     UNUSED_PARAM(slotBase);
1985     UNUSED_PARAM(thisValue);
1986     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1987     if (UNLIKELY(!castedThis)) {
1988         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
1989             return reportDeprecatedGetterError(*state, "TestObj", "attributeWithReservedEnumType");
1990         return throwGetterTypeError(*state, "TestObj", "attributeWithReservedEnumType");
1991     }
1992     auto& impl = castedThis->wrapped();
1993     JSValue result = jsStringWithCache(state, impl.attributeWithReservedEnumType());
1994     return JSValue::encode(result);
1995 }
1996
1997
1998 EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1999 {
2000     UNUSED_PARAM(state);
2001     UNUSED_PARAM(slotBase);
2002     UNUSED_PARAM(thisValue);
2003     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2004     if (UNLIKELY(!castedThis)) {
2005         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
2006             return reportDeprecatedGetterError(*state, "TestObj", "putForwardsAttribute");
2007         return throwGetterTypeError(*state, "TestObj", "putForwardsAttribute");
2008     }
2009     auto& impl = castedThis->wrapped();
2010     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.putForwardsAttribute()));
2011     return JSValue::encode(result);
2012 }
2013
2014
2015 EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
2016 {
2017     UNUSED_PARAM(state);
2018     UNUSED_PARAM(slotBase);
2019     UNUSED_PARAM(thisValue);
2020     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2021     if (UNLIKELY(!castedThis)) {
2022         if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
2023             return reportDeprecatedGetterError(*state, "TestObj", "putForwardsNullableAttribute");
2024         return throwGetterTypeError(*state, "TestObj", "putForwardsNullableAttribute");
2025     }
2026     auto& impl = castedThis->wrapped();
2027     JSValue result = toJS(state, castedThis->globalObject(), WTF::getPtr(impl.putForwardsNullableAttribute()));
2028     return JSValue::encode(result);
2029 }
2030
2031
2032 EncodedJSValue jsTestObjConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
2033 {
2034     JSTestObjPrototype* domObject = jsDynamicCast<JSTestObjPrototype*>(baseValue);
2035     if (!domObject)
2036         return throwVMTypeError(state);
2037     return JSValue::encode(JSTestObj::getConstructor(state->vm(), domObject->globalObject()));
2038 }
2039
2040 void setJSTestObjConstructorStaticStringAttr(ExecState* state, JSObject* baseObject, EncodedJSValue, EncodedJSValue encodedValue)
2041 {
2042     JSValue value = JSValue::decode(encodedValue);
2043     UNUSED_PARAM(baseObject);
2044     String nativeValue = value.toString(state)->value(state);
2045     if (UNLIKELY(state->hadException()))
2046         return;
2047     TestObj::setStaticStringAttr(nativeValue);
2048 }
2049
2050
2051 void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2052 {
2053     JSValue value = JSValue::decode(encodedValue);
2054     UNUSED_PARAM(baseObject);
2055     UNUSED_PARAM(thisValue);
2056     auto* castedThis = jsCast<JSTestObj*>(baseObject);
2057     UNUSED_PARAM(thisValue);
2058     UNUSED_PARAM(state);
2059     // Shadowing a built-in constructor.
2060     castedThis->putDirect(state->vm(), Identifier::fromString(state, "TestSubObjEnabledBySetting"), value);
2061 }
2062
2063
2064 void setJSTestObjEnumAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2065 {
2066     JSValue value = JSValue::decode(encodedValue);
2067     UNUSED_PARAM(baseObject);
2068     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2069     if (UNLIKELY(!castedThis)) {
2070         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2071             reportDeprecatedSetterError(*state, "TestObj", "enumAttr");
2072         else
2073             throwSetterTypeError(*state, "TestObj", "enumAttr");
2074         return;
2075     }
2076     auto& impl = castedThis->wrapped();
2077     String nativeValue = value.toString(state)->value(state);
2078     if (UNLIKELY(state->hadException()))
2079         return;
2080     if (nativeValue != "" && nativeValue != "EnumValue1" && nativeValue != "EnumValue2" && nativeValue != "EnumValue3")
2081         return;
2082     impl.setEnumAttr(nativeValue);
2083 }
2084
2085
2086 void setJSTestObjByteAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2087 {
2088     JSValue value = JSValue::decode(encodedValue);
2089     UNUSED_PARAM(baseObject);
2090     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2091     if (UNLIKELY(!castedThis)) {
2092         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2093             reportDeprecatedSetterError(*state, "TestObj", "byteAttr");
2094         else
2095             throwSetterTypeError(*state, "TestObj", "byteAttr");
2096         return;
2097     }
2098     auto& impl = castedThis->wrapped();
2099     int8_t nativeValue = toInt8(state, value, NormalConversion);
2100     if (UNLIKELY(state->hadException()))
2101         return;
2102     impl.setByteAttr(nativeValue);
2103 }
2104
2105
2106 void setJSTestObjOctetAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2107 {
2108     JSValue value = JSValue::decode(encodedValue);
2109     UNUSED_PARAM(baseObject);
2110     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2111     if (UNLIKELY(!castedThis)) {
2112         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2113             reportDeprecatedSetterError(*state, "TestObj", "octetAttr");
2114         else
2115             throwSetterTypeError(*state, "TestObj", "octetAttr");
2116         return;
2117     }
2118     auto& impl = castedThis->wrapped();
2119     uint8_t nativeValue = toUInt8(state, value, NormalConversion);
2120     if (UNLIKELY(state->hadException()))
2121         return;
2122     impl.setOctetAttr(nativeValue);
2123 }
2124
2125
2126 void setJSTestObjShortAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2127 {
2128     JSValue value = JSValue::decode(encodedValue);
2129     UNUSED_PARAM(baseObject);
2130     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2131     if (UNLIKELY(!castedThis)) {
2132         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2133             reportDeprecatedSetterError(*state, "TestObj", "shortAttr");
2134         else
2135             throwSetterTypeError(*state, "TestObj", "shortAttr");
2136         return;
2137     }
2138     auto& impl = castedThis->wrapped();
2139     int16_t nativeValue = toInt16(state, value, NormalConversion);
2140     if (UNLIKELY(state->hadException()))
2141         return;
2142     impl.setShortAttr(nativeValue);
2143 }
2144
2145
2146 void setJSTestObjUnsignedShortAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2147 {
2148     JSValue value = JSValue::decode(encodedValue);
2149     UNUSED_PARAM(baseObject);
2150     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2151     if (UNLIKELY(!castedThis)) {
2152         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2153             reportDeprecatedSetterError(*state, "TestObj", "unsignedShortAttr");
2154         else
2155             throwSetterTypeError(*state, "TestObj", "unsignedShortAttr");
2156         return;
2157     }
2158     auto& impl = castedThis->wrapped();
2159     uint16_t nativeValue = toUInt16(state, value, NormalConversion);
2160     if (UNLIKELY(state->hadException()))
2161         return;
2162     impl.setUnsignedShortAttr(nativeValue);
2163 }
2164
2165
2166 void setJSTestObjLongAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2167 {
2168     JSValue value = JSValue::decode(encodedValue);
2169     UNUSED_PARAM(baseObject);
2170     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2171     if (UNLIKELY(!castedThis)) {
2172         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2173             reportDeprecatedSetterError(*state, "TestObj", "longAttr");
2174         else
2175             throwSetterTypeError(*state, "TestObj", "longAttr");
2176         return;
2177     }
2178     auto& impl = castedThis->wrapped();
2179     int nativeValue = toInt32(state, value, NormalConversion);
2180     if (UNLIKELY(state->hadException()))
2181         return;
2182     impl.setLongAttr(nativeValue);
2183 }
2184
2185
2186 void setJSTestObjLongLongAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2187 {
2188     JSValue value = JSValue::decode(encodedValue);
2189     UNUSED_PARAM(baseObject);
2190     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2191     if (UNLIKELY(!castedThis)) {
2192         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2193             reportDeprecatedSetterError(*state, "TestObj", "longLongAttr");
2194         else
2195             throwSetterTypeError(*state, "TestObj", "longLongAttr");
2196         return;
2197     }
2198     auto& impl = castedThis->wrapped();
2199     long long nativeValue = toInt64(state, value, NormalConversion);
2200     if (UNLIKELY(state->hadException()))
2201         return;
2202     impl.setLongLongAttr(nativeValue);
2203 }
2204
2205
2206 void setJSTestObjUnsignedLongLongAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2207 {
2208     JSValue value = JSValue::decode(encodedValue);
2209     UNUSED_PARAM(baseObject);
2210     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2211     if (UNLIKELY(!castedThis)) {
2212         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2213             reportDeprecatedSetterError(*state, "TestObj", "unsignedLongLongAttr");
2214         else
2215             throwSetterTypeError(*state, "TestObj", "unsignedLongLongAttr");
2216         return;
2217     }
2218     auto& impl = castedThis->wrapped();
2219     unsigned long long nativeValue = toUInt64(state, value, NormalConversion);
2220     if (UNLIKELY(state->hadException()))
2221         return;
2222     impl.setUnsignedLongLongAttr(nativeValue);
2223 }
2224
2225
2226 void setJSTestObjStringAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2227 {
2228     JSValue value = JSValue::decode(encodedValue);
2229     UNUSED_PARAM(baseObject);
2230     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2231     if (UNLIKELY(!castedThis)) {
2232         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2233             reportDeprecatedSetterError(*state, "TestObj", "stringAttr");
2234         else
2235             throwSetterTypeError(*state, "TestObj", "stringAttr");
2236         return;
2237     }
2238     auto& impl = castedThis->wrapped();
2239     String nativeValue = value.toString(state)->value(state);
2240     if (UNLIKELY(state->hadException()))
2241         return;
2242     impl.setStringAttr(nativeValue);
2243 }
2244
2245
2246 void setJSTestObjTestObjAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2247 {
2248     JSValue value = JSValue::decode(encodedValue);
2249     UNUSED_PARAM(baseObject);
2250     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2251     if (UNLIKELY(!castedThis)) {
2252         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2253             reportDeprecatedSetterError(*state, "TestObj", "testObjAttr");
2254         else
2255             throwSetterTypeError(*state, "TestObj", "testObjAttr");
2256         return;
2257     }
2258     auto& impl = castedThis->wrapped();
2259     TestObj* nativeValue = JSTestObj::toWrapped(value);
2260     if (UNLIKELY(state->hadException()))
2261         return;
2262     impl.setTestObjAttr(nativeValue);
2263 }
2264
2265
2266 void setJSTestObjXMLObjAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2267 {
2268     JSValue value = JSValue::decode(encodedValue);
2269     UNUSED_PARAM(baseObject);
2270     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2271     if (UNLIKELY(!castedThis)) {
2272         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2273             reportDeprecatedSetterError(*state, "TestObj", "XMLObjAttr");
2274         else
2275             throwSetterTypeError(*state, "TestObj", "XMLObjAttr");
2276         return;
2277     }
2278     auto& impl = castedThis->wrapped();
2279     TestObj* nativeValue = JSTestObj::toWrapped(value);
2280     if (UNLIKELY(state->hadException()))
2281         return;
2282     impl.setXMLObjAttr(nativeValue);
2283 }
2284
2285
2286 void setJSTestObjCreate(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2287 {
2288     JSValue value = JSValue::decode(encodedValue);
2289     UNUSED_PARAM(baseObject);
2290     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2291     if (UNLIKELY(!castedThis)) {
2292         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2293             reportDeprecatedSetterError(*state, "TestObj", "create");
2294         else
2295             throwSetterTypeError(*state, "TestObj", "create");
2296         return;
2297     }
2298     auto& impl = castedThis->wrapped();
2299     bool nativeValue = value.toBoolean(state);
2300     if (UNLIKELY(state->hadException()))
2301         return;
2302     impl.setCreate(nativeValue);
2303 }
2304
2305
2306 void setJSTestObjReflectedStringAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2307 {
2308     JSValue value = JSValue::decode(encodedValue);
2309     UNUSED_PARAM(baseObject);
2310     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2311     if (UNLIKELY(!castedThis)) {
2312         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2313             reportDeprecatedSetterError(*state, "TestObj", "reflectedStringAttr");
2314         else
2315             throwSetterTypeError(*state, "TestObj", "reflectedStringAttr");
2316         return;
2317     }
2318     auto& impl = castedThis->wrapped();
2319     String nativeValue = valueToStringWithNullCheck(state, value);
2320     if (UNLIKELY(state->hadException()))
2321         return;
2322     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, nativeValue);
2323 }
2324
2325
2326 void setJSTestObjReflectedIntegralAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2327 {
2328     JSValue value = JSValue::decode(encodedValue);
2329     UNUSED_PARAM(baseObject);
2330     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2331     if (UNLIKELY(!castedThis)) {
2332         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2333             reportDeprecatedSetterError(*state, "TestObj", "reflectedIntegralAttr");
2334         else
2335             throwSetterTypeError(*state, "TestObj", "reflectedIntegralAttr");
2336         return;
2337     }
2338     auto& impl = castedThis->wrapped();
2339     int nativeValue = toInt32(state, value, NormalConversion);
2340     if (UNLIKELY(state->hadException()))
2341         return;
2342     impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, nativeValue);
2343 }
2344
2345
2346 void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2347 {
2348     JSValue value = JSValue::decode(encodedValue);
2349     UNUSED_PARAM(baseObject);
2350     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2351     if (UNLIKELY(!castedThis)) {
2352         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2353             reportDeprecatedSetterError(*state, "TestObj", "reflectedUnsignedIntegralAttr");
2354         else
2355             throwSetterTypeError(*state, "TestObj", "reflectedUnsignedIntegralAttr");
2356         return;
2357     }
2358     auto& impl = castedThis->wrapped();
2359     unsigned nativeValue = toUInt32(state, value, NormalConversion);
2360     if (UNLIKELY(state->hadException()))
2361         return;
2362     impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, nativeValue);
2363 }
2364
2365
2366 void setJSTestObjReflectedBooleanAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2367 {
2368     JSValue value = JSValue::decode(encodedValue);
2369     UNUSED_PARAM(baseObject);
2370     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2371     if (UNLIKELY(!castedThis)) {
2372         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2373             reportDeprecatedSetterError(*state, "TestObj", "reflectedBooleanAttr");
2374         else
2375             throwSetterTypeError(*state, "TestObj", "reflectedBooleanAttr");
2376         return;
2377     }
2378     auto& impl = castedThis->wrapped();
2379     bool nativeValue = value.toBoolean(state);
2380     if (UNLIKELY(state->hadException()))
2381         return;
2382     impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, nativeValue);
2383 }
2384
2385
2386 void setJSTestObjReflectedURLAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2387 {
2388     JSValue value = JSValue::decode(encodedValue);
2389     UNUSED_PARAM(baseObject);
2390     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2391     if (UNLIKELY(!castedThis)) {
2392         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2393             reportDeprecatedSetterError(*state, "TestObj", "reflectedURLAttr");
2394         else
2395             throwSetterTypeError(*state, "TestObj", "reflectedURLAttr");
2396         return;
2397     }
2398     auto& impl = castedThis->wrapped();
2399     String nativeValue = valueToStringWithNullCheck(state, value);
2400     if (UNLIKELY(state->hadException()))
2401         return;
2402     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, nativeValue);
2403 }
2404
2405
2406 void setJSTestObjReflectedStringAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2407 {
2408     JSValue value = JSValue::decode(encodedValue);
2409     UNUSED_PARAM(baseObject);
2410     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2411     if (UNLIKELY(!castedThis)) {
2412         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2413             reportDeprecatedSetterError(*state, "TestObj", "reflectedStringAttr");
2414         else
2415             throwSetterTypeError(*state, "TestObj", "reflectedStringAttr");
2416         return;
2417     }
2418     auto& impl = castedThis->wrapped();
2419     String nativeValue = valueToStringWithNullCheck(state, value);
2420     if (UNLIKELY(state->hadException()))
2421         return;
2422     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr, nativeValue);
2423 }
2424
2425
2426 void setJSTestObjReflectedCustomIntegralAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2427 {
2428     JSValue value = JSValue::decode(encodedValue);
2429     UNUSED_PARAM(baseObject);
2430     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2431     if (UNLIKELY(!castedThis)) {
2432         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2433             reportDeprecatedSetterError(*state, "TestObj", "reflectedCustomIntegralAttr");
2434         else
2435             throwSetterTypeError(*state, "TestObj", "reflectedCustomIntegralAttr");
2436         return;
2437     }
2438     auto& impl = castedThis->wrapped();
2439     int nativeValue = toInt32(state, value, NormalConversion);
2440     if (UNLIKELY(state->hadException()))
2441         return;
2442     impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, nativeValue);
2443 }
2444
2445
2446 void setJSTestObjReflectedCustomBooleanAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2447 {
2448     JSValue value = JSValue::decode(encodedValue);
2449     UNUSED_PARAM(baseObject);
2450     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2451     if (UNLIKELY(!castedThis)) {
2452         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2453             reportDeprecatedSetterError(*state, "TestObj", "reflectedCustomBooleanAttr");
2454         else
2455             throwSetterTypeError(*state, "TestObj", "reflectedCustomBooleanAttr");
2456         return;
2457     }
2458     auto& impl = castedThis->wrapped();
2459     bool nativeValue = value.toBoolean(state);
2460     if (UNLIKELY(state->hadException()))
2461         return;
2462     impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, nativeValue);
2463 }
2464
2465
2466 void setJSTestObjReflectedCustomURLAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2467 {
2468     JSValue value = JSValue::decode(encodedValue);
2469     UNUSED_PARAM(baseObject);
2470     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2471     if (UNLIKELY(!castedThis)) {
2472         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2473             reportDeprecatedSetterError(*state, "TestObj", "reflectedCustomURLAttr");
2474         else
2475             throwSetterTypeError(*state, "TestObj", "reflectedCustomURLAttr");
2476         return;
2477     }
2478     auto& impl = castedThis->wrapped();
2479     String nativeValue = valueToStringWithNullCheck(state, value);
2480     if (UNLIKELY(state->hadException()))
2481         return;
2482     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentURLAttrAttr, nativeValue);
2483 }
2484
2485
2486 void setJSTestObjTypedArrayAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2487 {
2488     JSValue value = JSValue::decode(encodedValue);
2489     UNUSED_PARAM(baseObject);
2490     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2491     if (UNLIKELY(!castedThis)) {
2492         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2493             reportDeprecatedSetterError(*state, "TestObj", "typedArrayAttr");
2494         else
2495             throwSetterTypeError(*state, "TestObj", "typedArrayAttr");
2496         return;
2497     }
2498     auto& impl = castedThis->wrapped();
2499     RefPtr<Float32Array> nativeValue = toFloat32Array(value);
2500     if (UNLIKELY(state->hadException()))
2501         return;
2502     impl.setTypedArrayAttr(nativeValue.get());
2503 }
2504
2505
2506 void setJSTestObjAttrWithGetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2507 {
2508     JSValue value = JSValue::decode(encodedValue);
2509     UNUSED_PARAM(baseObject);
2510     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2511     if (UNLIKELY(!castedThis)) {
2512         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2513             reportDeprecatedSetterError(*state, "TestObj", "attrWithGetterException");
2514         else
2515             throwSetterTypeError(*state, "TestObj", "attrWithGetterException");
2516         return;
2517     }
2518     auto& impl = castedThis->wrapped();
2519     int nativeValue = toInt32(state, value, NormalConversion);
2520     if (UNLIKELY(state->hadException()))
2521         return;
2522     impl.setAttrWithGetterException(nativeValue);
2523 }
2524
2525
2526 void setJSTestObjAttrWithGetterExceptionWithMessage(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2527 {
2528     JSValue value = JSValue::decode(encodedValue);
2529     UNUSED_PARAM(baseObject);
2530     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2531     if (UNLIKELY(!castedThis)) {
2532         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2533             reportDeprecatedSetterError(*state, "TestObj", "attrWithGetterExceptionWithMessage");
2534         else
2535             throwSetterTypeError(*state, "TestObj", "attrWithGetterExceptionWithMessage");
2536         return;
2537     }
2538     auto& impl = castedThis->wrapped();
2539     int nativeValue = toInt32(state, value, NormalConversion);
2540     if (UNLIKELY(state->hadException()))
2541         return;
2542     impl.setAttrWithGetterExceptionWithMessage(nativeValue);
2543 }
2544
2545
2546 void setJSTestObjAttrWithSetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2547 {
2548     JSValue value = JSValue::decode(encodedValue);
2549     UNUSED_PARAM(baseObject);
2550     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2551     if (UNLIKELY(!castedThis)) {
2552         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2553             reportDeprecatedSetterError(*state, "TestObj", "attrWithSetterException");
2554         else
2555             throwSetterTypeError(*state, "TestObj", "attrWithSetterException");
2556         return;
2557     }
2558     auto& impl = castedThis->wrapped();
2559     ExceptionCode ec = 0;
2560     int nativeValue = toInt32(state, value, NormalConversion);
2561     if (UNLIKELY(state->hadException()))
2562         return;
2563     impl.setAttrWithSetterException(nativeValue, ec);
2564     setDOMException(state, ec);
2565 }
2566
2567
2568 void setJSTestObjAttrWithSetterExceptionWithMessage(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2569 {
2570     JSValue value = JSValue::decode(encodedValue);
2571     UNUSED_PARAM(baseObject);
2572     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2573     if (UNLIKELY(!castedThis)) {
2574         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2575             reportDeprecatedSetterError(*state, "TestObj", "attrWithSetterExceptionWithMessage");
2576         else
2577             throwSetterTypeError(*state, "TestObj", "attrWithSetterExceptionWithMessage");
2578         return;
2579     }
2580     auto& impl = castedThis->wrapped();
2581     ExceptionCodeWithMessage ec;
2582     int nativeValue = toInt32(state, value, NormalConversion);
2583     if (UNLIKELY(state->hadException()))
2584         return;
2585     impl.setAttrWithSetterExceptionWithMessage(nativeValue, ec);
2586     setDOMException(state, ec);
2587 }
2588
2589
2590 void setJSTestObjStringAttrWithGetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2591 {
2592     JSValue value = JSValue::decode(encodedValue);
2593     UNUSED_PARAM(baseObject);
2594     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2595     if (UNLIKELY(!castedThis)) {
2596         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2597             reportDeprecatedSetterError(*state, "TestObj", "stringAttrWithGetterException");
2598         else
2599             throwSetterTypeError(*state, "TestObj", "stringAttrWithGetterException");
2600         return;
2601     }
2602     auto& impl = castedThis->wrapped();
2603     String nativeValue = value.toString(state)->value(state);
2604     if (UNLIKELY(state->hadException()))
2605         return;
2606     impl.setStringAttrWithGetterException(nativeValue);
2607 }
2608
2609
2610 void setJSTestObjStringAttrWithSetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2611 {
2612     JSValue value = JSValue::decode(encodedValue);
2613     UNUSED_PARAM(baseObject);
2614     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2615     if (UNLIKELY(!castedThis)) {
2616         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2617             reportDeprecatedSetterError(*state, "TestObj", "stringAttrWithSetterException");
2618         else
2619             throwSetterTypeError(*state, "TestObj", "stringAttrWithSetterException");
2620         return;
2621     }
2622     auto& impl = castedThis->wrapped();
2623     ExceptionCode ec = 0;
2624     String nativeValue = value.toString(state)->value(state);
2625     if (UNLIKELY(state->hadException()))
2626         return;
2627     impl.setStringAttrWithSetterException(nativeValue, ec);
2628     setDOMException(state, ec);
2629 }
2630
2631
2632 void setJSTestObjStrictTypeCheckingAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2633 {
2634     JSValue value = JSValue::decode(encodedValue);
2635     UNUSED_PARAM(baseObject);
2636     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2637     if (UNLIKELY(!castedThis)) {
2638         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2639             reportDeprecatedSetterError(*state, "TestObj", "strictTypeCheckingAttribute");
2640         else
2641             throwSetterTypeError(*state, "TestObj", "strictTypeCheckingAttribute");
2642         return;
2643     }
2644     auto& impl = castedThis->wrapped();
2645     if (UNLIKELY(!value.isUndefinedOrNull() && !value.inherits(JSTestObj::info()))) {
2646         throwAttributeTypeError(*state, "TestObj", "strictTypeCheckingAttribute", "TestObj");
2647         return;
2648     };
2649     TestObj* nativeValue = JSTestObj::toWrapped(value);
2650     if (UNLIKELY(state->hadException()))
2651         return;
2652     impl.setStrictTypeCheckingAttribute(nativeValue);
2653 }
2654
2655
2656 void setJSTestObjCustomAttr(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2657 {
2658     JSValue value = JSValue::decode(encodedValue);
2659     UNUSED_PARAM(baseObject);
2660     UNUSED_PARAM(thisValue);
2661     auto* castedThis = jsCast<JSTestObj*>(baseObject);
2662     UNUSED_PARAM(thisValue);
2663     UNUSED_PARAM(state);
2664     castedThis->setCustomAttr(*state, value);
2665 }
2666
2667
2668 void setJSTestObjOnfoo(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2669 {
2670     JSValue value = JSValue::decode(encodedValue);
2671     UNUSED_PARAM(baseObject);
2672     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2673     if (UNLIKELY(!castedThis)) {
2674         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2675             reportDeprecatedSetterError(*state, "TestObj", "onfoo");
2676         else
2677             throwSetterTypeError(*state, "TestObj", "onfoo");
2678         return;
2679     }
2680     setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().fooEvent, value);
2681 }
2682
2683
2684 void setJSTestObjWithScriptStateAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2685 {
2686     JSValue value = JSValue::decode(encodedValue);
2687     UNUSED_PARAM(baseObject);
2688     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2689     if (UNLIKELY(!castedThis)) {
2690         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2691             reportDeprecatedSetterError(*state, "TestObj", "withScriptStateAttribute");
2692         else
2693             throwSetterTypeError(*state, "TestObj", "withScriptStateAttribute");
2694         return;
2695     }
2696     auto& impl = castedThis->wrapped();
2697     int nativeValue = toInt32(state, value, NormalConversion);
2698     if (UNLIKELY(state->hadException()))
2699         return;
2700     impl.setWithScriptStateAttribute(*state, nativeValue);
2701 }
2702
2703
2704 void setJSTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2705 {
2706     JSValue value = JSValue::decode(encodedValue);
2707     UNUSED_PARAM(baseObject);
2708     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2709     if (UNLIKELY(!castedThis)) {
2710         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2711             reportDeprecatedSetterError(*state, "TestObj", "withCallWithAndSetterCallWithAttribute");
2712         else
2713             throwSetterTypeError(*state, "TestObj", "withCallWithAndSetterCallWithAttribute");
2714         return;
2715     }
2716     auto& impl = castedThis->wrapped();
2717     int nativeValue = toInt32(state, value, NormalConversion);
2718     if (UNLIKELY(state->hadException()))
2719         return;
2720     impl.setWithCallWithAndSetterCallWithAttribute(*state, activeDOMWindow(state), firstDOMWindow(state), nativeValue);
2721 }
2722
2723
2724 void setJSTestObjWithScriptExecutionContextAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2725 {
2726     JSValue value = JSValue::decode(encodedValue);
2727     UNUSED_PARAM(baseObject);
2728     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2729     if (UNLIKELY(!castedThis)) {
2730         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2731             reportDeprecatedSetterError(*state, "TestObj", "withScriptExecutionContextAttribute");
2732         else
2733             throwSetterTypeError(*state, "TestObj", "withScriptExecutionContextAttribute");
2734         return;
2735     }
2736     auto& impl = castedThis->wrapped();
2737     TestObj* nativeValue = JSTestObj::toWrapped(value);
2738     if (UNLIKELY(state->hadException()))
2739         return;
2740     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2741     if (!scriptContext)
2742         return;
2743     impl.setWithScriptExecutionContextAttribute(scriptContext, nativeValue);
2744 }
2745
2746
2747 void setJSTestObjWithScriptStateAttributeRaises(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2748 {
2749     JSValue value = JSValue::decode(encodedValue);
2750     UNUSED_PARAM(baseObject);
2751     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2752     if (UNLIKELY(!castedThis)) {
2753         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2754             reportDeprecatedSetterError(*state, "TestObj", "withScriptStateAttributeRaises");
2755         else
2756             throwSetterTypeError(*state, "TestObj", "withScriptStateAttributeRaises");
2757         return;
2758     }
2759     auto& impl = castedThis->wrapped();
2760     TestObj* nativeValue = JSTestObj::toWrapped(value);
2761     if (UNLIKELY(state->hadException()))
2762         return;
2763     impl.setWithScriptStateAttributeRaises(*state, nativeValue);
2764 }
2765
2766
2767 void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2768 {
2769     JSValue value = JSValue::decode(encodedValue);
2770     UNUSED_PARAM(baseObject);
2771     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2772     if (UNLIKELY(!castedThis)) {
2773         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2774             reportDeprecatedSetterError(*state, "TestObj", "withScriptExecutionContextAttributeRaises");
2775         else
2776             throwSetterTypeError(*state, "TestObj", "withScriptExecutionContextAttributeRaises");
2777         return;
2778     }
2779     auto& impl = castedThis->wrapped();
2780     TestObj* nativeValue = JSTestObj::toWrapped(value);
2781     if (UNLIKELY(state->hadException()))
2782         return;
2783     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2784     if (!scriptContext)
2785         return;
2786     impl.setWithScriptExecutionContextAttributeRaises(scriptContext, nativeValue);
2787 }
2788
2789
2790 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2791 {
2792     JSValue value = JSValue::decode(encodedValue);
2793     UNUSED_PARAM(baseObject);
2794     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2795     if (UNLIKELY(!castedThis)) {
2796         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2797             reportDeprecatedSetterError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
2798         else
2799             throwSetterTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
2800         return;
2801     }
2802     auto& impl = castedThis->wrapped();
2803     TestObj* nativeValue = JSTestObj::toWrapped(value);
2804     if (UNLIKELY(state->hadException()))
2805         return;
2806     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2807     if (!scriptContext)
2808         return;
2809     impl.setWithScriptExecutionContextAndScriptStateAttribute(*state, scriptContext, nativeValue);
2810 }
2811
2812
2813 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2814 {
2815     JSValue value = JSValue::decode(encodedValue);
2816     UNUSED_PARAM(baseObject);
2817     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2818     if (UNLIKELY(!castedThis)) {
2819         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2820             reportDeprecatedSetterError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
2821         else
2822             throwSetterTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
2823         return;
2824     }
2825     auto& impl = castedThis->wrapped();
2826     TestObj* nativeValue = JSTestObj::toWrapped(value);
2827     if (UNLIKELY(state->hadException()))
2828         return;
2829     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2830     if (!scriptContext)
2831         return;
2832     impl.setWithScriptExecutionContextAndScriptStateAttributeRaises(*state, scriptContext, nativeValue);
2833 }
2834
2835
2836 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2837 {
2838     JSValue value = JSValue::decode(encodedValue);
2839     UNUSED_PARAM(baseObject);
2840     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2841     if (UNLIKELY(!castedThis)) {
2842         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2843             reportDeprecatedSetterError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
2844         else
2845             throwSetterTypeError(*state, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
2846         return;
2847     }
2848     auto& impl = castedThis->wrapped();
2849     TestObj* nativeValue = JSTestObj::toWrapped(value);
2850     if (UNLIKELY(state->hadException()))
2851         return;
2852     auto* scriptContext = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
2853     if (!scriptContext)
2854         return;
2855     impl.setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, scriptContext, nativeValue);
2856 }
2857
2858
2859 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2860 {
2861     JSValue value = JSValue::decode(encodedValue);
2862     UNUSED_PARAM(baseObject);
2863     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2864     if (UNLIKELY(!castedThis)) {
2865         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2866             reportDeprecatedSetterError(*state, "TestObj", "withScriptArgumentsAndCallStackAttribute");
2867         else
2868             throwSetterTypeError(*state, "TestObj", "withScriptArgumentsAndCallStackAttribute");
2869         return;
2870     }
2871     auto& impl = castedThis->wrapped();
2872     TestObj* nativeValue = JSTestObj::toWrapped(value);
2873     if (UNLIKELY(state->hadException()))
2874         return;
2875     impl.setWithScriptArgumentsAndCallStackAttribute(nativeValue);
2876 }
2877
2878
2879 #if ENABLE(Condition1)
2880 void setJSTestObjConditionalAttr1(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2881 {
2882     JSValue value = JSValue::decode(encodedValue);
2883     UNUSED_PARAM(baseObject);
2884     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2885     if (UNLIKELY(!castedThis)) {
2886         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2887             reportDeprecatedSetterError(*state, "TestObj", "conditionalAttr1");
2888         else
2889             throwSetterTypeError(*state, "TestObj", "conditionalAttr1");
2890         return;
2891     }
2892     auto& impl = castedThis->wrapped();
2893     int nativeValue = toInt32(state, value, NormalConversion);
2894     if (UNLIKELY(state->hadException()))
2895         return;
2896     impl.setConditionalAttr1(nativeValue);
2897 }
2898
2899 #endif
2900
2901 #if ENABLE(Condition1) && ENABLE(Condition2)
2902 void setJSTestObjConditionalAttr2(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2903 {
2904     JSValue value = JSValue::decode(encodedValue);
2905     UNUSED_PARAM(baseObject);
2906     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2907     if (UNLIKELY(!castedThis)) {
2908         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2909             reportDeprecatedSetterError(*state, "TestObj", "conditionalAttr2");
2910         else
2911             throwSetterTypeError(*state, "TestObj", "conditionalAttr2");
2912         return;
2913     }
2914     auto& impl = castedThis->wrapped();
2915     int nativeValue = toInt32(state, value, NormalConversion);
2916     if (UNLIKELY(state->hadException()))
2917         return;
2918     impl.setConditionalAttr2(nativeValue);
2919 }
2920
2921 #endif
2922
2923 #if ENABLE(Condition1) || ENABLE(Condition2)
2924 void setJSTestObjConditionalAttr3(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2925 {
2926     JSValue value = JSValue::decode(encodedValue);
2927     UNUSED_PARAM(baseObject);
2928     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2929     if (UNLIKELY(!castedThis)) {
2930         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2931             reportDeprecatedSetterError(*state, "TestObj", "conditionalAttr3");
2932         else
2933             throwSetterTypeError(*state, "TestObj", "conditionalAttr3");
2934         return;
2935     }
2936     auto& impl = castedThis->wrapped();
2937     int nativeValue = toInt32(state, value, NormalConversion);
2938     if (UNLIKELY(state->hadException()))
2939         return;
2940     impl.setConditionalAttr3(nativeValue);
2941 }
2942
2943 #endif
2944
2945 #if ENABLE(Condition1)
2946 void setJSTestObjConditionalAttr4Constructor(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2947 {
2948     JSValue value = JSValue::decode(encodedValue);
2949     UNUSED_PARAM(baseObject);
2950     UNUSED_PARAM(thisValue);
2951     auto* castedThis = jsCast<JSTestObj*>(baseObject);
2952     UNUSED_PARAM(thisValue);
2953     UNUSED_PARAM(state);
2954     // Shadowing a built-in constructor.
2955     castedThis->putDirect(state->vm(), Identifier::fromString(state, "conditionalAttr4"), value);
2956 }
2957
2958 #endif
2959
2960 #if ENABLE(Condition1) && ENABLE(Condition2)
2961 void setJSTestObjConditionalAttr5Constructor(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2962 {
2963     JSValue value = JSValue::decode(encodedValue);
2964     UNUSED_PARAM(baseObject);
2965     UNUSED_PARAM(thisValue);
2966     auto* castedThis = jsCast<JSTestObj*>(baseObject);
2967     UNUSED_PARAM(thisValue);
2968     UNUSED_PARAM(state);
2969     // Shadowing a built-in constructor.
2970     castedThis->putDirect(state->vm(), Identifier::fromString(state, "conditionalAttr5"), value);
2971 }
2972
2973 #endif
2974
2975 #if ENABLE(Condition1) || ENABLE(Condition2)
2976 void setJSTestObjConditionalAttr6Constructor(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2977 {
2978     JSValue value = JSValue::decode(encodedValue);
2979     UNUSED_PARAM(baseObject);
2980     UNUSED_PARAM(thisValue);
2981     auto* castedThis = jsCast<JSTestObj*>(baseObject);
2982     UNUSED_PARAM(thisValue);
2983     UNUSED_PARAM(state);
2984     // Shadowing a built-in constructor.
2985     castedThis->putDirect(state->vm(), Identifier::fromString(state, "conditionalAttr6"), value);
2986 }
2987
2988 #endif
2989
2990 void setJSTestObjAnyAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2991 {
2992     JSValue value = JSValue::decode(encodedValue);
2993     UNUSED_PARAM(baseObject);
2994     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2995     if (UNLIKELY(!castedThis)) {
2996         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
2997             reportDeprecatedSetterError(*state, "TestObj", "anyAttribute");
2998         else
2999             throwSetterTypeError(*state, "TestObj", "anyAttribute");
3000         return;
3001     }
3002     auto& impl = castedThis->wrapped();
3003     Deprecated::ScriptValue nativeValue = { state->vm(), value };
3004     if (UNLIKELY(state->hadException()))
3005         return;
3006     impl.setAnyAttribute(nativeValue);
3007 }
3008
3009
3010 void setJSTestObjMutablePoint(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3011 {
3012     JSValue value = JSValue::decode(encodedValue);
3013     UNUSED_PARAM(baseObject);
3014     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3015     if (UNLIKELY(!castedThis)) {
3016         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3017             reportDeprecatedSetterError(*state, "TestObj", "mutablePoint");
3018         else
3019             throwSetterTypeError(*state, "TestObj", "mutablePoint");
3020         return;
3021     }
3022     auto& impl = castedThis->wrapped();
3023     SVGPropertyTearOff<SVGPoint>* nativeValue = JSSVGPoint::toWrapped(value);
3024     if (UNLIKELY(state->hadException()))
3025         return;
3026     impl.setMutablePoint(nativeValue);
3027 }
3028
3029
3030 void setJSTestObjImmutablePoint(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3031 {
3032     JSValue value = JSValue::decode(encodedValue);
3033     UNUSED_PARAM(baseObject);
3034     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3035     if (UNLIKELY(!castedThis)) {
3036         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3037             reportDeprecatedSetterError(*state, "TestObj", "immutablePoint");
3038         else
3039             throwSetterTypeError(*state, "TestObj", "immutablePoint");
3040         return;
3041     }
3042     auto& impl = castedThis->wrapped();
3043     SVGPropertyTearOff<SVGPoint>* nativeValue = JSSVGPoint::toWrapped(value);
3044     if (UNLIKELY(state->hadException()))
3045         return;
3046     impl.setImmutablePoint(nativeValue);
3047 }
3048
3049
3050 void setJSTestObjStrawberry(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3051 {
3052     JSValue value = JSValue::decode(encodedValue);
3053     UNUSED_PARAM(baseObject);
3054     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3055     if (UNLIKELY(!castedThis)) {
3056         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3057             reportDeprecatedSetterError(*state, "TestObj", "strawberry");
3058         else
3059             throwSetterTypeError(*state, "TestObj", "strawberry");
3060         return;
3061     }
3062     auto& impl = castedThis->wrapped();
3063     int nativeValue = toInt32(state, value, NormalConversion);
3064     if (UNLIKELY(state->hadException()))
3065         return;
3066     impl.setBlueberry(nativeValue);
3067 }
3068
3069
3070 void setJSTestObjStrictFloat(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3071 {
3072     JSValue value = JSValue::decode(encodedValue);
3073     UNUSED_PARAM(baseObject);
3074     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3075     if (UNLIKELY(!castedThis)) {
3076         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3077             reportDeprecatedSetterError(*state, "TestObj", "strictFloat");
3078         else
3079             throwSetterTypeError(*state, "TestObj", "strictFloat");
3080         return;
3081     }
3082     auto& impl = castedThis->wrapped();
3083     float nativeValue = value.toFloat(state);
3084     if (UNLIKELY(state->hadException()))
3085         return;
3086     impl.setStrictFloat(nativeValue);
3087 }
3088
3089
3090 void setJSTestObjId(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3091 {
3092     JSValue value = JSValue::decode(encodedValue);
3093     UNUSED_PARAM(baseObject);
3094     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3095     if (UNLIKELY(!castedThis)) {
3096         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3097             reportDeprecatedSetterError(*state, "TestObj", "id");
3098         else
3099             throwSetterTypeError(*state, "TestObj", "id");
3100         return;
3101     }
3102     auto& impl = castedThis->wrapped();
3103     int nativeValue = toInt32(state, value, NormalConversion);
3104     if (UNLIKELY(state->hadException()))
3105         return;
3106     impl.setId(nativeValue);
3107 }
3108
3109
3110 void setJSTestObjReplaceableAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3111 {
3112     JSValue value = JSValue::decode(encodedValue);
3113     UNUSED_PARAM(baseObject);
3114     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3115     if (UNLIKELY(!castedThis)) {
3116         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3117             reportDeprecatedSetterError(*state, "TestObj", "replaceableAttribute");
3118         else
3119             throwSetterTypeError(*state, "TestObj", "replaceableAttribute");
3120         return;
3121     }
3122     // Shadowing a built-in object.
3123     castedThis->putDirect(state->vm(), Identifier::fromString(state, "replaceableAttribute"), value);
3124 }
3125
3126
3127 void setJSTestObjNullableLongSettableAttribute(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3128 {
3129     JSValue value = JSValue::decode(encodedValue);
3130     UNUSED_PARAM(baseObject);
3131     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
3132     if (UNLIKELY(!castedThis)) {
3133         if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
3134             reportDeprecatedSetterError(*state, "TestObj", "nullableLongSettableAttribute");
3135         else
3136             throwSetterTypeError(*state, "TestObj", "nullableLongSettableAttribute");
3137         return;
3138     }
3139     auto& impl = castedThis->wrapped();
3140     int nativeValue = toInt32(state, value, NormalConversion);
3141     if (UNLIKELY(state->hadException()))
3142         return;
3143     impl.setNullableLongSettableAttribute(nativeValue);
3144 }
3145
3146
3147 void setJSTestObjNullableStringValue(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
3148 {
3149     JSValue value = JSValue::decode(encodedValue);