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