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