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