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