Changeset 207192 in webkit
- Timestamp:
- Oct 11, 2016 11:57:04 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r207190 r207192 1 2016-10-11 Youenn Fablet <youenn@apple.com> 2 3 Refactor binding generated casted-this checks for methods 4 https://bugs.webkit.org/show_bug.cgi?id=163198 5 6 Reviewed by Darin Adler. 7 8 Covered by existing tests and binding rebased tests.. 9 10 Introducing BindingCaller::callMethod and callPromiseMethod to encapsulate casted-this checks for methods. 11 This is supported for all methods except seralizer and iterators methods. 12 13 Introduced castForMethod similarly to castForAttribute. 14 Moved this from static methods of JSClass to static methods of BindingCaller<JSClass> 15 This allows removing the corresponding declarations from JSClass header file. 16 17 Note the difference of handling thisValue between the two in case of CustomProxyToJSObject. 18 This should be made more consistent. 19 20 In case of bad casted this check, CustomProxyToJSObject objects will throw a TypeError with an error message like other methods. 21 Before the patch, a TypeError without error message was thrown. 22 23 EventTarget being different, added a specialization of BindingCaller for it. 24 This allows also removing some binding generated code dedicated to EventTarget. 25 A similar approach might also be done for CustomProxyToJSObject objects to further simplify the binding generator. 26 27 28 * bindings/js/JSDOMBinding.cpp: 29 (WebCore::rejectPromiseWithThisTypeError): 30 * bindings/js/JSDOMBinding.h: 31 (WebCore::BindingCaller::callPromiseMethod): 32 (WebCore::BindingCaller::callMethod): 33 * bindings/js/JSEventTargetCustom.h: 34 (WebCore::BindingCaller<JSEventTarget>::callMethod): 35 * bindings/scripts/CodeGeneratorJS.pm: 36 (GenerateHeader): 37 (GenerateImplementation): 38 (GenerateFunctionCastedThis): Deleted. 39 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 40 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: 41 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 42 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: 43 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 44 * bindings/scripts/test/JS/JSTestEventTarget.h: 45 * bindings/scripts/test/JS/JSTestGlobalObject.cpp: 46 * bindings/scripts/test/JS/JSTestGlobalObject.h: 47 * bindings/scripts/test/JS/JSTestInterface.cpp: 48 * bindings/scripts/test/JS/JSTestInterface.h: 49 * bindings/scripts/test/JS/JSTestIterable.cpp: 50 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 51 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: 52 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 53 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: 54 * bindings/scripts/test/JS/JSTestNode.cpp: 55 * bindings/scripts/test/JS/JSTestNode.h: 56 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: 57 * bindings/scripts/test/JS/JSTestNondeterministic.h: 58 * bindings/scripts/test/JS/JSTestObj.cpp: 59 * bindings/scripts/test/JS/JSTestObj.h: 60 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 61 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: 62 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 63 * bindings/scripts/test/JS/JSTestTypedefs.h: 64 1 65 2016-10-11 Youenn Fablet <youenn@apple.com> 2 66 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r206976 r207192 979 979 } 980 980 981 JSC::EncodedJSValue rejectPromiseWithThisTypeError(DeferredPromise& promise, const char* interfaceName, const char* methodName) 982 { 983 promise.reject(TypeError, makeThisTypeErrorMessage(interfaceName, methodName)); 984 return JSValue::encode(jsUndefined()); 985 } 986 987 JSC::EncodedJSValue rejectPromiseWithThisTypeError(JSC::ExecState& state, const char* interfaceName, const char* methodName) 988 { 989 return createRejectedPromiseWithTypeError(state, makeThisTypeErrorMessage(interfaceName, methodName)); 990 } 991 981 992 void callFunctionWithCurrentArguments(JSC::ExecState& state, JSC::JSObject& thisObject, JSC::JSFunction& function) 982 993 { -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r207150 r207192 67 67 68 68 class CachedScript; 69 class DeferredPromise; 69 70 class DOMWindow; 70 71 class Frame; … … 136 137 137 138 WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithGetterTypeError(JSC::ExecState&, const char* interfaceName, const char* attributeName); 139 WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithThisTypeError(DeferredPromise&, const char* interfaceName, const char* operationName); 140 WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithThisTypeError(JSC::ExecState&, const char* interfaceName, const char* operationName); 138 141 139 142 WEBCORE_EXPORT JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject&, const JSC::ClassInfo*); … … 335 338 using AttributeSetterFunction = bool(JSC::ExecState*, JSClass*, JSC::JSValue, JSC::ThrowScope&); 336 339 using AttributeGetterFunction = JSC::JSValue(JSC::ExecState&, JSClass&, JSC::ThrowScope&); 340 using OperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSClass*, JSC::ThrowScope&); 341 using PromiseOperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSClass*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 342 343 static JSClass* castForAttribute(JSC::ExecState&, JSC::EncodedJSValue); 344 static JSClass* castForOperation(JSC::ExecState&); 345 346 template<PromiseOperationCallerFunction operationCaller> 347 static JSC::EncodedJSValue callPromiseOperation(JSC::ExecState* state, Ref<DeferredPromise>&& promise, const char* operationName) 348 { 349 ASSERT(state); 350 auto throwScope = DECLARE_THROW_SCOPE(state->vm()); 351 auto* thisObject = castForOperation(*state); 352 if (UNLIKELY(!thisObject)) { 353 ASSERT(JSClass::info()); 354 return rejectPromiseWithThisTypeError(promise.get(), JSClass::info()->className, operationName); 355 } 356 ASSERT_GC_OBJECT_INHERITS(thisObject, JSClass::info()); 357 // FIXME: We should refactor the binding generated code to use references for state and thisObject. 358 return operationCaller(state, thisObject, WTFMove(promise), throwScope); 359 } 360 361 template<OperationCallerFunction operationCaller, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw> 362 static JSC::EncodedJSValue callOperation(JSC::ExecState* state, const char* operationName) 363 { 364 ASSERT(state); 365 auto throwScope = DECLARE_THROW_SCOPE(state->vm()); 366 auto* thisObject = castForOperation(*state); 367 if (UNLIKELY(!thisObject)) { 368 ASSERT(JSClass::info()); 369 if (shouldThrow == CastedThisErrorBehavior::Throw) 370 return throwThisTypeError(*state, throwScope, JSClass::info()->className, operationName); 371 // For custom promise-returning operations 372 return rejectPromiseWithThisTypeError(*state, JSClass::info()->className, operationName); 373 } 374 ASSERT_GC_OBJECT_INHERITS(thisObject, JSClass::info()); 375 // FIXME: We should refactor the binding generated code to use references for state and thisObject. 376 return operationCaller(state, thisObject, throwScope); 377 } 337 378 338 379 template<AttributeSetterFunction setter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw> … … 341 382 ASSERT(state); 342 383 auto throwScope = DECLARE_THROW_SCOPE(state->vm()); 343 auto* thisObject = JSClass::castForAttribute(state, thisValue);384 auto* thisObject = castForAttribute(*state, thisValue); 344 385 if (UNLIKELY(!thisObject)) { 345 386 ASSERT(JSClass::info()); … … 355 396 ASSERT(state); 356 397 auto throwScope = DECLARE_THROW_SCOPE(state->vm()); 357 auto* thisObject = JSClass::castForAttribute(state, thisValue);398 auto* thisObject = castForAttribute(*state, thisValue); 358 399 if (UNLIKELY(!thisObject)) { 359 400 ASSERT(JSClass::info()); -
trunk/Source/WebCore/bindings/js/JSEventTargetCustom.h
r196563 r207192 24 24 */ 25 25 26 #ifndef JSEventTargetCustom_h 27 #define JSEventTargetCustom_h 26 #pragma once 28 27 28 #include "DOMWindow.h" 29 29 #include "JSDOMBinding.h" 30 30 … … 51 51 std::unique_ptr<JSEventTargetWrapper> jsEventTargetCast(JSC::JSValue thisValue); 52 52 53 template<> struct BindingCaller<JSEventTarget> { 54 using OperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSEventTargetWrapper*, JSC::ThrowScope&); 55 56 template<OperationCallerFunction operationCaller> 57 static JSC::EncodedJSValue callOperation(JSC::ExecState* state, const char* operationName) 58 { 59 ASSERT(state); 60 auto throwScope = DECLARE_THROW_SCOPE(state->vm()); 61 62 auto thisObject = jsEventTargetCast(state->thisValue().toThis(state, JSC::NotStrictMode)); 63 if (UNLIKELY(!thisObject)) 64 return throwThisTypeError(*state, throwScope, "EventTarget", operationName); 65 66 if (auto* window = thisObject->wrapped().toDOMWindow()) { 67 if (!window->frame() || !BindingSecurity::shouldAllowAccessToDOMWindow(state, *window, ThrowSecurityError)) 68 return JSC::JSValue::encode(JSC::jsUndefined()); 69 } 70 71 return operationCaller(state, thisObject.get(), throwScope); 72 } 73 }; 74 53 75 } // namespace WebCore 54 55 #endif // JSEventTargetCustom_h -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r207170 r207192 1433 1433 # Attribute and function enums 1434 1434 if ($numAttributes > 0) { 1435 push(@headerContent, " static ${className}* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);\n");1436 1437 1435 foreach (@{$interface->attributes}) { 1438 1436 my $attribute = $_; … … 2927 2925 # FIXME: Remove ImplicitThis keyword as it is no longer defined by WebIDL spec and is only used in DOMWindow. 2928 2926 if ($interface->extendedAttributes->{"ImplicitThis"}) { 2929 push(@implContent, " inline ${className}* ${className}::castForAttribute(ExecState*state, EncodedJSValue thisValue)\n");2927 push(@implContent, "template<> inline ${className}* BindingCaller<${className}>::castForAttribute(ExecState& state, EncodedJSValue thisValue)\n"); 2930 2928 push(@implContent, "{\n"); 2931 push(@implContent, " JSValuedecodedThisValue = JSValue::decode(thisValue);\n");2929 push(@implContent, " auto decodedThisValue = JSValue::decode(thisValue);\n"); 2932 2930 push(@implContent, " if (decodedThisValue.isUndefinedOrNull())\n"); 2933 push(@implContent, " decodedThisValue = state ->thisValue().toThis(state, NotStrictMode);\n");2934 push(@implContent, " return $castingFunction(decodedThisValue); \n");2931 push(@implContent, " decodedThisValue = state.thisValue().toThis(&state, NotStrictMode);\n"); 2932 push(@implContent, " return $castingFunction(decodedThisValue);"); 2935 2933 push(@implContent, "}\n\n"); 2936 2934 } else { 2937 push(@implContent, " inline ${className}* ${className}::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)\n");2935 push(@implContent, "template<> inline ${className}* BindingCaller<${className}>::castForAttribute(ExecState&, EncodedJSValue thisValue)\n"); 2938 2936 push(@implContent, "{\n"); 2939 2937 push(@implContent, " return $castingFunction(JSValue::decode(thisValue));\n"); 2940 2938 push(@implContent, "}\n\n"); 2941 2939 } 2940 } 2941 2942 if ($numFunctions > 0 && $interfaceName ne "EventTarget") { 2943 # FIXME: Make consistent castForAttibute and castForOperation in case of CustomProxyToJSObject. 2944 my $castingFunction = $interface->extendedAttributes->{"CustomProxyToJSObject"} ? "to${className}" : GetCastingHelperForThisObject($interface); 2945 my $thisValue = $interface->extendedAttributes->{"CustomProxyToJSObject"} ? "state.thisValue().toThis(&state, NotStrictMode)" : "state.thisValue()"; 2946 push(@implContent, "template<> inline ${className}* BindingCaller<${className}>::castForOperation(ExecState& state)\n"); 2947 push(@implContent, "{\n"); 2948 push(@implContent, " return $castingFunction($thisValue);\n"); 2949 push(@implContent, "}\n\n"); 2942 2950 } 2943 2951 … … 3557 3565 AddToImplIncludes("JSDOMPromise.h") if IsReturningPromise($function); 3558 3566 3567 if (!$function->isStatic) { 3568 my $classParameterType = $className eq "JSEventTarget" ? "JSEventTargetWrapper*" : "${className}*"; 3569 my $optionalPromiseParameter = (IsReturningPromise($function) && !$isCustom) ? " Ref<DeferredPromise>&&," : ""; 3570 push(@implContent, "static inline JSC::EncodedJSValue ${functionName}Caller(JSC::ExecState*, ${classParameterType},${optionalPromiseParameter} JSC::ThrowScope&);\n"); 3571 push(@implContent, "\n"); 3572 } 3573 3559 3574 if (IsReturningPromise($function) && !$isCustom) { 3560 3575 my $scope = $interface->extendedAttributes->{Exposed} ? "WindowOrWorker" : "WindowOnly"; … … 3577 3592 3578 3593 $implIncludes{"<runtime/Error.h>"} = 1; 3579 3580 push(@implContent, " VM& vm = state->vm();\n");3581 push(@implContent, " auto throwScope = DECLARE_THROW_SCOPE(vm);\n");3582 push(@implContent, " UNUSED_PARAM(throwScope);\n");3583 3594 3584 3595 if ($function->signature->extendedAttributes->{CEReactions}) { … … 3594 3605 push(@implContent, " return JSValue::encode(${className}::" . $functionImplementationName . "(state));\n"); 3595 3606 } else { 3607 push(@implContent, " VM& vm = state->vm();\n"); 3608 push(@implContent, " auto throwScope = DECLARE_THROW_SCOPE(vm);\n"); 3609 push(@implContent, " UNUSED_PARAM(throwScope);\n"); 3610 3596 3611 GenerateArgumentsCountCheck(\@implContent, $function, $interface); 3597 3612 … … 3602 3617 } 3603 3618 } else { 3604 my $shouldRejectCastedThis = $isCustom && IsReturningPromise($function); 3605 GenerateFunctionCastedThis($interface, $className, $function, $shouldRejectCastedThis); 3619 my $methodName = $function->signature->name; 3620 if (IsReturningPromise($function) && !$isCustom) { 3621 push(@implContent, " return BindingCaller<$className>::callPromiseOperation<${functionName}Caller>(state, WTFMove(promise), \"${methodName}\");\n"); 3622 push(@implContent, "}\n"); 3623 push(@implContent, "\n"); 3624 push(@implContent, "static inline JSC::EncodedJSValue ${functionName}Caller(JSC::ExecState* state, ${className}* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope)\n"); 3625 } else { 3626 my $classParameterType = $className eq "JSEventTarget" ? "JSEventTargetWrapper*" : "${className}*"; 3627 my $templateParameters = "${functionName}Caller"; 3628 # FIXME: We need this specific handling for custom promise-returning functions. 3629 # It would be better to have the casted-this code calling the promise-specific code. 3630 $templateParameters .= ", CastedThisErrorBehavior::RejectPromise" if IsReturningPromise($function); 3631 3632 push(@implContent, " return BindingCaller<$className>::callOperation<${templateParameters}>(state, \"${methodName}\");\n"); 3633 push(@implContent, "}\n"); 3634 push(@implContent, "\n"); 3635 push(@implContent, "static inline JSC::EncodedJSValue ${functionName}Caller(JSC::ExecState* state, ${classParameterType} castedThis, JSC::ThrowScope& throwScope)\n"); 3636 } 3637 3638 push(@implContent, "{\n"); 3639 push(@implContent, " UNUSED_PARAM(state);\n"); 3640 push(@implContent, " UNUSED_PARAM(throwScope);\n"); 3606 3641 3607 3642 if ($interface->extendedAttributes->{CheckSecurity} and !$function->signature->extendedAttributes->{DoNotCheckSecurity}) { … … 3625 3660 push(@implContent, " $svgPropertyType& podImpl = impl.propertyReference();\n"); 3626 3661 $implIncludes{"ExceptionCode.h"} = 1; 3627 }3628 3629 # EventTarget needs to do some extra checks if castedThis is a JSDOMWindow.3630 if ($interface->name eq "EventTarget") {3631 $implIncludes{"DOMWindow.h"} = 1;3632 push(@implContent, " if (auto* window = castedThis->wrapped().toDOMWindow()) {\n");3633 push(@implContent, " if (!window->frame() || !BindingSecurity::shouldAllowAccessToDOMWindow(state, *window, ThrowSecurityError))\n");3634 push(@implContent, " return JSValue::encode(jsUndefined());\n");3635 push(@implContent, " }\n");3636 3662 } 3637 3663 … … 3914 3940 push(@implContent, " return JSValue::encode(result);\n"); 3915 3941 push(@implContent, "}\n\n"); 3916 }3917 3918 sub GenerateFunctionCastedThis3919 {3920 my ($interface, $className, $function, $shouldRejectPromise) = @_;3921 3922 if ($interface->extendedAttributes->{CustomProxyToJSObject}) {3923 push(@implContent, " $className* castedThis = to${className}(state->thisValue().toThis(state, NotStrictMode));\n");3924 push(@implContent, " if (UNLIKELY(!castedThis))\n");3925 push(@implContent, " return throwVMTypeError(state, throwScope);\n");3926 } else {3927 push(@implContent, " JSValue thisValue = state->thisValue();\n");3928 my $castingHelper = GetCastingHelperForThisObject($interface);3929 my $interfaceName = $interface->name;3930 if ($interfaceName eq "EventTarget") {3931 # We allow calling the EventTarget API without an explicit 'this' value and fall back to using the global object instead.3932 # As of early 2016, this matches Firefox and Chrome's behavior.3933 push(@implContent, " auto castedThis = $castingHelper(thisValue.toThis(state, NotStrictMode));\n");3934 } else {3935 push(@implContent, " auto castedThis = $castingHelper(thisValue);\n");3936 }3937 3938 my $visibleInterfaceName = $codeGenerator->GetVisibleInterfaceName($interface);3939 my $domFunctionName = $function->signature->name;3940 push(@implContent, " if (UNLIKELY(!castedThis))\n");3941 if ($shouldRejectPromise) {3942 push(@implContent, " return createRejectedPromiseWithTypeError(*state, makeThisTypeErrorMessage(\"$visibleInterfaceName\", \"$domFunctionName\"));\n");3943 } else {3944 push(@implContent, " return throwThisTypeError(*state, throwScope, \"$visibleInterfaceName\", \"$domFunctionName\");\n");3945 }3946 }3947 3948 push(@implContent, " ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n") unless $interface->name eq "EventTarget";3949 3942 } 3950 3943 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r206992 r207192 141 141 } 142 142 143 inline JSTestActiveDOMObject* JSTestActiveDOMObject::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)143 template<> inline JSTestActiveDOMObject* BindingCaller<JSTestActiveDOMObject>::castForAttribute(ExecState&, EncodedJSValue thisValue) 144 144 { 145 145 return jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue)); 146 } 147 148 template<> inline JSTestActiveDOMObject* BindingCaller<JSTestActiveDOMObject>::castForOperation(ExecState& state) 149 { 150 return jsDynamicCast<JSTestActiveDOMObject*>(state.thisValue()); 146 151 } 147 152 … … 193 198 } 194 199 200 static inline JSC::EncodedJSValue jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionCaller(JSC::ExecState*, JSTestActiveDOMObject*, JSC::ThrowScope&); 201 195 202 EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunction(ExecState* state) 196 203 { 197 VM& vm = state->vm(); 198 auto throwScope = DECLARE_THROW_SCOPE(vm); 204 return BindingCaller<JSTestActiveDOMObject>::callOperation<jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionCaller>(state, "excitingFunction"); 205 } 206 207 static inline JSC::EncodedJSValue jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionCaller(JSC::ExecState* state, JSTestActiveDOMObject* castedThis, JSC::ThrowScope& throwScope) 208 { 209 UNUSED_PARAM(state); 199 210 UNUSED_PARAM(throwScope); 200 JSValue thisValue = state->thisValue();201 auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);202 if (UNLIKELY(!castedThis))203 return throwThisTypeError(*state, throwScope, "TestActiveDOMObject", "excitingFunction");204 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());205 211 if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError)) 206 212 return JSValue::encode(jsUndefined()); … … 215 221 } 216 222 223 static inline JSC::EncodedJSValue jsTestActiveDOMObjectPrototypeFunctionPostMessageCaller(JSC::ExecState*, JSTestActiveDOMObject*, JSC::ThrowScope&); 224 217 225 EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(ExecState* state) 218 226 { 219 VM& vm = state->vm(); 220 auto throwScope = DECLARE_THROW_SCOPE(vm); 227 return BindingCaller<JSTestActiveDOMObject>::callOperation<jsTestActiveDOMObjectPrototypeFunctionPostMessageCaller>(state, "postMessage"); 228 } 229 230 static inline JSC::EncodedJSValue jsTestActiveDOMObjectPrototypeFunctionPostMessageCaller(JSC::ExecState* state, JSTestActiveDOMObject* castedThis, JSC::ThrowScope& throwScope) 231 { 232 UNUSED_PARAM(state); 221 233 UNUSED_PARAM(throwScope); 222 JSValue thisValue = state->thisValue();223 auto castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);224 if (UNLIKELY(!castedThis))225 return throwThisTypeError(*state, throwScope, "TestActiveDOMObject", "postMessage");226 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());227 234 auto& impl = castedThis->wrapped(); 228 235 if (UNLIKELY(state->argumentCount() < 1)) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
r206953 r207192 50 50 51 51 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 52 static JSTestActiveDOMObject* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);53 52 public: 54 53 static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp
r207170 r207192 137 137 } 138 138 139 inline JSTestCEReactions* JSTestCEReactions::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)139 template<> inline JSTestCEReactions* BindingCaller<JSTestCEReactions>::castForAttribute(ExecState&, EncodedJSValue thisValue) 140 140 { 141 141 return jsDynamicCast<JSTestCEReactions*>(JSValue::decode(thisValue)); 142 } 143 144 template<> inline JSTestCEReactions* BindingCaller<JSTestCEReactions>::castForOperation(ExecState& state) 145 { 146 return jsDynamicCast<JSTestCEReactions*>(state.thisValue()); 142 147 } 143 148 … … 286 291 } 287 292 293 static inline JSC::EncodedJSValue jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsCaller(JSC::ExecState*, JSTestCEReactions*, JSC::ThrowScope&); 294 288 295 EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactions(ExecState* state) 289 296 { 290 VM& vm = state->vm();291 auto throwScope = DECLARE_THROW_SCOPE(vm);292 UNUSED_PARAM(throwScope);293 297 #if ENABLE(CUSTOM_ELEMENTS) 294 298 CustomElementReactionStack customElementReactionStack; 295 299 #endif 296 JSValue thisValue = state->thisValue(); 297 auto castedThis = jsDynamicCast<JSTestCEReactions*>(thisValue); 298 if (UNLIKELY(!castedThis)) 299 return throwThisTypeError(*state, throwScope, "TestCEReactions", "methodWithCEReactions"); 300 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCEReactions::info()); 300 return BindingCaller<JSTestCEReactions>::callOperation<jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsCaller>(state, "methodWithCEReactions"); 301 } 302 303 static inline JSC::EncodedJSValue jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsCaller(JSC::ExecState* state, JSTestCEReactions* castedThis, JSC::ThrowScope& throwScope) 304 { 305 UNUSED_PARAM(state); 306 UNUSED_PARAM(throwScope); 301 307 auto& impl = castedThis->wrapped(); 302 308 impl.methodWithCEReactions(); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h
r207170 r207192 50 50 51 51 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 52 static JSTestCEReactions* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);53 52 protected: 54 53 JSTestCEReactions(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCEReactions>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp
r207170 r207192 129 129 } 130 130 131 inline JSTestCEReactionsStringifier* JSTestCEReactionsStringifier::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)131 template<> inline JSTestCEReactionsStringifier* BindingCaller<JSTestCEReactionsStringifier>::castForAttribute(ExecState&, EncodedJSValue thisValue) 132 132 { 133 133 return jsDynamicCast<JSTestCEReactionsStringifier*>(JSValue::decode(thisValue)); 134 } 135 136 template<> inline JSTestCEReactionsStringifier* BindingCaller<JSTestCEReactionsStringifier>::castForOperation(ExecState& state) 137 { 138 return jsDynamicCast<JSTestCEReactionsStringifier*>(state.thisValue()); 134 139 } 135 140 … … 201 206 } 202 207 208 static inline JSC::EncodedJSValue jsTestCEReactionsStringifierPrototypeFunctionToStringCaller(JSC::ExecState*, JSTestCEReactionsStringifier*, JSC::ThrowScope&); 209 203 210 EncodedJSValue JSC_HOST_CALL jsTestCEReactionsStringifierPrototypeFunctionToString(ExecState* state) 204 211 { 205 VM& vm = state->vm(); 206 auto throwScope = DECLARE_THROW_SCOPE(vm); 212 return BindingCaller<JSTestCEReactionsStringifier>::callOperation<jsTestCEReactionsStringifierPrototypeFunctionToStringCaller>(state, "toString"); 213 } 214 215 static inline JSC::EncodedJSValue jsTestCEReactionsStringifierPrototypeFunctionToStringCaller(JSC::ExecState* state, JSTestCEReactionsStringifier* castedThis, JSC::ThrowScope& throwScope) 216 { 217 UNUSED_PARAM(state); 207 218 UNUSED_PARAM(throwScope); 208 JSValue thisValue = state->thisValue();209 auto castedThis = jsDynamicCast<JSTestCEReactionsStringifier*>(thisValue);210 if (UNLIKELY(!castedThis))211 return throwThisTypeError(*state, throwScope, "TestCEReactionsStringifier", "toString");212 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCEReactionsStringifier::info());213 219 auto& impl = castedThis->wrapped(); 214 220 JSValue result = jsStringWithCache(state, impl.value()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h
r207170 r207192 50 50 51 51 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 52 static JSTestCEReactionsStringifier* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);53 52 protected: 54 53 JSTestCEReactionsStringifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCEReactionsStringifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r206723 r207192 159 159 } 160 160 161 template<> inline JSTestCustomNamedGetter* BindingCaller<JSTestCustomNamedGetter>::castForOperation(ExecState& state) 162 { 163 return jsDynamicCast<JSTestCustomNamedGetter*>(state.thisValue()); 164 } 165 161 166 EncodedJSValue jsTestCustomNamedGetterConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) 162 167 { … … 188 193 } 189 194 195 static inline JSC::EncodedJSValue jsTestCustomNamedGetterPrototypeFunctionAnotherFunctionCaller(JSC::ExecState*, JSTestCustomNamedGetter*, JSC::ThrowScope&); 196 190 197 EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunction(ExecState* state) 191 198 { 192 VM& vm = state->vm(); 193 auto throwScope = DECLARE_THROW_SCOPE(vm); 199 return BindingCaller<JSTestCustomNamedGetter>::callOperation<jsTestCustomNamedGetterPrototypeFunctionAnotherFunctionCaller>(state, "anotherFunction"); 200 } 201 202 static inline JSC::EncodedJSValue jsTestCustomNamedGetterPrototypeFunctionAnotherFunctionCaller(JSC::ExecState* state, JSTestCustomNamedGetter* castedThis, JSC::ThrowScope& throwScope) 203 { 204 UNUSED_PARAM(state); 194 205 UNUSED_PARAM(throwScope); 195 JSValue thisValue = state->thisValue();196 auto castedThis = jsDynamicCast<JSTestCustomNamedGetter*>(thisValue);197 if (UNLIKELY(!castedThis))198 return throwThisTypeError(*state, throwScope, "TestCustomNamedGetter", "anotherFunction");199 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCustomNamedGetter::info());200 206 auto& impl = castedThis->wrapped(); 201 207 if (UNLIKELY(state->argumentCount() < 1)) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
r206992 r207192 179 179 } 180 180 181 inline JSTestEventConstructor* JSTestEventConstructor::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)181 template<> inline JSTestEventConstructor* BindingCaller<JSTestEventConstructor>::castForAttribute(ExecState&, EncodedJSValue thisValue) 182 182 { 183 183 return jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(thisValue)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
r206953 r207192 52 52 53 53 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 54 static JSTestEventConstructor* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);55 54 protected: 56 55 JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventConstructor>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r207150 r207192 159 159 } 160 160 161 template<> inline JSTestEventTarget* BindingCaller<JSTestEventTarget>::castForOperation(ExecState& state) 162 { 163 return jsDynamicCast<JSTestEventTarget*>(state.thisValue()); 164 } 165 161 166 EncodedJSValue jsTestEventTargetConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) 162 167 { … … 201 206 } 202 207 208 static inline JSC::EncodedJSValue jsTestEventTargetPrototypeFunctionItemCaller(JSC::ExecState*, JSTestEventTarget*, JSC::ThrowScope&); 209 203 210 EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* state) 204 211 { 205 VM& vm = state->vm(); 206 auto throwScope = DECLARE_THROW_SCOPE(vm); 212 return BindingCaller<JSTestEventTarget>::callOperation<jsTestEventTargetPrototypeFunctionItemCaller>(state, "item"); 213 } 214 215 static inline JSC::EncodedJSValue jsTestEventTargetPrototypeFunctionItemCaller(JSC::ExecState* state, JSTestEventTarget* castedThis, JSC::ThrowScope& throwScope) 216 { 217 UNUSED_PARAM(state); 207 218 UNUSED_PARAM(throwScope); 208 JSValue thisValue = state->thisValue();209 auto castedThis = jsDynamicCast<JSTestEventTarget*>(thisValue);210 if (UNLIKELY(!castedThis))211 return throwThisTypeError(*state, throwScope, "TestEventTarget", "item");212 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());213 219 auto& impl = castedThis->wrapped(); 214 220 if (UNLIKELY(state->argumentCount() < 1)) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
r206992 r207192 133 133 } 134 134 135 inline JSTestException* JSTestException::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)135 template<> inline JSTestException* BindingCaller<JSTestException>::castForAttribute(ExecState&, EncodedJSValue thisValue) 136 136 { 137 137 return jsDynamicCast<JSTestException*>(JSValue::decode(thisValue)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
r206953 r207192 51 51 52 52 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 53 static JSTestException* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);54 53 public: 55 54 static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
r207150 r207192 178 178 } 179 179 180 inline JSTestGlobalObject* JSTestGlobalObject::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)180 template<> inline JSTestGlobalObject* BindingCaller<JSTestGlobalObject>::castForAttribute(ExecState&, EncodedJSValue thisValue) 181 181 { 182 182 return jsDynamicCast<JSTestGlobalObject*>(JSValue::decode(thisValue)); 183 } 184 185 template<> inline JSTestGlobalObject* BindingCaller<JSTestGlobalObject>::castForOperation(ExecState& state) 186 { 187 return jsDynamicCast<JSTestGlobalObject*>(state.thisValue()); 183 188 } 184 189 … … 362 367 } 363 368 369 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionRegularOperationCaller(JSC::ExecState*, JSTestGlobalObject*, JSC::ThrowScope&); 370 364 371 EncodedJSValue JSC_HOST_CALL jsTestGlobalObjectInstanceFunctionRegularOperation(ExecState* state) 365 372 { 366 VM& vm = state->vm(); 367 auto throwScope = DECLARE_THROW_SCOPE(vm); 368 UNUSED_PARAM(throwScope); 369 JSValue thisValue = state->thisValue(); 370 auto castedThis = jsDynamicCast<JSTestGlobalObject*>(thisValue); 371 if (UNLIKELY(!castedThis)) 372 return throwThisTypeError(*state, throwScope, "TestGlobalObject", "regularOperation"); 373 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info()); 373 return BindingCaller<JSTestGlobalObject>::callOperation<jsTestGlobalObjectInstanceFunctionRegularOperationCaller>(state, "regularOperation"); 374 } 375 376 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionRegularOperationCaller(JSC::ExecState* state, JSTestGlobalObject* castedThis, JSC::ThrowScope& throwScope) 377 { 378 UNUSED_PARAM(state); 379 UNUSED_PARAM(throwScope); 374 380 auto& impl = castedThis->wrapped(); 375 381 if (UNLIKELY(state->argumentCount() < 1)) … … 382 388 383 389 #if ENABLE(TEST_FEATURE) 390 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Caller(JSC::ExecState*, JSTestGlobalObject*, JSC::ThrowScope&); 391 384 392 static inline EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1(ExecState* state) 385 393 { 386 VM& vm = state->vm(); 387 auto throwScope = DECLARE_THROW_SCOPE(vm); 388 UNUSED_PARAM(throwScope); 389 JSValue thisValue = state->thisValue(); 390 auto castedThis = jsDynamicCast<JSTestGlobalObject*>(thisValue); 391 if (UNLIKELY(!castedThis)) 392 return throwThisTypeError(*state, throwScope, "TestGlobalObject", "enabledAtRuntimeOperation"); 393 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info()); 394 return BindingCaller<JSTestGlobalObject>::callOperation<jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Caller>(state, "enabledAtRuntimeOperation"); 395 } 396 397 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Caller(JSC::ExecState* state, JSTestGlobalObject* castedThis, JSC::ThrowScope& throwScope) 398 { 399 UNUSED_PARAM(state); 400 UNUSED_PARAM(throwScope); 394 401 auto& impl = castedThis->wrapped(); 395 402 if (UNLIKELY(state->argumentCount() < 1)) … … 404 411 405 412 #if ENABLE(TEST_FEATURE) 413 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Caller(JSC::ExecState*, JSTestGlobalObject*, JSC::ThrowScope&); 414 406 415 static inline EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2(ExecState* state) 407 416 { 408 VM& vm = state->vm(); 409 auto throwScope = DECLARE_THROW_SCOPE(vm); 410 UNUSED_PARAM(throwScope); 411 JSValue thisValue = state->thisValue(); 412 auto castedThis = jsDynamicCast<JSTestGlobalObject*>(thisValue); 413 if (UNLIKELY(!castedThis)) 414 return throwThisTypeError(*state, throwScope, "TestGlobalObject", "enabledAtRuntimeOperation"); 415 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info()); 417 return BindingCaller<JSTestGlobalObject>::callOperation<jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Caller>(state, "enabledAtRuntimeOperation"); 418 } 419 420 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Caller(JSC::ExecState* state, JSTestGlobalObject* castedThis, JSC::ThrowScope& throwScope) 421 { 422 UNUSED_PARAM(state); 423 UNUSED_PARAM(throwScope); 416 424 auto& impl = castedThis->wrapped(); 417 425 if (UNLIKELY(state->argumentCount() < 1)) … … 447 455 448 456 #if ENABLE(TEST_FEATURE) 457 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionTestPrivateFunctionCaller(JSC::ExecState*, JSTestGlobalObject*, JSC::ThrowScope&); 458 449 459 EncodedJSValue JSC_HOST_CALL jsTestGlobalObjectInstanceFunctionTestPrivateFunction(ExecState* state) 450 460 { 451 VM& vm = state->vm(); 452 auto throwScope = DECLARE_THROW_SCOPE(vm); 453 UNUSED_PARAM(throwScope); 454 JSValue thisValue = state->thisValue(); 455 auto castedThis = jsDynamicCast<JSTestGlobalObject*>(thisValue); 456 if (UNLIKELY(!castedThis)) 457 return throwThisTypeError(*state, throwScope, "TestGlobalObject", "testPrivateFunction"); 458 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestGlobalObject::info()); 461 return BindingCaller<JSTestGlobalObject>::callOperation<jsTestGlobalObjectInstanceFunctionTestPrivateFunctionCaller>(state, "testPrivateFunction"); 462 } 463 464 static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionTestPrivateFunctionCaller(JSC::ExecState* state, JSTestGlobalObject* castedThis, JSC::ThrowScope& throwScope) 465 { 466 UNUSED_PARAM(state); 467 UNUSED_PARAM(throwScope); 459 468 auto& impl = castedThis->wrapped(); 460 469 impl.testPrivateFunction(); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h
r206953 r207192 52 52 53 53 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 54 static JSTestGlobalObject* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);55 54 public: 56 55 static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r206992 r207192 411 411 } 412 412 413 inline JSTestInterface* JSTestInterface::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)413 template<> inline JSTestInterface* BindingCaller<JSTestInterface>::castForAttribute(ExecState&, EncodedJSValue thisValue) 414 414 { 415 415 return jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 416 } 417 418 template<> inline JSTestInterface* BindingCaller<JSTestInterface>::castForOperation(ExecState& state) 419 { 420 return jsDynamicCast<JSTestInterface*>(state.thisValue()); 416 421 } 417 422 … … 838 843 839 844 #if ENABLE(Condition22) || ENABLE(Condition23) 845 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionImplementsMethod1Caller(JSC::ExecState*, JSTestInterface*, JSC::ThrowScope&); 846 840 847 EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod1(ExecState* state) 841 848 { 842 VM& vm = state->vm(); 843 auto throwScope = DECLARE_THROW_SCOPE(vm); 844 UNUSED_PARAM(throwScope); 845 JSValue thisValue = state->thisValue(); 846 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 847 if (UNLIKELY(!castedThis)) 848 return throwThisTypeError(*state, throwScope, "TestInterface", "implementsMethod1"); 849 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); 849 return BindingCaller<JSTestInterface>::callOperation<jsTestInterfacePrototypeFunctionImplementsMethod1Caller>(state, "implementsMethod1"); 850 } 851 852 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionImplementsMethod1Caller(JSC::ExecState* state, JSTestInterface* castedThis, JSC::ThrowScope& throwScope) 853 { 854 UNUSED_PARAM(state); 855 UNUSED_PARAM(throwScope); 850 856 auto& impl = castedThis->wrapped(); 851 857 impl.implementsMethod1(); … … 856 862 857 863 #if ENABLE(Condition22) || ENABLE(Condition23) 864 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionImplementsMethod2Caller(JSC::ExecState*, JSTestInterface*, JSC::ThrowScope&); 865 858 866 EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod2(ExecState* state) 859 867 { 860 VM& vm = state->vm(); 861 auto throwScope = DECLARE_THROW_SCOPE(vm); 862 UNUSED_PARAM(throwScope); 863 JSValue thisValue = state->thisValue(); 864 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 865 if (UNLIKELY(!castedThis)) 866 return throwThisTypeError(*state, throwScope, "TestInterface", "implementsMethod2"); 867 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); 868 return BindingCaller<JSTestInterface>::callOperation<jsTestInterfacePrototypeFunctionImplementsMethod2Caller>(state, "implementsMethod2"); 869 } 870 871 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionImplementsMethod2Caller(JSC::ExecState* state, JSTestInterface* castedThis, JSC::ThrowScope& throwScope) 872 { 873 UNUSED_PARAM(state); 874 UNUSED_PARAM(throwScope); 868 875 auto& impl = castedThis->wrapped(); 869 876 if (UNLIKELY(state->argumentCount() < 2)) … … 887 894 888 895 #if ENABLE(Condition22) || ENABLE(Condition23) 896 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionImplementsMethod3Caller(JSC::ExecState*, JSTestInterface*, JSC::ThrowScope&); 897 889 898 EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod3(ExecState* state) 899 { 900 return BindingCaller<JSTestInterface>::callOperation<jsTestInterfacePrototypeFunctionImplementsMethod3Caller>(state, "implementsMethod3"); 901 } 902 903 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionImplementsMethod3Caller(JSC::ExecState* state, JSTestInterface* castedThis, JSC::ThrowScope& throwScope) 904 { 905 UNUSED_PARAM(state); 906 UNUSED_PARAM(throwScope); 907 return JSValue::encode(castedThis->implementsMethod3(*state)); 908 } 909 910 #endif 911 912 #if ENABLE(Condition22) || ENABLE(Condition23) 913 EncodedJSValue JSC_HOST_CALL jsTestInterfaceConstructorFunctionImplementsMethod4(ExecState* state) 890 914 { 891 915 VM& vm = state->vm(); 892 916 auto throwScope = DECLARE_THROW_SCOPE(vm); 893 917 UNUSED_PARAM(throwScope); 894 JSValue thisValue = state->thisValue();895 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue);896 if (UNLIKELY(!castedThis))897 return throwThisTypeError(*state, throwScope, "TestInterface", "implementsMethod3");898 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());899 return JSValue::encode(castedThis->implementsMethod3(*state));900 }901 902 #endif903 904 #if ENABLE(Condition22) || ENABLE(Condition23)905 EncodedJSValue JSC_HOST_CALL jsTestInterfaceConstructorFunctionImplementsMethod4(ExecState* state)906 {907 VM& vm = state->vm();908 auto throwScope = DECLARE_THROW_SCOPE(vm);909 UNUSED_PARAM(throwScope);910 918 TestInterface::implementsMethod4(); 911 919 return JSValue::encode(jsUndefined()); … … 915 923 916 924 #if ENABLE(Condition11) || ENABLE(Condition12) 925 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod1Caller(JSC::ExecState*, JSTestInterface*, JSC::ThrowScope&); 926 917 927 EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1(ExecState* state) 918 928 { 919 VM& vm = state->vm(); 920 auto throwScope = DECLARE_THROW_SCOPE(vm); 921 UNUSED_PARAM(throwScope); 922 JSValue thisValue = state->thisValue(); 923 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 924 if (UNLIKELY(!castedThis)) 925 return throwThisTypeError(*state, throwScope, "TestInterface", "supplementalMethod1"); 926 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); 929 return BindingCaller<JSTestInterface>::callOperation<jsTestInterfacePrototypeFunctionSupplementalMethod1Caller>(state, "supplementalMethod1"); 930 } 931 932 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod1Caller(JSC::ExecState* state, JSTestInterface* castedThis, JSC::ThrowScope& throwScope) 933 { 934 UNUSED_PARAM(state); 935 UNUSED_PARAM(throwScope); 927 936 auto& impl = castedThis->wrapped(); 928 937 WebCore::TestSupplemental::supplementalMethod1(impl); … … 933 942 934 943 #if ENABLE(Condition11) || ENABLE(Condition12) 944 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod2Caller(JSC::ExecState*, JSTestInterface*, JSC::ThrowScope&); 945 935 946 EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2(ExecState* state) 936 947 { 937 VM& vm = state->vm(); 938 auto throwScope = DECLARE_THROW_SCOPE(vm); 939 UNUSED_PARAM(throwScope); 940 JSValue thisValue = state->thisValue(); 941 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 942 if (UNLIKELY(!castedThis)) 943 return throwThisTypeError(*state, throwScope, "TestInterface", "supplementalMethod2"); 944 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); 948 return BindingCaller<JSTestInterface>::callOperation<jsTestInterfacePrototypeFunctionSupplementalMethod2Caller>(state, "supplementalMethod2"); 949 } 950 951 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod2Caller(JSC::ExecState* state, JSTestInterface* castedThis, JSC::ThrowScope& throwScope) 952 { 953 UNUSED_PARAM(state); 954 UNUSED_PARAM(throwScope); 945 955 auto& impl = castedThis->wrapped(); 946 956 if (UNLIKELY(state->argumentCount() < 2)) … … 964 974 965 975 #if ENABLE(Condition11) || ENABLE(Condition12) 976 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod3Caller(JSC::ExecState*, JSTestInterface*, JSC::ThrowScope&); 977 966 978 EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod3(ExecState* state) 967 979 { 968 VM& vm = state->vm(); 969 auto throwScope = DECLARE_THROW_SCOPE(vm); 970 UNUSED_PARAM(throwScope); 971 JSValue thisValue = state->thisValue(); 972 auto castedThis = jsDynamicCast<JSTestInterface*>(thisValue); 973 if (UNLIKELY(!castedThis)) 974 return throwThisTypeError(*state, throwScope, "TestInterface", "supplementalMethod3"); 975 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); 980 return BindingCaller<JSTestInterface>::callOperation<jsTestInterfacePrototypeFunctionSupplementalMethod3Caller>(state, "supplementalMethod3"); 981 } 982 983 static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod3Caller(JSC::ExecState* state, JSTestInterface* castedThis, JSC::ThrowScope& throwScope) 984 { 985 UNUSED_PARAM(state); 986 UNUSED_PARAM(throwScope); 976 987 return JSValue::encode(castedThis->supplementalMethod3(*state)); 977 988 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r206953 r207192 55 55 56 56 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 57 static JSTestInterface* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);58 57 59 58 // Custom attributes -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp
r206723 r207192 128 128 JSTestIterable* thisObject = static_cast<JSTestIterable*>(cell); 129 129 thisObject->JSTestIterable::~JSTestIterable(); 130 } 131 132 template<> inline JSTestIterable* BindingCaller<JSTestIterable>::castForOperation(ExecState& state) 133 { 134 return jsDynamicCast<JSTestIterable*>(state.thisValue()); 130 135 } 131 136 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
r206992 r207192 133 133 } 134 134 135 inline JSTestJSBuiltinConstructor* JSTestJSBuiltinConstructor::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)135 template<> inline JSTestJSBuiltinConstructor* BindingCaller<JSTestJSBuiltinConstructor>::castForAttribute(ExecState&, EncodedJSValue thisValue) 136 136 { 137 137 return jsDynamicCast<JSTestJSBuiltinConstructor*>(JSValue::decode(thisValue)); 138 } 139 140 template<> inline JSTestJSBuiltinConstructor* BindingCaller<JSTestJSBuiltinConstructor>::castForOperation(ExecState& state) 141 { 142 return jsDynamicCast<JSTestJSBuiltinConstructor*>(state.thisValue()); 138 143 } 139 144 … … 211 216 } 212 217 218 static inline JSC::EncodedJSValue jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunctionCaller(JSC::ExecState*, JSTestJSBuiltinConstructor*, JSC::ThrowScope&); 219 213 220 EncodedJSValue JSC_HOST_CALL jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction(ExecState* state) 214 221 { 215 VM& vm = state->vm(); 216 auto throwScope = DECLARE_THROW_SCOPE(vm); 217 UNUSED_PARAM(throwScope); 218 JSValue thisValue = state->thisValue(); 219 auto castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(thisValue); 220 if (UNLIKELY(!castedThis)) 221 return throwThisTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testCustomFunction"); 222 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestJSBuiltinConstructor::info()); 222 return BindingCaller<JSTestJSBuiltinConstructor>::callOperation<jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunctionCaller>(state, "testCustomFunction"); 223 } 224 225 static inline JSC::EncodedJSValue jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunctionCaller(JSC::ExecState* state, JSTestJSBuiltinConstructor* castedThis, JSC::ThrowScope& throwScope) 226 { 227 UNUSED_PARAM(state); 228 UNUSED_PARAM(throwScope); 223 229 return JSValue::encode(castedThis->testCustomFunction(*state)); 224 230 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
r206953 r207192 47 47 48 48 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 49 static JSTestJSBuiltinConstructor* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);50 49 static void visitChildren(JSCell*, JSC::SlotVisitor&); 51 50 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r206723 r207192 124 124 } 125 125 126 template<> inline JSTestMediaQueryListListener* BindingCaller<JSTestMediaQueryListListener>::castForOperation(ExecState& state) 127 { 128 return jsDynamicCast<JSTestMediaQueryListListener*>(state.thisValue()); 129 } 130 126 131 EncodedJSValue jsTestMediaQueryListListenerConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) 127 132 { … … 153 158 } 154 159 160 static inline JSC::EncodedJSValue jsTestMediaQueryListListenerPrototypeFunctionMethodCaller(JSC::ExecState*, JSTestMediaQueryListListener*, JSC::ThrowScope&); 161 155 162 EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod(ExecState* state) 156 163 { 157 VM& vm = state->vm(); 158 auto throwScope = DECLARE_THROW_SCOPE(vm); 164 return BindingCaller<JSTestMediaQueryListListener>::callOperation<jsTestMediaQueryListListenerPrototypeFunctionMethodCaller>(state, "method"); 165 } 166 167 static inline JSC::EncodedJSValue jsTestMediaQueryListListenerPrototypeFunctionMethodCaller(JSC::ExecState* state, JSTestMediaQueryListListener* castedThis, JSC::ThrowScope& throwScope) 168 { 169 UNUSED_PARAM(state); 159 170 UNUSED_PARAM(throwScope); 160 JSValue thisValue = state->thisValue();161 auto castedThis = jsDynamicCast<JSTestMediaQueryListListener*>(thisValue);162 if (UNLIKELY(!castedThis))163 return throwThisTypeError(*state, throwScope, "TestMediaQueryListListener", "method");164 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestMediaQueryListListener::info());165 171 auto& impl = castedThis->wrapped(); 166 172 if (UNLIKELY(state->argumentCount() < 1)) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r206992 r207192 168 168 } 169 169 170 inline JSTestNode* JSTestNode::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)170 template<> inline JSTestNode* BindingCaller<JSTestNode>::castForAttribute(ExecState&, EncodedJSValue thisValue) 171 171 { 172 172 return jsDynamicCast<JSTestNode*>(JSValue::decode(thisValue)); 173 } 174 175 template<> inline JSTestNode* BindingCaller<JSTestNode>::castForOperation(ExecState& state) 176 { 177 return jsDynamicCast<JSTestNode*>(state.thisValue()); 173 178 } 174 179 … … 237 242 } 238 243 244 static inline JSC::EncodedJSValue jsTestNodePrototypeFunctionTestWorkerPromiseCaller(JSC::ExecState*, JSTestNode*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 245 239 246 static EncodedJSValue jsTestNodePrototypeFunctionTestWorkerPromisePromise(ExecState*, Ref<DeferredPromise>&&); 240 247 … … 247 254 static inline EncodedJSValue jsTestNodePrototypeFunctionTestWorkerPromisePromise(ExecState* state, Ref<DeferredPromise>&& promise) 248 255 { 249 VM& vm = state->vm(); 250 auto throwScope = DECLARE_THROW_SCOPE(vm); 256 return BindingCaller<JSTestNode>::callPromiseOperation<jsTestNodePrototypeFunctionTestWorkerPromiseCaller>(state, WTFMove(promise), "testWorkerPromise"); 257 } 258 259 static inline JSC::EncodedJSValue jsTestNodePrototypeFunctionTestWorkerPromiseCaller(JSC::ExecState* state, JSTestNode* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 260 { 261 UNUSED_PARAM(state); 251 262 UNUSED_PARAM(throwScope); 252 JSValue thisValue = state->thisValue();253 auto castedThis = jsDynamicCast<JSTestNode*>(thisValue);254 if (UNLIKELY(!castedThis))255 return throwThisTypeError(*state, throwScope, "TestNode", "testWorkerPromise");256 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestNode::info());257 263 auto& impl = castedThis->wrapped(); 258 264 impl.testWorkerPromise(WTFMove(promise)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
r206953 r207192 48 48 49 49 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 50 static JSTestNode* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);51 50 static void visitChildren(JSCell*, JSC::SlotVisitor&); 52 51 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
r206992 r207192 144 144 } 145 145 146 inline JSTestNondeterministic* JSTestNondeterministic::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)146 template<> inline JSTestNondeterministic* BindingCaller<JSTestNondeterministic>::castForAttribute(ExecState&, EncodedJSValue thisValue) 147 147 { 148 148 return jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue)); 149 } 150 151 template<> inline JSTestNondeterministic* BindingCaller<JSTestNondeterministic>::castForOperation(ExecState& state) 152 { 153 return jsDynamicCast<JSTestNondeterministic*>(state.thisValue()); 149 154 } 150 155 … … 440 445 } 441 446 447 static inline JSC::EncodedJSValue jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunctionCaller(JSC::ExecState*, JSTestNondeterministic*, JSC::ThrowScope&); 448 442 449 EncodedJSValue JSC_HOST_CALL jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction(ExecState* state) 443 450 { 444 VM& vm = state->vm(); 445 auto throwScope = DECLARE_THROW_SCOPE(vm); 446 UNUSED_PARAM(throwScope); 447 JSValue thisValue = state->thisValue(); 448 auto castedThis = jsDynamicCast<JSTestNondeterministic*>(thisValue); 449 if (UNLIKELY(!castedThis)) 450 return throwThisTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicZeroArgFunction"); 451 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestNondeterministic::info()); 451 return BindingCaller<JSTestNondeterministic>::callOperation<jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunctionCaller>(state, "nondeterministicZeroArgFunction"); 452 } 453 454 static inline JSC::EncodedJSValue jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunctionCaller(JSC::ExecState* state, JSTestNondeterministic* castedThis, JSC::ThrowScope& throwScope) 455 { 456 UNUSED_PARAM(state); 457 UNUSED_PARAM(throwScope); 452 458 auto& impl = castedThis->wrapped(); 453 459 JSValue result; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
r206953 r207192 50 50 51 51 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 52 static JSTestNondeterministic* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);53 52 protected: 54 53 JSTestNondeterministic(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNondeterministic>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r207170 r207192 1698 1698 } 1699 1699 1700 inline JSTestObj* JSTestObj::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)1700 template<> inline JSTestObj* BindingCaller<JSTestObj>::castForAttribute(ExecState&, EncodedJSValue thisValue) 1701 1701 { 1702 1702 return jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1703 } 1704 1705 template<> inline JSTestObj* BindingCaller<JSTestObj>::castForOperation(ExecState& state) 1706 { 1707 return jsDynamicCast<JSTestObj*>(state.thisValue()); 1703 1708 } 1704 1709 … … 4671 4676 4672 4677 #if ENABLE(TEST_FEATURE) 4678 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4679 4673 4680 static inline EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1(ExecState* state) 4674 4681 { 4675 VM& vm = state->vm(); 4676 auto throwScope = DECLARE_THROW_SCOPE(vm); 4677 UNUSED_PARAM(throwScope); 4678 JSValue thisValue = state->thisValue(); 4679 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4680 if (UNLIKELY(!castedThis)) 4681 return throwThisTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeOperation"); 4682 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4682 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Caller>(state, "enabledAtRuntimeOperation"); 4683 } 4684 4685 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4686 { 4687 UNUSED_PARAM(state); 4688 UNUSED_PARAM(throwScope); 4683 4689 auto& impl = castedThis->wrapped(); 4684 4690 if (UNLIKELY(state->argumentCount() < 1)) … … 4693 4699 4694 4700 #if ENABLE(TEST_FEATURE) 4701 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4702 4695 4703 static inline EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2(ExecState* state) 4696 4704 { 4697 VM& vm = state->vm(); 4698 auto throwScope = DECLARE_THROW_SCOPE(vm); 4699 UNUSED_PARAM(throwScope); 4700 JSValue thisValue = state->thisValue(); 4701 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4702 if (UNLIKELY(!castedThis)) 4703 return throwThisTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeOperation"); 4704 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4705 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Caller>(state, "enabledAtRuntimeOperation"); 4706 } 4707 4708 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4709 { 4710 UNUSED_PARAM(state); 4711 UNUSED_PARAM(throwScope); 4705 4712 auto& impl = castedThis->wrapped(); 4706 4713 if (UNLIKELY(state->argumentCount() < 1)) … … 4735 4742 #endif 4736 4743 4744 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVoidMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4745 4737 4746 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* state) 4738 4747 { 4739 VM& vm = state->vm(); 4740 auto throwScope = DECLARE_THROW_SCOPE(vm); 4741 UNUSED_PARAM(throwScope); 4742 JSValue thisValue = state->thisValue(); 4743 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4744 if (UNLIKELY(!castedThis)) 4745 return throwThisTypeError(*state, throwScope, "TestObject", "voidMethod"); 4746 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4748 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionVoidMethodCaller>(state, "voidMethod"); 4749 } 4750 4751 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVoidMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4752 { 4753 UNUSED_PARAM(state); 4754 UNUSED_PARAM(throwScope); 4747 4755 auto& impl = castedThis->wrapped(); 4748 4756 impl.voidMethod(); … … 4750 4758 } 4751 4759 4760 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVoidMethodWithArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4761 4752 4762 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* state) 4753 4763 { 4754 VM& vm = state->vm(); 4755 auto throwScope = DECLARE_THROW_SCOPE(vm); 4756 UNUSED_PARAM(throwScope); 4757 JSValue thisValue = state->thisValue(); 4758 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4759 if (UNLIKELY(!castedThis)) 4760 return throwThisTypeError(*state, throwScope, "TestObject", "voidMethodWithArgs"); 4761 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4764 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionVoidMethodWithArgsCaller>(state, "voidMethodWithArgs"); 4765 } 4766 4767 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVoidMethodWithArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4768 { 4769 UNUSED_PARAM(state); 4770 UNUSED_PARAM(throwScope); 4762 4771 auto& impl = castedThis->wrapped(); 4763 4772 if (UNLIKELY(state->argumentCount() < 3)) … … 4774 4783 } 4775 4784 4785 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionByteMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4786 4776 4787 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* state) 4777 4788 { 4778 VM& vm = state->vm(); 4779 auto throwScope = DECLARE_THROW_SCOPE(vm); 4780 UNUSED_PARAM(throwScope); 4781 JSValue thisValue = state->thisValue(); 4782 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4783 if (UNLIKELY(!castedThis)) 4784 return throwThisTypeError(*state, throwScope, "TestObject", "byteMethod"); 4785 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4789 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionByteMethodCaller>(state, "byteMethod"); 4790 } 4791 4792 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionByteMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4793 { 4794 UNUSED_PARAM(state); 4795 UNUSED_PARAM(throwScope); 4786 4796 auto& impl = castedThis->wrapped(); 4787 4797 JSValue result = jsNumber(impl.byteMethod()); … … 4789 4799 } 4790 4800 4801 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionByteMethodWithArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4802 4791 4803 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecState* state) 4792 4804 { 4793 VM& vm = state->vm(); 4794 auto throwScope = DECLARE_THROW_SCOPE(vm); 4795 UNUSED_PARAM(throwScope); 4796 JSValue thisValue = state->thisValue(); 4797 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4798 if (UNLIKELY(!castedThis)) 4799 return throwThisTypeError(*state, throwScope, "TestObject", "byteMethodWithArgs"); 4800 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4805 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionByteMethodWithArgsCaller>(state, "byteMethodWithArgs"); 4806 } 4807 4808 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionByteMethodWithArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4809 { 4810 UNUSED_PARAM(state); 4811 UNUSED_PARAM(throwScope); 4801 4812 auto& impl = castedThis->wrapped(); 4802 4813 if (UNLIKELY(state->argumentCount() < 3)) … … 4813 4824 } 4814 4825 4826 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOctetMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4827 4815 4828 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* state) 4816 4829 { 4817 VM& vm = state->vm(); 4818 auto throwScope = DECLARE_THROW_SCOPE(vm); 4819 UNUSED_PARAM(throwScope); 4820 JSValue thisValue = state->thisValue(); 4821 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4822 if (UNLIKELY(!castedThis)) 4823 return throwThisTypeError(*state, throwScope, "TestObject", "octetMethod"); 4824 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4830 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOctetMethodCaller>(state, "octetMethod"); 4831 } 4832 4833 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOctetMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4834 { 4835 UNUSED_PARAM(state); 4836 UNUSED_PARAM(throwScope); 4825 4837 auto& impl = castedThis->wrapped(); 4826 4838 JSValue result = jsNumber(impl.octetMethod()); … … 4828 4840 } 4829 4841 4842 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOctetMethodWithArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4843 4830 4844 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecState* state) 4831 4845 { 4832 VM& vm = state->vm(); 4833 auto throwScope = DECLARE_THROW_SCOPE(vm); 4834 UNUSED_PARAM(throwScope); 4835 JSValue thisValue = state->thisValue(); 4836 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4837 if (UNLIKELY(!castedThis)) 4838 return throwThisTypeError(*state, throwScope, "TestObject", "octetMethodWithArgs"); 4839 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4846 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOctetMethodWithArgsCaller>(state, "octetMethodWithArgs"); 4847 } 4848 4849 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOctetMethodWithArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4850 { 4851 UNUSED_PARAM(state); 4852 UNUSED_PARAM(throwScope); 4840 4853 auto& impl = castedThis->wrapped(); 4841 4854 if (UNLIKELY(state->argumentCount() < 3)) … … 4852 4865 } 4853 4866 4867 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionLongMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4868 4854 4869 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* state) 4855 4870 { 4856 VM& vm = state->vm(); 4857 auto throwScope = DECLARE_THROW_SCOPE(vm); 4858 UNUSED_PARAM(throwScope); 4859 JSValue thisValue = state->thisValue(); 4860 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4861 if (UNLIKELY(!castedThis)) 4862 return throwThisTypeError(*state, throwScope, "TestObject", "longMethod"); 4863 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4871 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionLongMethodCaller>(state, "longMethod"); 4872 } 4873 4874 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionLongMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4875 { 4876 UNUSED_PARAM(state); 4877 UNUSED_PARAM(throwScope); 4864 4878 auto& impl = castedThis->wrapped(); 4865 4879 JSValue result = jsNumber(impl.longMethod()); … … 4867 4881 } 4868 4882 4883 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionLongMethodWithArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4884 4869 4885 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecState* state) 4870 4886 { 4871 VM& vm = state->vm(); 4872 auto throwScope = DECLARE_THROW_SCOPE(vm); 4873 UNUSED_PARAM(throwScope); 4874 JSValue thisValue = state->thisValue(); 4875 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4876 if (UNLIKELY(!castedThis)) 4877 return throwThisTypeError(*state, throwScope, "TestObject", "longMethodWithArgs"); 4878 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4887 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionLongMethodWithArgsCaller>(state, "longMethodWithArgs"); 4888 } 4889 4890 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionLongMethodWithArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4891 { 4892 UNUSED_PARAM(state); 4893 UNUSED_PARAM(throwScope); 4879 4894 auto& impl = castedThis->wrapped(); 4880 4895 if (UNLIKELY(state->argumentCount() < 3)) … … 4891 4906 } 4892 4907 4908 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionObjMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4909 4893 4910 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* state) 4894 4911 { 4895 VM& vm = state->vm(); 4896 auto throwScope = DECLARE_THROW_SCOPE(vm); 4897 UNUSED_PARAM(throwScope); 4898 JSValue thisValue = state->thisValue(); 4899 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4900 if (UNLIKELY(!castedThis)) 4901 return throwThisTypeError(*state, throwScope, "TestObject", "objMethod"); 4902 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4912 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionObjMethodCaller>(state, "objMethod"); 4913 } 4914 4915 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionObjMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4916 { 4917 UNUSED_PARAM(state); 4918 UNUSED_PARAM(throwScope); 4903 4919 auto& impl = castedThis->wrapped(); 4904 4920 JSValue result = toJS(state, castedThis->globalObject(), impl.objMethod()); … … 4906 4922 } 4907 4923 4924 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionObjMethodWithArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4925 4908 4926 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* state) 4909 4927 { 4910 VM& vm = state->vm(); 4911 auto throwScope = DECLARE_THROW_SCOPE(vm); 4912 UNUSED_PARAM(throwScope); 4913 JSValue thisValue = state->thisValue(); 4914 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4915 if (UNLIKELY(!castedThis)) 4916 return throwThisTypeError(*state, throwScope, "TestObject", "objMethodWithArgs"); 4917 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4928 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionObjMethodWithArgsCaller>(state, "objMethodWithArgs"); 4929 } 4930 4931 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionObjMethodWithArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4932 { 4933 UNUSED_PARAM(state); 4934 UNUSED_PARAM(throwScope); 4918 4935 auto& impl = castedThis->wrapped(); 4919 4936 if (UNLIKELY(state->argumentCount() < 3)) … … 4930 4947 } 4931 4948 4949 static inline JSC::EncodedJSValue jsTestObjInstanceFunctionUnforgeableMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4950 4932 4951 EncodedJSValue JSC_HOST_CALL jsTestObjInstanceFunctionUnforgeableMethod(ExecState* state) 4933 4952 { 4934 VM& vm = state->vm(); 4935 auto throwScope = DECLARE_THROW_SCOPE(vm); 4936 UNUSED_PARAM(throwScope); 4937 JSValue thisValue = state->thisValue(); 4938 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4939 if (UNLIKELY(!castedThis)) 4940 return throwThisTypeError(*state, throwScope, "TestObject", "unforgeableMethod"); 4941 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4953 return BindingCaller<JSTestObj>::callOperation<jsTestObjInstanceFunctionUnforgeableMethodCaller>(state, "unforgeableMethod"); 4954 } 4955 4956 static inline JSC::EncodedJSValue jsTestObjInstanceFunctionUnforgeableMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4957 { 4958 UNUSED_PARAM(state); 4959 UNUSED_PARAM(throwScope); 4942 4960 auto& impl = castedThis->wrapped(); 4943 4961 JSValue result = jsNumber(impl.unforgeableMethod()); … … 4945 4963 } 4946 4964 4965 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4966 4947 4967 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString(ExecState* state) 4948 4968 { 4949 VM& vm = state->vm(); 4950 auto throwScope = DECLARE_THROW_SCOPE(vm); 4951 UNUSED_PARAM(throwScope); 4952 JSValue thisValue = state->thisValue(); 4953 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4954 if (UNLIKELY(!castedThis)) 4955 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithArgTreatingNullAsEmptyString"); 4956 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4969 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringCaller>(state, "methodWithArgTreatingNullAsEmptyString"); 4970 } 4971 4972 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4973 { 4974 UNUSED_PARAM(state); 4975 UNUSED_PARAM(throwScope); 4957 4976 auto& impl = castedThis->wrapped(); 4958 4977 if (UNLIKELY(state->argumentCount() < 1)) … … 4964 4983 } 4965 4984 4985 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 4986 4966 4987 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter(ExecState* state) 4967 4988 { 4968 VM& vm = state->vm(); 4969 auto throwScope = DECLARE_THROW_SCOPE(vm); 4970 UNUSED_PARAM(throwScope); 4971 JSValue thisValue = state->thisValue(); 4972 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4973 if (UNLIKELY(!castedThis)) 4974 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithXPathNSResolverParameter"); 4975 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4989 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterCaller>(state, "methodWithXPathNSResolverParameter"); 4990 } 4991 4992 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 4993 { 4994 UNUSED_PARAM(state); 4995 UNUSED_PARAM(throwScope); 4976 4996 auto& impl = castedThis->wrapped(); 4977 4997 if (UNLIKELY(state->argumentCount() < 1)) … … 4985 5005 } 4986 5006 5007 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionNullableStringMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5008 4987 5009 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(ExecState* state) 5010 { 5011 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionNullableStringMethodCaller>(state, "nullableStringMethod"); 5012 } 5013 5014 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionNullableStringMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5015 { 5016 UNUSED_PARAM(state); 5017 UNUSED_PARAM(throwScope); 5018 auto& impl = castedThis->wrapped(); 5019 JSValue result = jsStringOrNull(state, impl.nullableStringMethod()); 5020 return JSValue::encode(result); 5021 } 5022 5023 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(ExecState* state) 4988 5024 { 4989 5025 VM& vm = state->vm(); 4990 5026 auto throwScope = DECLARE_THROW_SCOPE(vm); 4991 5027 UNUSED_PARAM(throwScope); 4992 JSValue thisValue = state->thisValue();4993 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);4994 if (UNLIKELY(!castedThis))4995 return throwThisTypeError(*state, throwScope, "TestObject", "nullableStringMethod");4996 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());4997 auto& impl = castedThis->wrapped();4998 JSValue result = jsStringOrNull(state, impl.nullableStringMethod());4999 return JSValue::encode(result);5000 }5001 5002 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(ExecState* state)5003 {5004 VM& vm = state->vm();5005 auto throwScope = DECLARE_THROW_SCOPE(vm);5006 UNUSED_PARAM(throwScope);5007 5028 JSValue result = jsStringOrNull(state, TestObj::nullableStringStaticMethod()); 5008 5029 return JSValue::encode(result); 5009 5030 } 5010 5031 5032 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionNullableStringSpecialMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5033 5011 5034 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(ExecState* state) 5012 5035 { 5013 VM& vm = state->vm(); 5014 auto throwScope = DECLARE_THROW_SCOPE(vm); 5015 UNUSED_PARAM(throwScope); 5016 JSValue thisValue = state->thisValue(); 5017 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5018 if (UNLIKELY(!castedThis)) 5019 return throwThisTypeError(*state, throwScope, "TestObject", "nullableStringSpecialMethod"); 5020 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5036 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionNullableStringSpecialMethodCaller>(state, "nullableStringSpecialMethod"); 5037 } 5038 5039 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionNullableStringSpecialMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5040 { 5041 UNUSED_PARAM(state); 5042 UNUSED_PARAM(throwScope); 5021 5043 auto& impl = castedThis->wrapped(); 5022 5044 if (UNLIKELY(state->argumentCount() < 1)) … … 5028 5050 } 5029 5051 5052 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithEnumArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5053 5030 5054 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecState* state) 5031 5055 { 5032 VM& vm = state->vm(); 5033 auto throwScope = DECLARE_THROW_SCOPE(vm); 5034 UNUSED_PARAM(throwScope); 5035 JSValue thisValue = state->thisValue(); 5036 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5037 if (UNLIKELY(!castedThis)) 5038 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithEnumArg"); 5039 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5056 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithEnumArgCaller>(state, "methodWithEnumArg"); 5057 } 5058 5059 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithEnumArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5060 { 5061 UNUSED_PARAM(state); 5062 UNUSED_PARAM(throwScope); 5040 5063 auto& impl = castedThis->wrapped(); 5041 5064 if (UNLIKELY(state->argumentCount() < 1)) … … 5052 5075 } 5053 5076 5077 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalEnumArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5078 5054 5079 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArg(ExecState* state) 5055 5080 { 5056 VM& vm = state->vm(); 5057 auto throwScope = DECLARE_THROW_SCOPE(vm); 5058 UNUSED_PARAM(throwScope); 5059 JSValue thisValue = state->thisValue(); 5060 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5061 if (UNLIKELY(!castedThis)) 5062 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalEnumArg"); 5063 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5081 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalEnumArgCaller>(state, "methodWithOptionalEnumArg"); 5082 } 5083 5084 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalEnumArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5085 { 5086 UNUSED_PARAM(state); 5087 UNUSED_PARAM(throwScope); 5064 5088 auto& impl = castedThis->wrapped(); 5065 5089 auto enumArgValue = state->argument(0); … … 5075 5099 } 5076 5100 5101 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5102 5077 5103 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue(ExecState* state) 5078 5104 { 5079 VM& vm = state->vm(); 5080 auto throwScope = DECLARE_THROW_SCOPE(vm); 5081 UNUSED_PARAM(throwScope); 5082 JSValue thisValue = state->thisValue(); 5083 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5084 if (UNLIKELY(!castedThis)) 5085 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalEnumArgAndDefaultValue"); 5086 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5105 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueCaller>(state, "methodWithOptionalEnumArgAndDefaultValue"); 5106 } 5107 5108 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5109 { 5110 UNUSED_PARAM(state); 5111 UNUSED_PARAM(throwScope); 5087 5112 auto& impl = castedThis->wrapped(); 5088 5113 auto enumArgValue = state->argument(0); … … 5101 5126 } 5102 5127 5128 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5129 5103 5130 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* state) 5104 5131 { 5105 VM& vm = state->vm(); 5106 auto throwScope = DECLARE_THROW_SCOPE(vm); 5107 UNUSED_PARAM(throwScope); 5108 JSValue thisValue = state->thisValue(); 5109 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5110 if (UNLIKELY(!castedThis)) 5111 return throwThisTypeError(*state, throwScope, "TestObject", "methodThatRequiresAllArgsAndThrows"); 5112 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5132 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsCaller>(state, "methodThatRequiresAllArgsAndThrows"); 5133 } 5134 5135 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5136 { 5137 UNUSED_PARAM(state); 5138 UNUSED_PARAM(throwScope); 5113 5139 auto& impl = castedThis->wrapped(); 5114 5140 if (UNLIKELY(state->argumentCount() < 2)) … … 5126 5152 } 5127 5153 5154 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUSVStringArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5155 5128 5156 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUSVStringArg(ExecState* state) 5129 5157 { 5130 VM& vm = state->vm(); 5131 auto throwScope = DECLARE_THROW_SCOPE(vm); 5132 UNUSED_PARAM(throwScope); 5133 JSValue thisValue = state->thisValue(); 5134 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5135 if (UNLIKELY(!castedThis)) 5136 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithUSVStringArg"); 5137 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5158 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithUSVStringArgCaller>(state, "methodWithUSVStringArg"); 5159 } 5160 5161 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUSVStringArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5162 { 5163 UNUSED_PARAM(state); 5164 UNUSED_PARAM(throwScope); 5138 5165 auto& impl = castedThis->wrapped(); 5139 5166 if (UNLIKELY(state->argumentCount() < 1)) … … 5145 5172 } 5146 5173 5174 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5175 5147 5176 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg(ExecState* state) 5148 5177 { 5149 VM& vm = state->vm(); 5150 auto throwScope = DECLARE_THROW_SCOPE(vm); 5151 UNUSED_PARAM(throwScope); 5152 JSValue thisValue = state->thisValue(); 5153 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5154 if (UNLIKELY(!castedThis)) 5155 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithNullableUSVStringArg"); 5156 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5178 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgCaller>(state, "methodWithNullableUSVStringArg"); 5179 } 5180 5181 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5182 { 5183 UNUSED_PARAM(state); 5184 UNUSED_PARAM(throwScope); 5157 5185 auto& impl = castedThis->wrapped(); 5158 5186 if (UNLIKELY(state->argumentCount() < 1)) … … 5164 5192 } 5165 5193 5194 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5195 5166 5196 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString(ExecState* state) 5167 5197 { 5168 VM& vm = state->vm(); 5169 auto throwScope = DECLARE_THROW_SCOPE(vm); 5170 UNUSED_PARAM(throwScope); 5171 JSValue thisValue = state->thisValue(); 5172 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5173 if (UNLIKELY(!castedThis)) 5174 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithUSVStringArgTreatingNullAsEmptyString"); 5175 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5198 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringCaller>(state, "methodWithUSVStringArgTreatingNullAsEmptyString"); 5199 } 5200 5201 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5202 { 5203 UNUSED_PARAM(state); 5204 UNUSED_PARAM(throwScope); 5176 5205 auto& impl = castedThis->wrapped(); 5177 5206 if (UNLIKELY(state->argumentCount() < 1)) … … 5183 5212 } 5184 5213 5214 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionSerializedValueCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5215 5185 5216 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* state) 5186 5217 { 5187 VM& vm = state->vm(); 5188 auto throwScope = DECLARE_THROW_SCOPE(vm); 5189 UNUSED_PARAM(throwScope); 5190 JSValue thisValue = state->thisValue(); 5191 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5192 if (UNLIKELY(!castedThis)) 5193 return throwThisTypeError(*state, throwScope, "TestObject", "serializedValue"); 5194 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5218 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionSerializedValueCaller>(state, "serializedValue"); 5219 } 5220 5221 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionSerializedValueCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5222 { 5223 UNUSED_PARAM(state); 5224 UNUSED_PARAM(throwScope); 5195 5225 auto& impl = castedThis->wrapped(); 5196 5226 if (UNLIKELY(state->argumentCount() < 1)) … … 5202 5232 } 5203 5233 5234 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOptionsObjectCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5235 5204 5236 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* state) 5205 5237 { 5206 VM& vm = state->vm(); 5207 auto throwScope = DECLARE_THROW_SCOPE(vm); 5208 UNUSED_PARAM(throwScope); 5209 JSValue thisValue = state->thisValue(); 5210 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5211 if (UNLIKELY(!castedThis)) 5212 return throwThisTypeError(*state, throwScope, "TestObject", "optionsObject"); 5213 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5238 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOptionsObjectCaller>(state, "optionsObject"); 5239 } 5240 5241 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOptionsObjectCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5242 { 5243 UNUSED_PARAM(state); 5244 UNUSED_PARAM(throwScope); 5214 5245 auto& impl = castedThis->wrapped(); 5215 5246 if (UNLIKELY(state->argumentCount() < 1)) … … 5221 5252 } 5222 5253 5254 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithExceptionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5255 5223 5256 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* state) 5224 5257 { 5225 VM& vm = state->vm(); 5226 auto throwScope = DECLARE_THROW_SCOPE(vm); 5227 UNUSED_PARAM(throwScope); 5228 JSValue thisValue = state->thisValue(); 5229 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5230 if (UNLIKELY(!castedThis)) 5231 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithException"); 5232 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5258 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithExceptionCaller>(state, "methodWithException"); 5259 } 5260 5261 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithExceptionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5262 { 5263 UNUSED_PARAM(state); 5264 UNUSED_PARAM(throwScope); 5233 5265 auto& impl = castedThis->wrapped(); 5234 5266 propagateException(*state, throwScope, impl.methodWithException()); … … 5236 5268 } 5237 5269 5270 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithExceptionReturningLongCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5271 5238 5272 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionReturningLong(ExecState* state) 5239 5273 { 5240 VM& vm = state->vm(); 5241 auto throwScope = DECLARE_THROW_SCOPE(vm); 5242 UNUSED_PARAM(throwScope); 5243 JSValue thisValue = state->thisValue(); 5244 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5245 if (UNLIKELY(!castedThis)) 5246 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithExceptionReturningLong"); 5247 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5274 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithExceptionReturningLongCaller>(state, "methodWithExceptionReturningLong"); 5275 } 5276 5277 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithExceptionReturningLongCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5278 { 5279 UNUSED_PARAM(state); 5280 UNUSED_PARAM(throwScope); 5248 5281 auto& impl = castedThis->wrapped(); 5249 5282 JSValue result = toJSNumber(*state, throwScope, impl.methodWithExceptionReturningLong()); … … 5251 5284 } 5252 5285 5286 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5287 5253 5288 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionReturningObject(ExecState* state) 5254 5289 { 5255 VM& vm = state->vm(); 5256 auto throwScope = DECLARE_THROW_SCOPE(vm); 5257 UNUSED_PARAM(throwScope); 5258 JSValue thisValue = state->thisValue(); 5259 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5260 if (UNLIKELY(!castedThis)) 5261 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithExceptionReturningObject"); 5262 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5290 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectCaller>(state, "methodWithExceptionReturningObject"); 5291 } 5292 5293 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5294 { 5295 UNUSED_PARAM(state); 5296 UNUSED_PARAM(throwScope); 5263 5297 auto& impl = castedThis->wrapped(); 5264 5298 JSValue result = toJS(*state, *castedThis->globalObject(), throwScope, impl.methodWithExceptionReturningObject()); … … 5266 5300 } 5267 5301 5302 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithLegacyExceptionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5303 5268 5304 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithLegacyException(ExecState* state) 5269 5305 { 5270 VM& vm = state->vm(); 5271 auto throwScope = DECLARE_THROW_SCOPE(vm); 5272 UNUSED_PARAM(throwScope); 5273 JSValue thisValue = state->thisValue(); 5274 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5275 if (UNLIKELY(!castedThis)) 5276 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithLegacyException"); 5277 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5306 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithLegacyExceptionCaller>(state, "methodWithLegacyException"); 5307 } 5308 5309 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithLegacyExceptionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5310 { 5311 UNUSED_PARAM(state); 5312 UNUSED_PARAM(throwScope); 5278 5313 auto& impl = castedThis->wrapped(); 5279 5314 ExceptionCode ec = 0; … … 5283 5318 } 5284 5319 5320 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionCustomMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5321 5285 5322 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* state) 5286 5323 { 5287 VM& vm = state->vm(); 5288 auto throwScope = DECLARE_THROW_SCOPE(vm); 5289 UNUSED_PARAM(throwScope); 5290 JSValue thisValue = state->thisValue(); 5291 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5292 if (UNLIKELY(!castedThis)) 5293 return throwThisTypeError(*state, throwScope, "TestObject", "customMethod"); 5294 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5324 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionCustomMethodCaller>(state, "customMethod"); 5325 } 5326 5327 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionCustomMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5328 { 5329 UNUSED_PARAM(state); 5330 UNUSED_PARAM(throwScope); 5295 5331 return JSValue::encode(castedThis->customMethod(*state)); 5296 5332 } 5297 5333 5334 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionCustomMethodWithArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5335 5298 5336 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* state) 5299 5337 { 5300 VM& vm = state->vm(); 5301 auto throwScope = DECLARE_THROW_SCOPE(vm); 5302 UNUSED_PARAM(throwScope); 5303 JSValue thisValue = state->thisValue(); 5304 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5305 if (UNLIKELY(!castedThis)) 5306 return throwThisTypeError(*state, throwScope, "TestObject", "customMethodWithArgs"); 5307 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5338 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionCustomMethodWithArgsCaller>(state, "customMethodWithArgs"); 5339 } 5340 5341 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionCustomMethodWithArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5342 { 5343 UNUSED_PARAM(state); 5344 UNUSED_PARAM(throwScope); 5308 5345 return JSValue::encode(castedThis->customMethodWithArgs(*state)); 5309 5346 } 5310 5347 5348 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionPrivateMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5349 5311 5350 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPrivateMethod(ExecState* state) 5312 5351 { 5313 VM& vm = state->vm(); 5314 auto throwScope = DECLARE_THROW_SCOPE(vm); 5315 UNUSED_PARAM(throwScope); 5316 JSValue thisValue = state->thisValue(); 5317 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5318 if (UNLIKELY(!castedThis)) 5319 return throwThisTypeError(*state, throwScope, "TestObject", "privateMethod"); 5320 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5352 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionPrivateMethodCaller>(state, "privateMethod"); 5353 } 5354 5355 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionPrivateMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5356 { 5357 UNUSED_PARAM(state); 5358 UNUSED_PARAM(throwScope); 5321 5359 auto& impl = castedThis->wrapped(); 5322 5360 if (UNLIKELY(state->argumentCount() < 1)) … … 5328 5366 } 5329 5367 5368 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionPublicAndPrivateMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5369 5330 5370 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPublicAndPrivateMethod(ExecState* state) 5331 5371 { 5332 VM& vm = state->vm(); 5333 auto throwScope = DECLARE_THROW_SCOPE(vm); 5334 UNUSED_PARAM(throwScope); 5335 JSValue thisValue = state->thisValue(); 5336 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5337 if (UNLIKELY(!castedThis)) 5338 return throwThisTypeError(*state, throwScope, "TestObject", "publicAndPrivateMethod"); 5339 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5372 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionPublicAndPrivateMethodCaller>(state, "publicAndPrivateMethod"); 5373 } 5374 5375 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionPublicAndPrivateMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5376 { 5377 UNUSED_PARAM(state); 5378 UNUSED_PARAM(throwScope); 5340 5379 auto& impl = castedThis->wrapped(); 5341 5380 if (UNLIKELY(state->argumentCount() < 1)) … … 5347 5386 } 5348 5387 5388 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionAddEventListenerCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5389 5349 5390 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* state) 5350 5391 { 5351 VM& vm = state->vm(); 5352 auto throwScope = DECLARE_THROW_SCOPE(vm); 5353 UNUSED_PARAM(throwScope); 5354 JSValue thisValue = state->thisValue(); 5355 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5356 if (UNLIKELY(!castedThis)) 5357 return throwThisTypeError(*state, throwScope, "TestObject", "addEventListener"); 5358 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5392 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionAddEventListenerCaller>(state, "addEventListener"); 5393 } 5394 5395 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionAddEventListenerCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5396 { 5397 UNUSED_PARAM(state); 5398 UNUSED_PARAM(throwScope); 5359 5399 auto& impl = castedThis->wrapped(); 5360 5400 if (UNLIKELY(state->argumentCount() < 2)) … … 5371 5411 } 5372 5412 5413 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionRemoveEventListenerCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5414 5373 5415 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* state) 5374 5416 { 5375 VM& vm = state->vm(); 5376 auto throwScope = DECLARE_THROW_SCOPE(vm); 5377 UNUSED_PARAM(throwScope); 5378 JSValue thisValue = state->thisValue(); 5379 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5380 if (UNLIKELY(!castedThis)) 5381 return throwThisTypeError(*state, throwScope, "TestObject", "removeEventListener"); 5382 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5417 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionRemoveEventListenerCaller>(state, "removeEventListener"); 5418 } 5419 5420 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionRemoveEventListenerCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5421 { 5422 UNUSED_PARAM(state); 5423 UNUSED_PARAM(throwScope); 5383 5424 auto& impl = castedThis->wrapped(); 5384 5425 if (UNLIKELY(state->argumentCount() < 2)) … … 5395 5436 } 5396 5437 5438 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateVoidCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5439 5397 5440 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* state) 5398 5441 { 5399 VM& vm = state->vm(); 5400 auto throwScope = DECLARE_THROW_SCOPE(vm); 5401 UNUSED_PARAM(throwScope); 5402 JSValue thisValue = state->thisValue(); 5403 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5404 if (UNLIKELY(!castedThis)) 5405 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptStateVoid"); 5406 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5442 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptStateVoidCaller>(state, "withScriptStateVoid"); 5443 } 5444 5445 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateVoidCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5446 { 5447 UNUSED_PARAM(state); 5448 UNUSED_PARAM(throwScope); 5407 5449 auto& impl = castedThis->wrapped(); 5408 5450 impl.withScriptStateVoid(*state); … … 5410 5452 } 5411 5453 5454 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateObjCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5455 5412 5456 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* state) 5413 5457 { 5414 VM& vm = state->vm(); 5415 auto throwScope = DECLARE_THROW_SCOPE(vm); 5416 UNUSED_PARAM(throwScope); 5417 JSValue thisValue = state->thisValue(); 5418 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5419 if (UNLIKELY(!castedThis)) 5420 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptStateObj"); 5421 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5458 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptStateObjCaller>(state, "withScriptStateObj"); 5459 } 5460 5461 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateObjCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5462 { 5463 UNUSED_PARAM(state); 5464 UNUSED_PARAM(throwScope); 5422 5465 auto& impl = castedThis->wrapped(); 5423 5466 JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptStateObj(*state)); … … 5426 5469 } 5427 5470 5471 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateVoidExceptionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5472 5428 5473 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* state) 5429 5474 { 5430 VM& vm = state->vm(); 5431 auto throwScope = DECLARE_THROW_SCOPE(vm); 5432 UNUSED_PARAM(throwScope); 5433 JSValue thisValue = state->thisValue(); 5434 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5435 if (UNLIKELY(!castedThis)) 5436 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptStateVoidException"); 5437 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5475 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptStateVoidExceptionCaller>(state, "withScriptStateVoidException"); 5476 } 5477 5478 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateVoidExceptionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5479 { 5480 UNUSED_PARAM(state); 5481 UNUSED_PARAM(throwScope); 5438 5482 auto& impl = castedThis->wrapped(); 5439 5483 ExceptionCode ec = 0; … … 5443 5487 } 5444 5488 5489 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateObjExceptionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5490 5445 5491 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* state) 5446 5492 { 5447 VM& vm = state->vm(); 5448 auto throwScope = DECLARE_THROW_SCOPE(vm); 5449 UNUSED_PARAM(throwScope); 5450 JSValue thisValue = state->thisValue(); 5451 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5452 if (UNLIKELY(!castedThis)) 5453 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptStateObjException"); 5454 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5493 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptStateObjExceptionCaller>(state, "withScriptStateObjException"); 5494 } 5495 5496 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptStateObjExceptionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5497 { 5498 UNUSED_PARAM(state); 5499 UNUSED_PARAM(throwScope); 5455 5500 auto& impl = castedThis->wrapped(); 5456 5501 ExceptionCode ec = 0; … … 5462 5507 } 5463 5508 5509 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5510 5464 5511 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(ExecState* state) 5465 5512 { 5466 VM& vm = state->vm(); 5467 auto throwScope = DECLARE_THROW_SCOPE(vm); 5468 UNUSED_PARAM(throwScope); 5469 JSValue thisValue = state->thisValue(); 5470 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5471 if (UNLIKELY(!castedThis)) 5472 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptExecutionContext"); 5473 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5513 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptExecutionContextCaller>(state, "withScriptExecutionContext"); 5514 } 5515 5516 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5517 { 5518 UNUSED_PARAM(state); 5519 UNUSED_PARAM(throwScope); 5474 5520 auto& impl = castedThis->wrapped(); 5475 5521 auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext(); … … 5480 5526 } 5481 5527 5528 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5529 5482 5530 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(ExecState* state) 5483 5531 { 5484 VM& vm = state->vm(); 5485 auto throwScope = DECLARE_THROW_SCOPE(vm); 5486 UNUSED_PARAM(throwScope); 5487 JSValue thisValue = state->thisValue(); 5488 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5489 if (UNLIKELY(!castedThis)) 5490 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptState"); 5491 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5532 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateCaller>(state, "withScriptExecutionContextAndScriptState"); 5533 } 5534 5535 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5536 { 5537 UNUSED_PARAM(state); 5538 UNUSED_PARAM(throwScope); 5492 5539 auto& impl = castedThis->wrapped(); 5493 5540 auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext(); … … 5498 5545 } 5499 5546 5547 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjExceptionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5548 5500 5549 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(ExecState* state) 5501 5550 { 5502 VM& vm = state->vm(); 5503 auto throwScope = DECLARE_THROW_SCOPE(vm); 5504 UNUSED_PARAM(throwScope); 5505 JSValue thisValue = state->thisValue(); 5506 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5507 if (UNLIKELY(!castedThis)) 5508 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateObjException"); 5509 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5551 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjExceptionCaller>(state, "withScriptExecutionContextAndScriptStateObjException"); 5552 } 5553 5554 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjExceptionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5555 { 5556 UNUSED_PARAM(state); 5557 UNUSED_PARAM(throwScope); 5510 5558 auto& impl = castedThis->wrapped(); 5511 5559 ExceptionCode ec = 0; … … 5520 5568 } 5521 5569 5570 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpacesCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5571 5522 5572 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(ExecState* state) 5523 5573 { 5524 VM& vm = state->vm(); 5525 auto throwScope = DECLARE_THROW_SCOPE(vm); 5526 UNUSED_PARAM(throwScope); 5527 JSValue thisValue = state->thisValue(); 5528 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5529 if (UNLIKELY(!castedThis)) 5530 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateWithSpaces"); 5531 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5574 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpacesCaller>(state, "withScriptExecutionContextAndScriptStateWithSpaces"); 5575 } 5576 5577 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpacesCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5578 { 5579 UNUSED_PARAM(state); 5580 UNUSED_PARAM(throwScope); 5532 5581 auto& impl = castedThis->wrapped(); 5533 5582 auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext(); … … 5539 5588 } 5540 5589 5590 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5591 5541 5592 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(ExecState* state) 5542 5593 { 5543 VM& vm = state->vm(); 5544 auto throwScope = DECLARE_THROW_SCOPE(vm); 5545 UNUSED_PARAM(throwScope); 5546 JSValue thisValue = state->thisValue(); 5547 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5548 if (UNLIKELY(!castedThis)) 5549 return throwThisTypeError(*state, throwScope, "TestObject", "withScriptArgumentsAndCallStack"); 5550 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5594 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackCaller>(state, "withScriptArgumentsAndCallStack"); 5595 } 5596 5597 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5598 { 5599 UNUSED_PARAM(state); 5600 UNUSED_PARAM(throwScope); 5551 5601 auto& impl = castedThis->wrapped(); 5552 5602 RefPtr<Inspector::ScriptArguments> scriptArguments(Inspector::createScriptArguments(state, 0)); … … 5555 5605 } 5556 5606 5607 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithDocumentArgumentCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5608 5557 5609 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDocumentArgument(ExecState* state) 5558 5610 { 5559 VM& vm = state->vm(); 5560 auto throwScope = DECLARE_THROW_SCOPE(vm); 5561 UNUSED_PARAM(throwScope); 5562 JSValue thisValue = state->thisValue(); 5563 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5564 if (UNLIKELY(!castedThis)) 5565 return throwThisTypeError(*state, throwScope, "TestObject", "withDocumentArgument"); 5566 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5611 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithDocumentArgumentCaller>(state, "withDocumentArgument"); 5612 } 5613 5614 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithDocumentArgumentCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5615 { 5616 UNUSED_PARAM(state); 5617 UNUSED_PARAM(throwScope); 5567 5618 auto& impl = castedThis->wrapped(); 5568 5619 auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext(); … … 5575 5626 } 5576 5627 5628 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithCallerDocumentArgumentCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5629 5577 5630 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithCallerDocumentArgument(ExecState* state) 5578 5631 { 5579 VM& vm = state->vm(); 5580 auto throwScope = DECLARE_THROW_SCOPE(vm); 5581 UNUSED_PARAM(throwScope); 5582 JSValue thisValue = state->thisValue(); 5583 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5584 if (UNLIKELY(!castedThis)) 5585 return throwThisTypeError(*state, throwScope, "TestObject", "withCallerDocumentArgument"); 5586 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5632 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithCallerDocumentArgumentCaller>(state, "withCallerDocumentArgument"); 5633 } 5634 5635 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithCallerDocumentArgumentCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5636 { 5637 UNUSED_PARAM(state); 5638 UNUSED_PARAM(throwScope); 5587 5639 auto& impl = castedThis->wrapped(); 5588 5640 auto* document = callerDOMWindow(state).document(); … … 5593 5645 } 5594 5646 5647 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithCallerWindowArgumentCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5648 5595 5649 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithCallerWindowArgument(ExecState* state) 5596 5650 { 5597 VM& vm = state->vm(); 5598 auto throwScope = DECLARE_THROW_SCOPE(vm); 5599 UNUSED_PARAM(throwScope); 5600 JSValue thisValue = state->thisValue(); 5601 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5602 if (UNLIKELY(!castedThis)) 5603 return throwThisTypeError(*state, throwScope, "TestObject", "withCallerWindowArgument"); 5604 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5651 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionWithCallerWindowArgumentCaller>(state, "withCallerWindowArgument"); 5652 } 5653 5654 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionWithCallerWindowArgumentCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5655 { 5656 UNUSED_PARAM(state); 5657 UNUSED_PARAM(throwScope); 5605 5658 auto& impl = castedThis->wrapped(); 5606 5659 impl.withCallerWindowArgument(callerDOMWindow(state)); … … 5608 5661 } 5609 5662 5663 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5664 5610 5665 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* state) 5611 5666 { 5612 VM& vm = state->vm(); 5613 auto throwScope = DECLARE_THROW_SCOPE(vm); 5614 UNUSED_PARAM(throwScope); 5615 JSValue thisValue = state->thisValue(); 5616 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5617 if (UNLIKELY(!castedThis)) 5618 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalArg"); 5619 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5667 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalArgCaller>(state, "methodWithOptionalArg"); 5668 } 5669 5670 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5671 { 5672 UNUSED_PARAM(state); 5673 UNUSED_PARAM(throwScope); 5620 5674 auto& impl = castedThis->wrapped(); 5621 5675 auto opt = state->argument(0).isUndefined() ? Optional<int32_t>() : convert<IDLLong>(*state, state->uncheckedArgument(0), NormalConversion); … … 5625 5679 } 5626 5680 5681 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5682 5627 5683 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue(ExecState* state) 5628 5684 { 5629 VM& vm = state->vm(); 5630 auto throwScope = DECLARE_THROW_SCOPE(vm); 5631 UNUSED_PARAM(throwScope); 5632 JSValue thisValue = state->thisValue(); 5633 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5634 if (UNLIKELY(!castedThis)) 5635 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalArgAndDefaultValue"); 5636 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5685 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueCaller>(state, "methodWithOptionalArgAndDefaultValue"); 5686 } 5687 5688 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5689 { 5690 UNUSED_PARAM(state); 5691 UNUSED_PARAM(throwScope); 5637 5692 auto& impl = castedThis->wrapped(); 5638 5693 auto opt = state->argument(0).isUndefined() ? 666 : convert<IDLLong>(*state, state->uncheckedArgument(0), NormalConversion); … … 5642 5697 } 5643 5698 5699 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5700 5644 5701 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* state) 5645 5702 { 5646 VM& vm = state->vm(); 5647 auto throwScope = DECLARE_THROW_SCOPE(vm); 5648 UNUSED_PARAM(throwScope); 5649 JSValue thisValue = state->thisValue(); 5650 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5651 if (UNLIKELY(!castedThis)) 5652 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithNonOptionalArgAndOptionalArg"); 5653 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5703 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgCaller>(state, "methodWithNonOptionalArgAndOptionalArg"); 5704 } 5705 5706 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5707 { 5708 UNUSED_PARAM(state); 5709 UNUSED_PARAM(throwScope); 5654 5710 auto& impl = castedThis->wrapped(); 5655 5711 if (UNLIKELY(state->argumentCount() < 1)) … … 5663 5719 } 5664 5720 5721 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5722 5665 5723 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* state) 5666 5724 { 5667 VM& vm = state->vm(); 5668 auto throwScope = DECLARE_THROW_SCOPE(vm); 5669 UNUSED_PARAM(throwScope); 5670 JSValue thisValue = state->thisValue(); 5671 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5672 if (UNLIKELY(!castedThis)) 5673 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithNonOptionalArgAndTwoOptionalArgs"); 5674 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5725 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsCaller>(state, "methodWithNonOptionalArgAndTwoOptionalArgs"); 5726 } 5727 5728 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5729 { 5730 UNUSED_PARAM(state); 5731 UNUSED_PARAM(throwScope); 5675 5732 auto& impl = castedThis->wrapped(); 5676 5733 if (UNLIKELY(state->argumentCount() < 1)) … … 5686 5743 } 5687 5744 5745 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5746 5688 5747 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(ExecState* state) 5689 5748 { 5690 VM& vm = state->vm(); 5691 auto throwScope = DECLARE_THROW_SCOPE(vm); 5692 UNUSED_PARAM(throwScope); 5693 JSValue thisValue = state->thisValue(); 5694 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5695 if (UNLIKELY(!castedThis)) 5696 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalString"); 5697 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5749 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalStringCaller>(state, "methodWithOptionalString"); 5750 } 5751 5752 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5753 { 5754 UNUSED_PARAM(state); 5755 UNUSED_PARAM(throwScope); 5698 5756 auto& impl = castedThis->wrapped(); 5699 5757 auto str = state->argument(0).isUndefined() ? String() : state->uncheckedArgument(0).toWTFString(state); … … 5703 5761 } 5704 5762 5763 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUSVStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5764 5705 5765 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVString(ExecState* state) 5706 5766 { 5707 VM& vm = state->vm(); 5708 auto throwScope = DECLARE_THROW_SCOPE(vm); 5709 UNUSED_PARAM(throwScope); 5710 JSValue thisValue = state->thisValue(); 5711 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5712 if (UNLIKELY(!castedThis)) 5713 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalUSVString"); 5714 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5767 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalUSVStringCaller>(state, "methodWithOptionalUSVString"); 5768 } 5769 5770 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUSVStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5771 { 5772 UNUSED_PARAM(state); 5773 UNUSED_PARAM(throwScope); 5715 5774 auto& impl = castedThis->wrapped(); 5716 5775 auto str = state->argument(0).isUndefined() ? String() : valueToUSVString(state, state->uncheckedArgument(0)); … … 5720 5779 } 5721 5780 5781 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5782 5722 5783 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicString(ExecState* state) 5723 5784 { 5724 VM& vm = state->vm(); 5725 auto throwScope = DECLARE_THROW_SCOPE(vm); 5726 UNUSED_PARAM(throwScope); 5727 JSValue thisValue = state->thisValue(); 5728 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5729 if (UNLIKELY(!castedThis)) 5730 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalAtomicString"); 5731 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5785 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringCaller>(state, "methodWithOptionalAtomicString"); 5786 } 5787 5788 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5789 { 5790 UNUSED_PARAM(state); 5791 UNUSED_PARAM(throwScope); 5732 5792 auto& impl = castedThis->wrapped(); 5733 5793 auto str = state->argument(0).isUndefined() ? nullAtom : state->uncheckedArgument(0).toString(state)->toAtomicString(state); … … 5737 5797 } 5738 5798 5799 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5800 5739 5801 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue(ExecState* state) 5740 5802 { 5741 VM& vm = state->vm(); 5742 auto throwScope = DECLARE_THROW_SCOPE(vm); 5743 UNUSED_PARAM(throwScope); 5744 JSValue thisValue = state->thisValue(); 5745 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5746 if (UNLIKELY(!castedThis)) 5747 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalStringAndDefaultValue"); 5748 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5803 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueCaller>(state, "methodWithOptionalStringAndDefaultValue"); 5804 } 5805 5806 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5807 { 5808 UNUSED_PARAM(state); 5809 UNUSED_PARAM(throwScope); 5749 5810 auto& impl = castedThis->wrapped(); 5750 5811 auto str = state->argument(0).isUndefined() ? ASCIILiteral("foo") : state->uncheckedArgument(0).toWTFString(state); … … 5754 5815 } 5755 5816 5817 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValueCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5818 5756 5819 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue(ExecState* state) 5757 5820 { 5758 VM& vm = state->vm(); 5759 auto throwScope = DECLARE_THROW_SCOPE(vm); 5760 UNUSED_PARAM(throwScope); 5761 JSValue thisValue = state->thisValue(); 5762 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5763 if (UNLIKELY(!castedThis)) 5764 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalAtomicStringAndDefaultValue"); 5765 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5821 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValueCaller>(state, "methodWithOptionalAtomicStringAndDefaultValue"); 5822 } 5823 5824 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValueCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5825 { 5826 UNUSED_PARAM(state); 5827 UNUSED_PARAM(throwScope); 5766 5828 auto& impl = castedThis->wrapped(); 5767 5829 auto str = state->argument(0).isUndefined() ? AtomicString("foo", AtomicString::ConstructFromLiteral) : state->uncheckedArgument(0).toString(state)->toAtomicString(state); … … 5771 5833 } 5772 5834 5835 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5836 5773 5837 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull(ExecState* state) 5774 5838 { 5775 VM& vm = state->vm(); 5776 auto throwScope = DECLARE_THROW_SCOPE(vm); 5777 UNUSED_PARAM(throwScope); 5778 JSValue thisValue = state->thisValue(); 5779 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5780 if (UNLIKELY(!castedThis)) 5781 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalStringIsNull"); 5782 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5839 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullCaller>(state, "methodWithOptionalStringIsNull"); 5840 } 5841 5842 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5843 { 5844 UNUSED_PARAM(state); 5845 UNUSED_PARAM(throwScope); 5783 5846 auto& impl = castedThis->wrapped(); 5784 5847 auto str = state->argument(0).isUndefined() ? String() : state->uncheckedArgument(0).toWTFString(state); … … 5788 5851 } 5789 5852 5853 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5854 5790 5855 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(ExecState* state) 5791 5856 { 5792 VM& vm = state->vm(); 5793 auto throwScope = DECLARE_THROW_SCOPE(vm); 5794 UNUSED_PARAM(throwScope); 5795 JSValue thisValue = state->thisValue(); 5796 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5797 if (UNLIKELY(!castedThis)) 5798 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalStringIsUndefined"); 5799 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5857 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedCaller>(state, "methodWithOptionalStringIsUndefined"); 5858 } 5859 5860 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5861 { 5862 UNUSED_PARAM(state); 5863 UNUSED_PARAM(throwScope); 5800 5864 auto& impl = castedThis->wrapped(); 5801 5865 auto str = state->argument(0).toWTFString(state); … … 5805 5869 } 5806 5870 5871 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5872 5807 5873 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull(ExecState* state) 5808 5874 { 5809 VM& vm = state->vm(); 5810 auto throwScope = DECLARE_THROW_SCOPE(vm); 5811 UNUSED_PARAM(throwScope); 5812 JSValue thisValue = state->thisValue(); 5813 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5814 if (UNLIKELY(!castedThis)) 5815 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalAtomicStringIsNull"); 5816 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5875 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullCaller>(state, "methodWithOptionalAtomicStringIsNull"); 5876 } 5877 5878 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5879 { 5880 UNUSED_PARAM(state); 5881 UNUSED_PARAM(throwScope); 5817 5882 auto& impl = castedThis->wrapped(); 5818 5883 auto str = state->argument(0).isUndefined() ? nullAtom : state->uncheckedArgument(0).toString(state)->toAtomicString(state); … … 5822 5887 } 5823 5888 5889 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5890 5824 5891 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString(ExecState* state) 5825 5892 { 5826 VM& vm = state->vm(); 5827 auto throwScope = DECLARE_THROW_SCOPE(vm); 5828 UNUSED_PARAM(throwScope); 5829 JSValue thisValue = state->thisValue(); 5830 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5831 if (UNLIKELY(!castedThis)) 5832 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalStringIsEmptyString"); 5833 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5893 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringCaller>(state, "methodWithOptionalStringIsEmptyString"); 5894 } 5895 5896 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5897 { 5898 UNUSED_PARAM(state); 5899 UNUSED_PARAM(throwScope); 5834 5900 auto& impl = castedThis->wrapped(); 5835 5901 auto str = state->argument(0).isUndefined() ? emptyString() : state->uncheckedArgument(0).toWTFString(state); … … 5839 5905 } 5840 5906 5907 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5908 5841 5909 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString(ExecState* state) 5842 5910 { 5843 VM& vm = state->vm(); 5844 auto throwScope = DECLARE_THROW_SCOPE(vm); 5845 UNUSED_PARAM(throwScope); 5846 JSValue thisValue = state->thisValue(); 5847 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5848 if (UNLIKELY(!castedThis)) 5849 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalUSVStringIsEmptyString"); 5850 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5911 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringCaller>(state, "methodWithOptionalUSVStringIsEmptyString"); 5912 } 5913 5914 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5915 { 5916 UNUSED_PARAM(state); 5917 UNUSED_PARAM(throwScope); 5851 5918 auto& impl = castedThis->wrapped(); 5852 5919 auto str = state->argument(0).isUndefined() ? emptyString() : valueToUSVString(state, state->uncheckedArgument(0)); … … 5856 5923 } 5857 5924 5925 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5926 5858 5927 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString(ExecState* state) 5859 5928 { 5860 VM& vm = state->vm(); 5861 auto throwScope = DECLARE_THROW_SCOPE(vm); 5862 UNUSED_PARAM(throwScope); 5863 JSValue thisValue = state->thisValue(); 5864 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5865 if (UNLIKELY(!castedThis)) 5866 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalAtomicStringIsEmptyString"); 5867 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5929 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringCaller>(state, "methodWithOptionalAtomicStringIsEmptyString"); 5930 } 5931 5932 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5933 { 5934 UNUSED_PARAM(state); 5935 UNUSED_PARAM(throwScope); 5868 5936 auto& impl = castedThis->wrapped(); 5869 5937 auto str = state->argument(0).isUndefined() ? emptyAtom : state->uncheckedArgument(0).toString(state)->toAtomicString(state); … … 5873 5941 } 5874 5942 5943 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5944 5875 5945 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN(ExecState* state) 5876 5946 { 5877 VM& vm = state->vm(); 5878 auto throwScope = DECLARE_THROW_SCOPE(vm); 5879 UNUSED_PARAM(throwScope); 5880 JSValue thisValue = state->thisValue(); 5881 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5882 if (UNLIKELY(!castedThis)) 5883 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalDoubleIsNaN"); 5884 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5947 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNCaller>(state, "methodWithOptionalDoubleIsNaN"); 5948 } 5949 5950 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5951 { 5952 UNUSED_PARAM(state); 5953 UNUSED_PARAM(throwScope); 5885 5954 auto& impl = castedThis->wrapped(); 5886 5955 auto number = convert<IDLUnrestrictedDouble>(*state, state->argument(0)); … … 5890 5959 } 5891 5960 5961 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5962 5892 5963 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN(ExecState* state) 5893 5964 { 5894 VM& vm = state->vm(); 5895 auto throwScope = DECLARE_THROW_SCOPE(vm); 5896 UNUSED_PARAM(throwScope); 5897 JSValue thisValue = state->thisValue(); 5898 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5899 if (UNLIKELY(!castedThis)) 5900 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalFloatIsNaN"); 5901 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5965 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNCaller>(state, "methodWithOptionalFloatIsNaN"); 5966 } 5967 5968 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5969 { 5970 UNUSED_PARAM(state); 5971 UNUSED_PARAM(throwScope); 5902 5972 auto& impl = castedThis->wrapped(); 5903 5973 auto number = convert<IDLUnrestrictedFloat>(*state, state->argument(0)); … … 5907 5977 } 5908 5978 5979 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalLongLongCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5980 5909 5981 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLong(ExecState* state) 5910 5982 { 5911 VM& vm = state->vm(); 5912 auto throwScope = DECLARE_THROW_SCOPE(vm); 5913 UNUSED_PARAM(throwScope); 5914 JSValue thisValue = state->thisValue(); 5915 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5916 if (UNLIKELY(!castedThis)) 5917 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalLongLong"); 5918 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5983 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalLongLongCaller>(state, "methodWithOptionalLongLong"); 5984 } 5985 5986 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalLongLongCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5987 { 5988 UNUSED_PARAM(state); 5989 UNUSED_PARAM(throwScope); 5919 5990 auto& impl = castedThis->wrapped(); 5920 5991 auto number = state->argument(0).isUndefined() ? Optional<int64_t>() : convert<IDLLongLong>(*state, state->uncheckedArgument(0), NormalConversion); … … 5924 5995 } 5925 5996 5997 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5998 5926 5999 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero(ExecState* state) 5927 6000 { 5928 VM& vm = state->vm(); 5929 auto throwScope = DECLARE_THROW_SCOPE(vm); 5930 UNUSED_PARAM(throwScope); 5931 JSValue thisValue = state->thisValue(); 5932 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5933 if (UNLIKELY(!castedThis)) 5934 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalLongLongIsZero"); 5935 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6001 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroCaller>(state, "methodWithOptionalLongLongIsZero"); 6002 } 6003 6004 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6005 { 6006 UNUSED_PARAM(state); 6007 UNUSED_PARAM(throwScope); 5936 6008 auto& impl = castedThis->wrapped(); 5937 6009 auto number = convert<IDLLongLong>(*state, state->argument(0), NormalConversion); … … 5941 6013 } 5942 6014 6015 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6016 5943 6017 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong(ExecState* state) 5944 6018 { 5945 VM& vm = state->vm(); 5946 auto throwScope = DECLARE_THROW_SCOPE(vm); 5947 UNUSED_PARAM(throwScope); 5948 JSValue thisValue = state->thisValue(); 5949 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5950 if (UNLIKELY(!castedThis)) 5951 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalUnsignedLongLong"); 5952 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6019 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongCaller>(state, "methodWithOptionalUnsignedLongLong"); 6020 } 6021 6022 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6023 { 6024 UNUSED_PARAM(state); 6025 UNUSED_PARAM(throwScope); 5953 6026 auto& impl = castedThis->wrapped(); 5954 6027 auto number = state->argument(0).isUndefined() ? Optional<uint64_t>() : convert<IDLUnsignedLongLong>(*state, state->uncheckedArgument(0), NormalConversion); … … 5958 6031 } 5959 6032 6033 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6034 5960 6035 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero(ExecState* state) 5961 6036 { 5962 VM& vm = state->vm(); 5963 auto throwScope = DECLARE_THROW_SCOPE(vm); 5964 UNUSED_PARAM(throwScope); 5965 JSValue thisValue = state->thisValue(); 5966 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5967 if (UNLIKELY(!castedThis)) 5968 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalUnsignedLongLongIsZero"); 5969 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6037 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroCaller>(state, "methodWithOptionalUnsignedLongLongIsZero"); 6038 } 6039 6040 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6041 { 6042 UNUSED_PARAM(state); 6043 UNUSED_PARAM(throwScope); 5970 6044 auto& impl = castedThis->wrapped(); 5971 6045 auto number = convert<IDLUnsignedLongLong>(*state, state->argument(0), NormalConversion); … … 5975 6049 } 5976 6050 6051 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalSequenceCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6052 5977 6053 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalSequence(ExecState* state) 5978 6054 { 5979 VM& vm = state->vm(); 5980 auto throwScope = DECLARE_THROW_SCOPE(vm); 5981 UNUSED_PARAM(throwScope); 5982 JSValue thisValue = state->thisValue(); 5983 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5984 if (UNLIKELY(!castedThis)) 5985 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalSequence"); 5986 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6055 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalSequenceCaller>(state, "methodWithOptionalSequence"); 6056 } 6057 6058 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalSequenceCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6059 { 6060 UNUSED_PARAM(state); 6061 UNUSED_PARAM(throwScope); 5987 6062 auto& impl = castedThis->wrapped(); 5988 6063 auto array = state->argument(0).isUndefined() ? Optional<Vector<String>>() : convert<IDLSequence<IDLDOMString>>(*state, state->uncheckedArgument(0)); … … 5992 6067 } 5993 6068 6069 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6070 5994 6071 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty(ExecState* state) 5995 6072 { 5996 VM& vm = state->vm(); 5997 auto throwScope = DECLARE_THROW_SCOPE(vm); 5998 UNUSED_PARAM(throwScope); 5999 JSValue thisValue = state->thisValue(); 6000 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6001 if (UNLIKELY(!castedThis)) 6002 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalSequenceIsEmpty"); 6003 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6073 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller>(state, "methodWithOptionalSequenceIsEmpty"); 6074 } 6075 6076 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6077 { 6078 UNUSED_PARAM(state); 6079 UNUSED_PARAM(throwScope); 6004 6080 auto& impl = castedThis->wrapped(); 6005 6081 auto array = state->argument(0).isUndefined() ? Vector<String>() : convert<IDLSequence<IDLDOMString>>(*state, state->uncheckedArgument(0)); … … 6009 6085 } 6010 6086 6087 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalBooleanCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6088 6011 6089 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalBoolean(ExecState* state) 6012 6090 { 6013 VM& vm = state->vm(); 6014 auto throwScope = DECLARE_THROW_SCOPE(vm); 6015 UNUSED_PARAM(throwScope); 6016 JSValue thisValue = state->thisValue(); 6017 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6018 if (UNLIKELY(!castedThis)) 6019 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalBoolean"); 6020 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6091 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalBooleanCaller>(state, "methodWithOptionalBoolean"); 6092 } 6093 6094 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalBooleanCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6095 { 6096 UNUSED_PARAM(state); 6097 UNUSED_PARAM(throwScope); 6021 6098 auto& impl = castedThis->wrapped(); 6022 6099 auto b = state->argument(0).isUndefined() ? Optional<bool>() : convert<IDLBoolean>(*state, state->uncheckedArgument(0)); … … 6026 6103 } 6027 6104 6105 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6106 6028 6107 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse(ExecState* state) 6029 6108 { 6030 VM& vm = state->vm(); 6031 auto throwScope = DECLARE_THROW_SCOPE(vm); 6032 UNUSED_PARAM(throwScope); 6033 JSValue thisValue = state->thisValue(); 6034 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6035 if (UNLIKELY(!castedThis)) 6036 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalBooleanIsFalse"); 6037 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6109 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseCaller>(state, "methodWithOptionalBooleanIsFalse"); 6110 } 6111 6112 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6113 { 6114 UNUSED_PARAM(state); 6115 UNUSED_PARAM(throwScope); 6038 6116 auto& impl = castedThis->wrapped(); 6039 6117 auto b = convert<IDLBoolean>(*state, state->argument(0)); … … 6043 6121 } 6044 6122 6123 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAnyCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6124 6045 6125 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAny(ExecState* state) 6046 6126 { 6047 VM& vm = state->vm(); 6048 auto throwScope = DECLARE_THROW_SCOPE(vm); 6049 UNUSED_PARAM(throwScope); 6050 JSValue thisValue = state->thisValue(); 6051 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6052 if (UNLIKELY(!castedThis)) 6053 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalAny"); 6054 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6127 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalAnyCaller>(state, "methodWithOptionalAny"); 6128 } 6129 6130 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAnyCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6131 { 6132 UNUSED_PARAM(state); 6133 UNUSED_PARAM(throwScope); 6055 6134 auto& impl = castedThis->wrapped(); 6056 6135 auto a = convert<IDLAny>(*state, state->argument(0)); … … 6060 6139 } 6061 6140 6141 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6142 6062 6143 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper(ExecState* state) 6063 6144 { 6064 VM& vm = state->vm(); 6065 auto throwScope = DECLARE_THROW_SCOPE(vm); 6066 UNUSED_PARAM(throwScope); 6067 JSValue thisValue = state->thisValue(); 6068 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6069 if (UNLIKELY(!castedThis)) 6070 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalNullableWrapper"); 6071 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6145 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperCaller>(state, "methodWithOptionalNullableWrapper"); 6146 } 6147 6148 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6149 { 6150 UNUSED_PARAM(state); 6151 UNUSED_PARAM(throwScope); 6072 6152 auto& impl = castedThis->wrapped(); 6073 6153 TestObj* obj = nullptr; … … 6081 6161 } 6082 6162 6163 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6164 6083 6165 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull(ExecState* state) 6084 6166 { 6085 VM& vm = state->vm(); 6086 auto throwScope = DECLARE_THROW_SCOPE(vm); 6087 UNUSED_PARAM(throwScope); 6088 JSValue thisValue = state->thisValue(); 6089 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6090 if (UNLIKELY(!castedThis)) 6091 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalNullableWrapperIsNull"); 6092 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6167 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullCaller>(state, "methodWithOptionalNullableWrapperIsNull"); 6168 } 6169 6170 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6171 { 6172 UNUSED_PARAM(state); 6173 UNUSED_PARAM(throwScope); 6093 6174 auto& impl = castedThis->wrapped(); 6094 6175 TestObj* obj = nullptr; … … 6102 6183 } 6103 6184 6185 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6186 6104 6187 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver(ExecState* state) 6105 6188 { 6106 VM& vm = state->vm(); 6107 auto throwScope = DECLARE_THROW_SCOPE(vm); 6108 UNUSED_PARAM(throwScope); 6109 JSValue thisValue = state->thisValue(); 6110 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6111 if (UNLIKELY(!castedThis)) 6112 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithOptionalXPathNSResolver"); 6113 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6189 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverCaller>(state, "methodWithOptionalXPathNSResolver"); 6190 } 6191 6192 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6193 { 6194 UNUSED_PARAM(state); 6195 UNUSED_PARAM(throwScope); 6114 6196 auto& impl = castedThis->wrapped(); 6115 6197 RefPtr<XPathNSResolver> resolver = nullptr; … … 6124 6206 } 6125 6207 6208 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6209 6126 6210 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* state) 6127 6211 { 6128 VM& vm = state->vm(); 6129 auto throwScope = DECLARE_THROW_SCOPE(vm); 6130 UNUSED_PARAM(throwScope); 6131 JSValue thisValue = state->thisValue(); 6132 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6133 if (UNLIKELY(!castedThis)) 6134 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithCallbackArg"); 6135 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6212 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithCallbackArgCaller>(state, "methodWithCallbackArg"); 6213 } 6214 6215 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6216 { 6217 UNUSED_PARAM(state); 6218 UNUSED_PARAM(throwScope); 6136 6219 auto& impl = castedThis->wrapped(); 6137 6220 if (UNLIKELY(state->argumentCount() < 1)) … … 6144 6227 } 6145 6228 6229 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6230 6146 6231 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(ExecState* state) 6147 6232 { 6148 VM& vm = state->vm(); 6149 auto throwScope = DECLARE_THROW_SCOPE(vm); 6150 UNUSED_PARAM(throwScope); 6151 JSValue thisValue = state->thisValue(); 6152 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6153 if (UNLIKELY(!castedThis)) 6154 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithNonCallbackArgAndCallbackArg"); 6155 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6233 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgCaller>(state, "methodWithNonCallbackArgAndCallbackArg"); 6234 } 6235 6236 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6237 { 6238 UNUSED_PARAM(state); 6239 UNUSED_PARAM(throwScope); 6156 6240 auto& impl = castedThis->wrapped(); 6157 6241 if (UNLIKELY(state->argumentCount() < 2)) … … 6166 6250 } 6167 6251 6252 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6253 6168 6254 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(ExecState* state) 6169 6255 { 6170 VM& vm = state->vm(); 6171 auto throwScope = DECLARE_THROW_SCOPE(vm); 6172 UNUSED_PARAM(throwScope); 6173 JSValue thisValue = state->thisValue(); 6174 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6175 if (UNLIKELY(!castedThis)) 6176 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithCallbackAndOptionalArg"); 6177 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6256 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgCaller>(state, "methodWithCallbackAndOptionalArg"); 6257 } 6258 6259 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6260 { 6261 UNUSED_PARAM(state); 6262 UNUSED_PARAM(throwScope); 6178 6263 auto& impl = castedThis->wrapped(); 6179 6264 RefPtr<TestCallback> callback; … … 6187 6272 } 6188 6273 6274 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6275 6189 6276 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg(ExecState* state) 6190 6277 { 6191 VM& vm = state->vm(); 6192 auto throwScope = DECLARE_THROW_SCOPE(vm); 6193 UNUSED_PARAM(throwScope); 6194 JSValue thisValue = state->thisValue(); 6195 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6196 if (UNLIKELY(!castedThis)) 6197 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithCallbackFunctionArg"); 6198 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6278 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgCaller>(state, "methodWithCallbackFunctionArg"); 6279 } 6280 6281 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6282 { 6283 UNUSED_PARAM(state); 6284 UNUSED_PARAM(throwScope); 6199 6285 auto& impl = castedThis->wrapped(); 6200 6286 if (UNLIKELY(state->argumentCount() < 1)) … … 6207 6293 } 6208 6294 6295 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6296 6209 6297 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg(ExecState* state) 6210 6298 { 6211 VM& vm = state->vm(); 6212 auto throwScope = DECLARE_THROW_SCOPE(vm); 6213 UNUSED_PARAM(throwScope); 6214 JSValue thisValue = state->thisValue(); 6215 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6216 if (UNLIKELY(!castedThis)) 6217 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithNonCallbackArgAndCallbackFunctionArg"); 6218 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6299 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgCaller>(state, "methodWithNonCallbackArgAndCallbackFunctionArg"); 6300 } 6301 6302 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6303 { 6304 UNUSED_PARAM(state); 6305 UNUSED_PARAM(throwScope); 6219 6306 auto& impl = castedThis->wrapped(); 6220 6307 if (UNLIKELY(state->argumentCount() < 2)) … … 6229 6316 } 6230 6317 6318 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6319 6231 6320 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg(ExecState* state) 6232 6321 { 6233 VM& vm = state->vm(); 6234 auto throwScope = DECLARE_THROW_SCOPE(vm); 6235 UNUSED_PARAM(throwScope); 6236 JSValue thisValue = state->thisValue(); 6237 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6238 if (UNLIKELY(!castedThis)) 6239 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithCallbackFunctionAndOptionalArg"); 6240 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6322 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgCaller>(state, "methodWithCallbackFunctionAndOptionalArg"); 6323 } 6324 6325 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6326 { 6327 UNUSED_PARAM(state); 6328 UNUSED_PARAM(throwScope); 6241 6329 auto& impl = castedThis->wrapped(); 6242 6330 RefPtr<TestCallbackFunction> callback; … … 6280 6368 6281 6369 #if ENABLE(Condition1) 6370 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalMethod1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6371 6282 6372 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecState* state) 6283 6373 { 6284 VM& vm = state->vm(); 6285 auto throwScope = DECLARE_THROW_SCOPE(vm); 6286 UNUSED_PARAM(throwScope); 6287 JSValue thisValue = state->thisValue(); 6288 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6289 if (UNLIKELY(!castedThis)) 6290 return throwThisTypeError(*state, throwScope, "TestObject", "conditionalMethod1"); 6291 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6374 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConditionalMethod1Caller>(state, "conditionalMethod1"); 6375 } 6376 6377 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalMethod1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6378 { 6379 UNUSED_PARAM(state); 6380 UNUSED_PARAM(throwScope); 6292 6381 auto& impl = castedThis->wrapped(); 6293 6382 JSValue result = jsStringWithCache(state, impl.conditionalMethod1()); … … 6298 6387 6299 6388 #if ENABLE(Condition1) && ENABLE(Condition2) 6389 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalMethod2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6390 6300 6391 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecState* state) 6301 6392 { 6302 VM& vm = state->vm(); 6303 auto throwScope = DECLARE_THROW_SCOPE(vm); 6304 UNUSED_PARAM(throwScope); 6305 JSValue thisValue = state->thisValue(); 6306 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6307 if (UNLIKELY(!castedThis)) 6308 return throwThisTypeError(*state, throwScope, "TestObject", "conditionalMethod2"); 6309 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6393 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConditionalMethod2Caller>(state, "conditionalMethod2"); 6394 } 6395 6396 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalMethod2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6397 { 6398 UNUSED_PARAM(state); 6399 UNUSED_PARAM(throwScope); 6310 6400 auto& impl = castedThis->wrapped(); 6311 6401 impl.conditionalMethod2(); … … 6316 6406 6317 6407 #if ENABLE(Condition1) || ENABLE(Condition2) 6408 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalMethod3Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6409 6318 6410 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecState* state) 6319 6411 { 6320 VM& vm = state->vm(); 6321 auto throwScope = DECLARE_THROW_SCOPE(vm); 6322 UNUSED_PARAM(throwScope); 6323 JSValue thisValue = state->thisValue(); 6324 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6325 if (UNLIKELY(!castedThis)) 6326 return throwThisTypeError(*state, throwScope, "TestObject", "conditionalMethod3"); 6327 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6412 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConditionalMethod3Caller>(state, "conditionalMethod3"); 6413 } 6414 6415 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalMethod3Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6416 { 6417 UNUSED_PARAM(state); 6418 UNUSED_PARAM(throwScope); 6328 6419 auto& impl = castedThis->wrapped(); 6329 6420 impl.conditionalMethod3(); … … 6333 6424 #endif 6334 6425 6426 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6427 6335 6428 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* state) 6336 6429 { 6337 VM& vm = state->vm(); 6338 auto throwScope = DECLARE_THROW_SCOPE(vm); 6339 UNUSED_PARAM(throwScope); 6340 JSValue thisValue = state->thisValue(); 6341 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6342 if (UNLIKELY(!castedThis)) 6343 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6344 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6430 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod1Caller>(state, "overloadedMethod"); 6431 } 6432 6433 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6434 { 6435 UNUSED_PARAM(state); 6436 UNUSED_PARAM(throwScope); 6345 6437 auto& impl = castedThis->wrapped(); 6346 6438 if (UNLIKELY(state->argumentCount() < 2)) … … 6358 6450 } 6359 6451 6452 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6453 6360 6454 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* state) 6361 6455 { 6362 VM& vm = state->vm(); 6363 auto throwScope = DECLARE_THROW_SCOPE(vm); 6364 UNUSED_PARAM(throwScope); 6365 JSValue thisValue = state->thisValue(); 6366 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6367 if (UNLIKELY(!castedThis)) 6368 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6369 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6456 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod2Caller>(state, "overloadedMethod"); 6457 } 6458 6459 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6460 { 6461 UNUSED_PARAM(state); 6462 UNUSED_PARAM(throwScope); 6370 6463 auto& impl = castedThis->wrapped(); 6371 6464 if (UNLIKELY(state->argumentCount() < 1)) … … 6383 6476 } 6384 6477 6478 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod3Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6479 6385 6480 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* state) 6386 6481 { 6387 VM& vm = state->vm(); 6388 auto throwScope = DECLARE_THROW_SCOPE(vm); 6389 UNUSED_PARAM(throwScope); 6390 JSValue thisValue = state->thisValue(); 6391 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6392 if (UNLIKELY(!castedThis)) 6393 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6394 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6482 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod3Caller>(state, "overloadedMethod"); 6483 } 6484 6485 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod3Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6486 { 6487 UNUSED_PARAM(state); 6488 UNUSED_PARAM(throwScope); 6395 6489 auto& impl = castedThis->wrapped(); 6396 6490 if (UNLIKELY(state->argumentCount() < 1)) … … 6402 6496 } 6403 6497 6498 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod4Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6499 6404 6500 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* state) 6405 6501 { 6406 VM& vm = state->vm(); 6407 auto throwScope = DECLARE_THROW_SCOPE(vm); 6408 UNUSED_PARAM(throwScope); 6409 JSValue thisValue = state->thisValue(); 6410 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6411 if (UNLIKELY(!castedThis)) 6412 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6413 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6502 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod4Caller>(state, "overloadedMethod"); 6503 } 6504 6505 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod4Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6506 { 6507 UNUSED_PARAM(state); 6508 UNUSED_PARAM(throwScope); 6414 6509 auto& impl = castedThis->wrapped(); 6415 6510 if (UNLIKELY(state->argumentCount() < 1)) … … 6421 6516 } 6422 6517 6518 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod5Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6519 6423 6520 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* state) 6424 6521 { 6425 VM& vm = state->vm(); 6426 auto throwScope = DECLARE_THROW_SCOPE(vm); 6427 UNUSED_PARAM(throwScope); 6428 JSValue thisValue = state->thisValue(); 6429 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6430 if (UNLIKELY(!castedThis)) 6431 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6432 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6522 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod5Caller>(state, "overloadedMethod"); 6523 } 6524 6525 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod5Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6526 { 6527 UNUSED_PARAM(state); 6528 UNUSED_PARAM(throwScope); 6433 6529 auto& impl = castedThis->wrapped(); 6434 6530 if (UNLIKELY(state->argumentCount() < 1)) … … 6441 6537 } 6442 6538 6539 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod6Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6540 6443 6541 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* state) 6444 6542 { 6445 VM& vm = state->vm(); 6446 auto throwScope = DECLARE_THROW_SCOPE(vm); 6447 UNUSED_PARAM(throwScope); 6448 JSValue thisValue = state->thisValue(); 6449 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6450 if (UNLIKELY(!castedThis)) 6451 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6452 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6543 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod6Caller>(state, "overloadedMethod"); 6544 } 6545 6546 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod6Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6547 { 6548 UNUSED_PARAM(state); 6549 UNUSED_PARAM(throwScope); 6453 6550 auto& impl = castedThis->wrapped(); 6454 6551 if (UNLIKELY(state->argumentCount() < 1)) … … 6464 6561 } 6465 6562 6563 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod7Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6564 6466 6565 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* state) 6467 6566 { 6468 VM& vm = state->vm(); 6469 auto throwScope = DECLARE_THROW_SCOPE(vm); 6470 UNUSED_PARAM(throwScope); 6471 JSValue thisValue = state->thisValue(); 6472 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6473 if (UNLIKELY(!castedThis)) 6474 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6475 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6567 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod7Caller>(state, "overloadedMethod"); 6568 } 6569 6570 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod7Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6571 { 6572 UNUSED_PARAM(state); 6573 UNUSED_PARAM(throwScope); 6476 6574 auto& impl = castedThis->wrapped(); 6477 6575 if (UNLIKELY(state->argumentCount() < 1)) … … 6483 6581 } 6484 6582 6583 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod8Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6584 6485 6585 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* state) 6486 6586 { 6487 VM& vm = state->vm(); 6488 auto throwScope = DECLARE_THROW_SCOPE(vm); 6489 UNUSED_PARAM(throwScope); 6490 JSValue thisValue = state->thisValue(); 6491 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6492 if (UNLIKELY(!castedThis)) 6493 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6494 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6587 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod8Caller>(state, "overloadedMethod"); 6588 } 6589 6590 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod8Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6591 { 6592 UNUSED_PARAM(state); 6593 UNUSED_PARAM(throwScope); 6495 6594 auto& impl = castedThis->wrapped(); 6496 6595 if (UNLIKELY(state->argumentCount() < 1)) … … 6503 6602 } 6504 6603 6604 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod9Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6605 6505 6606 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod9(ExecState* state) 6506 6607 { 6507 VM& vm = state->vm(); 6508 auto throwScope = DECLARE_THROW_SCOPE(vm); 6509 UNUSED_PARAM(throwScope); 6510 JSValue thisValue = state->thisValue(); 6511 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6512 if (UNLIKELY(!castedThis)) 6513 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6514 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6608 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod9Caller>(state, "overloadedMethod"); 6609 } 6610 6611 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod9Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6612 { 6613 UNUSED_PARAM(state); 6614 UNUSED_PARAM(throwScope); 6515 6615 auto& impl = castedThis->wrapped(); 6516 6616 if (UNLIKELY(state->argumentCount() < 1)) … … 6523 6623 } 6524 6624 6625 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod10Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6626 6525 6627 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod10(ExecState* state) 6526 6628 { 6527 VM& vm = state->vm(); 6528 auto throwScope = DECLARE_THROW_SCOPE(vm); 6529 UNUSED_PARAM(throwScope); 6530 JSValue thisValue = state->thisValue(); 6531 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6532 if (UNLIKELY(!castedThis)) 6533 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6534 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6629 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod10Caller>(state, "overloadedMethod"); 6630 } 6631 6632 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod10Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6633 { 6634 UNUSED_PARAM(state); 6635 UNUSED_PARAM(throwScope); 6535 6636 auto& impl = castedThis->wrapped(); 6536 6637 if (UNLIKELY(state->argumentCount() < 1)) … … 6542 6643 } 6543 6644 6645 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod11Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6646 6544 6647 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod11(ExecState* state) 6545 6648 { 6546 VM& vm = state->vm(); 6547 auto throwScope = DECLARE_THROW_SCOPE(vm); 6548 UNUSED_PARAM(throwScope); 6549 JSValue thisValue = state->thisValue(); 6550 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6551 if (UNLIKELY(!castedThis)) 6552 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6553 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6649 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod11Caller>(state, "overloadedMethod"); 6650 } 6651 6652 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod11Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6653 { 6654 UNUSED_PARAM(state); 6655 UNUSED_PARAM(throwScope); 6554 6656 auto& impl = castedThis->wrapped(); 6555 6657 if (UNLIKELY(state->argumentCount() < 1)) … … 6561 6663 } 6562 6664 6665 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod12Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6666 6563 6667 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod12(ExecState* state) 6564 6668 { 6565 VM& vm = state->vm(); 6566 auto throwScope = DECLARE_THROW_SCOPE(vm); 6567 UNUSED_PARAM(throwScope); 6568 JSValue thisValue = state->thisValue(); 6569 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6570 if (UNLIKELY(!castedThis)) 6571 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6572 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6669 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod12Caller>(state, "overloadedMethod"); 6670 } 6671 6672 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod12Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6673 { 6674 UNUSED_PARAM(state); 6675 UNUSED_PARAM(throwScope); 6573 6676 auto& impl = castedThis->wrapped(); 6574 6677 if (UNLIKELY(state->argumentCount() < 1)) … … 6580 6683 } 6581 6684 6685 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod13Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6686 6582 6687 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod13(ExecState* state) 6583 6688 { 6584 VM& vm = state->vm(); 6585 auto throwScope = DECLARE_THROW_SCOPE(vm); 6586 UNUSED_PARAM(throwScope); 6587 JSValue thisValue = state->thisValue(); 6588 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6589 if (UNLIKELY(!castedThis)) 6590 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethod"); 6591 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6689 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethod13Caller>(state, "overloadedMethod"); 6690 } 6691 6692 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod13Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6693 { 6694 UNUSED_PARAM(state); 6695 UNUSED_PARAM(throwScope); 6592 6696 auto& impl = castedThis->wrapped(); 6593 6697 auto blobArgs = convertVariadicArguments<IDLInterface<Blob>>(*state, 0); … … 6643 6747 } 6644 6748 6749 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6750 6645 6751 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1(ExecState* state) 6646 6752 { 6647 VM& vm = state->vm(); 6648 auto throwScope = DECLARE_THROW_SCOPE(vm); 6649 UNUSED_PARAM(throwScope); 6650 JSValue thisValue = state->thisValue(); 6651 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6652 if (UNLIKELY(!castedThis)) 6653 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethodWithOptionalParameter"); 6654 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6753 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Caller>(state, "overloadedMethodWithOptionalParameter"); 6754 } 6755 6756 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6757 { 6758 UNUSED_PARAM(state); 6759 UNUSED_PARAM(throwScope); 6655 6760 auto& impl = castedThis->wrapped(); 6656 6761 if (UNLIKELY(state->argumentCount() < 1)) … … 6668 6773 } 6669 6774 6775 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6776 6670 6777 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2(ExecState* state) 6671 6778 { 6672 VM& vm = state->vm(); 6673 auto throwScope = DECLARE_THROW_SCOPE(vm); 6674 UNUSED_PARAM(throwScope); 6675 JSValue thisValue = state->thisValue(); 6676 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6677 if (UNLIKELY(!castedThis)) 6678 return throwThisTypeError(*state, throwScope, "TestObject", "overloadedMethodWithOptionalParameter"); 6679 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6779 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Caller>(state, "overloadedMethodWithOptionalParameter"); 6780 } 6781 6782 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6783 { 6784 UNUSED_PARAM(state); 6785 UNUSED_PARAM(throwScope); 6680 6786 auto& impl = castedThis->wrapped(); 6681 6787 if (UNLIKELY(state->argumentCount() < 1)) … … 6740 6846 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod2(ExecState* state) 6741 6847 { 6742 VM& vm = state->vm();6743 auto throwScope = DECLARE_THROW_SCOPE(vm);6744 UNUSED_PARAM(throwScope);6745 6848 if (UNLIKELY(state->argumentCount() < 1)) 6746 6849 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); … … 6801 6904 #endif 6802 6905 6906 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithClampCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6907 6803 6908 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(ExecState* state) 6804 6909 { 6805 VM& vm = state->vm(); 6806 auto throwScope = DECLARE_THROW_SCOPE(vm); 6807 UNUSED_PARAM(throwScope); 6808 JSValue thisValue = state->thisValue(); 6809 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6810 if (UNLIKELY(!castedThis)) 6811 return throwThisTypeError(*state, throwScope, "TestObject", "classMethodWithClamp"); 6812 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6910 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionClassMethodWithClampCaller>(state, "classMethodWithClamp"); 6911 } 6912 6913 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithClampCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6914 { 6915 UNUSED_PARAM(state); 6916 UNUSED_PARAM(throwScope); 6813 6917 auto& impl = castedThis->wrapped(); 6814 6918 if (UNLIKELY(state->argumentCount() < 2)) … … 6822 6926 } 6823 6927 6928 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithEnforceRangeCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6929 6824 6930 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithEnforceRange(ExecState* state) 6825 6931 { 6826 VM& vm = state->vm(); 6827 auto throwScope = DECLARE_THROW_SCOPE(vm); 6828 UNUSED_PARAM(throwScope); 6829 JSValue thisValue = state->thisValue(); 6830 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6831 if (UNLIKELY(!castedThis)) 6832 return throwThisTypeError(*state, throwScope, "TestObject", "classMethodWithEnforceRange"); 6833 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6932 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionClassMethodWithEnforceRangeCaller>(state, "classMethodWithEnforceRange"); 6933 } 6934 6935 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithEnforceRangeCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6936 { 6937 UNUSED_PARAM(state); 6938 UNUSED_PARAM(throwScope); 6834 6939 auto& impl = castedThis->wrapped(); 6835 6940 if (UNLIKELY(state->argumentCount() < 2)) … … 6843 6948 } 6844 6949 6950 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6951 6845 6952 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(ExecState* state) 6846 6953 { 6847 VM& vm = state->vm(); 6848 auto throwScope = DECLARE_THROW_SCOPE(vm); 6849 UNUSED_PARAM(throwScope); 6850 JSValue thisValue = state->thisValue(); 6851 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6852 if (UNLIKELY(!castedThis)) 6853 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithUnsignedLongSequence"); 6854 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6954 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceCaller>(state, "methodWithUnsignedLongSequence"); 6955 } 6956 6957 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6958 { 6959 UNUSED_PARAM(state); 6960 UNUSED_PARAM(throwScope); 6855 6961 auto& impl = castedThis->wrapped(); 6856 6962 if (UNLIKELY(state->argumentCount() < 1)) … … 6862 6968 } 6863 6969 6970 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionStringArrayFunctionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6971 6864 6972 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(ExecState* state) 6865 6973 { 6866 VM& vm = state->vm(); 6867 auto throwScope = DECLARE_THROW_SCOPE(vm); 6868 UNUSED_PARAM(throwScope); 6869 JSValue thisValue = state->thisValue(); 6870 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6871 if (UNLIKELY(!castedThis)) 6872 return throwThisTypeError(*state, throwScope, "TestObject", "stringArrayFunction"); 6873 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6974 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionStringArrayFunctionCaller>(state, "stringArrayFunction"); 6975 } 6976 6977 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionStringArrayFunctionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 6978 { 6979 UNUSED_PARAM(state); 6980 UNUSED_PARAM(throwScope); 6874 6981 auto& impl = castedThis->wrapped(); 6875 6982 if (UNLIKELY(state->argumentCount() < 1)) … … 6884 6991 } 6885 6992 6993 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionDomStringListFunctionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 6994 6886 6995 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(ExecState* state) 6887 6996 { 6888 VM& vm = state->vm(); 6889 auto throwScope = DECLARE_THROW_SCOPE(vm); 6890 UNUSED_PARAM(throwScope); 6891 JSValue thisValue = state->thisValue(); 6892 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6893 if (UNLIKELY(!castedThis)) 6894 return throwThisTypeError(*state, throwScope, "TestObject", "domStringListFunction"); 6895 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 6997 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionDomStringListFunctionCaller>(state, "domStringListFunction"); 6998 } 6999 7000 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionDomStringListFunctionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7001 { 7002 UNUSED_PARAM(state); 7003 UNUSED_PARAM(throwScope); 6896 7004 auto& impl = castedThis->wrapped(); 6897 7005 if (UNLIKELY(state->argumentCount() < 1)) … … 6907 7015 } 6908 7016 7017 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7018 6909 7019 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence(ExecState* state) 6910 7020 { 6911 VM& vm = state->vm(); 6912 auto throwScope = DECLARE_THROW_SCOPE(vm); 6913 UNUSED_PARAM(throwScope); 6914 JSValue thisValue = state->thisValue(); 6915 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6916 if (UNLIKELY(!castedThis)) 6917 return throwThisTypeError(*state, throwScope, "TestObject", "methodWithAndWithoutNullableSequence"); 6918 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7021 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceCaller>(state, "methodWithAndWithoutNullableSequence"); 7022 } 7023 7024 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7025 { 7026 UNUSED_PARAM(state); 7027 UNUSED_PARAM(throwScope); 6919 7028 auto& impl = castedThis->wrapped(); 6920 7029 if (UNLIKELY(state->argumentCount() < 2)) … … 6928 7037 } 6929 7038 7039 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionGetElementByIdCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7040 6930 7041 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetElementById(ExecState* state) 6931 7042 { 6932 VM& vm = state->vm(); 6933 auto throwScope = DECLARE_THROW_SCOPE(vm); 6934 UNUSED_PARAM(throwScope); 6935 JSValue thisValue = state->thisValue(); 6936 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6937 if (UNLIKELY(!castedThis)) 6938 return throwThisTypeError(*state, throwScope, "TestObject", "getElementById"); 6939 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7043 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionGetElementByIdCaller>(state, "getElementById"); 7044 } 7045 7046 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionGetElementByIdCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7047 { 7048 UNUSED_PARAM(state); 7049 UNUSED_PARAM(throwScope); 6940 7050 auto& impl = castedThis->wrapped(); 6941 7051 if (UNLIKELY(state->argumentCount() < 1)) … … 6947 7057 } 6948 7058 7059 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionGetSVGDocumentCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7060 6949 7061 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState* state) 6950 7062 { 6951 VM& vm = state->vm(); 6952 auto throwScope = DECLARE_THROW_SCOPE(vm); 6953 UNUSED_PARAM(throwScope); 6954 JSValue thisValue = state->thisValue(); 6955 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6956 if (UNLIKELY(!castedThis)) 6957 return throwThisTypeError(*state, throwScope, "TestObject", "getSVGDocument"); 6958 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7063 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionGetSVGDocumentCaller>(state, "getSVGDocument"); 7064 } 7065 7066 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionGetSVGDocumentCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7067 { 7068 UNUSED_PARAM(state); 7069 UNUSED_PARAM(throwScope); 6959 7070 auto& impl = castedThis->wrapped(); 6960 7071 ExceptionCode ec = 0; … … 6967 7078 } 6968 7079 7080 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7081 6969 7082 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* state) 6970 7083 { 6971 VM& vm = state->vm(); 6972 auto throwScope = DECLARE_THROW_SCOPE(vm); 6973 UNUSED_PARAM(throwScope); 6974 JSValue thisValue = state->thisValue(); 6975 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6976 if (UNLIKELY(!castedThis)) 6977 return throwThisTypeError(*state, throwScope, "TestObject", "convert1"); 6978 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7084 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConvert1Caller>(state, "convert1"); 7085 } 7086 7087 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7088 { 7089 UNUSED_PARAM(state); 7090 UNUSED_PARAM(throwScope); 6979 7091 auto& impl = castedThis->wrapped(); 6980 7092 if (UNLIKELY(state->argumentCount() < 1)) … … 6987 7099 } 6988 7100 7101 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7102 6989 7103 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* state) 6990 7104 { 6991 VM& vm = state->vm(); 6992 auto throwScope = DECLARE_THROW_SCOPE(vm); 6993 UNUSED_PARAM(throwScope); 6994 JSValue thisValue = state->thisValue(); 6995 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 6996 if (UNLIKELY(!castedThis)) 6997 return throwThisTypeError(*state, throwScope, "TestObject", "convert2"); 6998 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7105 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConvert2Caller>(state, "convert2"); 7106 } 7107 7108 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7109 { 7110 UNUSED_PARAM(state); 7111 UNUSED_PARAM(throwScope); 6999 7112 auto& impl = castedThis->wrapped(); 7000 7113 if (UNLIKELY(state->argumentCount() < 1)) … … 7010 7123 } 7011 7124 7125 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert3Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7126 7012 7127 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert3(ExecState* state) 7013 7128 { 7014 VM& vm = state->vm(); 7015 auto throwScope = DECLARE_THROW_SCOPE(vm); 7016 UNUSED_PARAM(throwScope); 7017 JSValue thisValue = state->thisValue(); 7018 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7019 if (UNLIKELY(!castedThis)) 7020 return throwThisTypeError(*state, throwScope, "TestObject", "convert3"); 7021 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7129 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConvert3Caller>(state, "convert3"); 7130 } 7131 7132 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert3Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7133 { 7134 UNUSED_PARAM(state); 7135 UNUSED_PARAM(throwScope); 7022 7136 auto& impl = castedThis->wrapped(); 7023 7137 if (UNLIKELY(state->argumentCount() < 1)) … … 7029 7143 } 7030 7144 7145 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert4Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7146 7031 7147 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* state) 7032 7148 { 7033 VM& vm = state->vm(); 7034 auto throwScope = DECLARE_THROW_SCOPE(vm); 7035 UNUSED_PARAM(throwScope); 7036 JSValue thisValue = state->thisValue(); 7037 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7038 if (UNLIKELY(!castedThis)) 7039 return throwThisTypeError(*state, throwScope, "TestObject", "convert4"); 7040 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7149 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConvert4Caller>(state, "convert4"); 7150 } 7151 7152 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConvert4Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7153 { 7154 UNUSED_PARAM(state); 7155 UNUSED_PARAM(throwScope); 7041 7156 auto& impl = castedThis->wrapped(); 7042 7157 if (UNLIKELY(state->argumentCount() < 1)) … … 7048 7163 } 7049 7164 7165 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMutablePointFunctionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7166 7050 7167 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(ExecState* state) 7051 7168 { 7052 VM& vm = state->vm(); 7053 auto throwScope = DECLARE_THROW_SCOPE(vm); 7054 UNUSED_PARAM(throwScope); 7055 JSValue thisValue = state->thisValue(); 7056 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7057 if (UNLIKELY(!castedThis)) 7058 return throwThisTypeError(*state, throwScope, "TestObject", "mutablePointFunction"); 7059 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7169 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionMutablePointFunctionCaller>(state, "mutablePointFunction"); 7170 } 7171 7172 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMutablePointFunctionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7173 { 7174 UNUSED_PARAM(state); 7175 UNUSED_PARAM(throwScope); 7060 7176 auto& impl = castedThis->wrapped(); 7061 7177 JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.mutablePointFunction())); … … 7063 7179 } 7064 7180 7181 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionImmutablePointFunctionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7182 7065 7183 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(ExecState* state) 7066 7184 { 7067 VM& vm = state->vm(); 7068 auto throwScope = DECLARE_THROW_SCOPE(vm); 7069 UNUSED_PARAM(throwScope); 7070 JSValue thisValue = state->thisValue(); 7071 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7072 if (UNLIKELY(!castedThis)) 7073 return throwThisTypeError(*state, throwScope, "TestObject", "immutablePointFunction"); 7074 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7185 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionImmutablePointFunctionCaller>(state, "immutablePointFunction"); 7186 } 7187 7188 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionImmutablePointFunctionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7189 { 7190 UNUSED_PARAM(state); 7191 UNUSED_PARAM(throwScope); 7075 7192 auto& impl = castedThis->wrapped(); 7076 7193 JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())); … … 7078 7195 } 7079 7196 7197 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOrangeCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7198 7080 7199 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* state) 7081 7200 { 7082 VM& vm = state->vm(); 7083 auto throwScope = DECLARE_THROW_SCOPE(vm); 7084 UNUSED_PARAM(throwScope); 7085 JSValue thisValue = state->thisValue(); 7086 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7087 if (UNLIKELY(!castedThis)) 7088 return throwThisTypeError(*state, throwScope, "TestObject", "orange"); 7089 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7201 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOrangeCaller>(state, "orange"); 7202 } 7203 7204 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOrangeCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7205 { 7206 UNUSED_PARAM(state); 7207 UNUSED_PARAM(throwScope); 7090 7208 auto& impl = castedThis->wrapped(); 7091 7209 impl.banana(); … … 7093 7211 } 7094 7212 7213 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicStringMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7214 7095 7215 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(ExecState* state) 7096 7216 { 7097 VM& vm = state->vm(); 7098 auto throwScope = DECLARE_THROW_SCOPE(vm); 7099 UNUSED_PARAM(throwScope); 7100 JSValue thisValue = state->thisValue(); 7101 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7102 if (UNLIKELY(!castedThis)) 7103 return throwThisTypeError(*state, throwScope, "TestObject", "variadicStringMethod"); 7104 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7217 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionVariadicStringMethodCaller>(state, "variadicStringMethod"); 7218 } 7219 7220 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicStringMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7221 { 7222 UNUSED_PARAM(state); 7223 UNUSED_PARAM(throwScope); 7105 7224 auto& impl = castedThis->wrapped(); 7106 7225 if (UNLIKELY(state->argumentCount() < 1)) … … 7114 7233 } 7115 7234 7235 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicDoubleMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7236 7116 7237 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(ExecState* state) 7117 7238 { 7118 VM& vm = state->vm(); 7119 auto throwScope = DECLARE_THROW_SCOPE(vm); 7120 UNUSED_PARAM(throwScope); 7121 JSValue thisValue = state->thisValue(); 7122 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7123 if (UNLIKELY(!castedThis)) 7124 return throwThisTypeError(*state, throwScope, "TestObject", "variadicDoubleMethod"); 7125 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7239 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionVariadicDoubleMethodCaller>(state, "variadicDoubleMethod"); 7240 } 7241 7242 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicDoubleMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7243 { 7244 UNUSED_PARAM(state); 7245 UNUSED_PARAM(throwScope); 7126 7246 auto& impl = castedThis->wrapped(); 7127 7247 if (UNLIKELY(state->argumentCount() < 1)) … … 7135 7255 } 7136 7256 7257 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicNodeMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7258 7137 7259 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecState* state) 7138 7260 { 7139 VM& vm = state->vm(); 7140 auto throwScope = DECLARE_THROW_SCOPE(vm); 7141 UNUSED_PARAM(throwScope); 7142 JSValue thisValue = state->thisValue(); 7143 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7144 if (UNLIKELY(!castedThis)) 7145 return throwThisTypeError(*state, throwScope, "TestObject", "variadicNodeMethod"); 7146 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7261 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionVariadicNodeMethodCaller>(state, "variadicNodeMethod"); 7262 } 7263 7264 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicNodeMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7265 { 7266 UNUSED_PARAM(state); 7267 UNUSED_PARAM(throwScope); 7147 7268 auto& impl = castedThis->wrapped(); 7148 7269 if (UNLIKELY(state->argumentCount() < 1)) … … 7157 7278 } 7158 7279 7280 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicUnionMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7281 7159 7282 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicUnionMethod(ExecState* state) 7160 7283 { 7161 VM& vm = state->vm(); 7162 auto throwScope = DECLARE_THROW_SCOPE(vm); 7163 UNUSED_PARAM(throwScope); 7164 JSValue thisValue = state->thisValue(); 7165 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7166 if (UNLIKELY(!castedThis)) 7167 return throwThisTypeError(*state, throwScope, "TestObject", "variadicUnionMethod"); 7168 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7284 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionVariadicUnionMethodCaller>(state, "variadicUnionMethod"); 7285 } 7286 7287 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVariadicUnionMethodCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7288 { 7289 UNUSED_PARAM(state); 7290 UNUSED_PARAM(throwScope); 7169 7291 auto& impl = castedThis->wrapped(); 7170 7292 if (UNLIKELY(state->argumentCount() < 1)) … … 7178 7300 } 7179 7301 7302 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionAnyCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7303 7180 7304 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(ExecState* state) 7181 7305 { 7182 VM& vm = state->vm(); 7183 auto throwScope = DECLARE_THROW_SCOPE(vm); 7184 UNUSED_PARAM(throwScope); 7185 JSValue thisValue = state->thisValue(); 7186 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7187 if (UNLIKELY(!castedThis)) 7188 return throwThisTypeError(*state, throwScope, "TestObject", "any"); 7189 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7306 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionAnyCaller>(state, "any"); 7307 } 7308 7309 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionAnyCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7310 { 7311 UNUSED_PARAM(state); 7312 UNUSED_PARAM(throwScope); 7190 7313 auto& impl = castedThis->wrapped(); 7191 7314 if (UNLIKELY(state->argumentCount() < 2)) … … 7199 7322 } 7200 7323 7324 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionCaller(JSC::ExecState*, JSTestObj*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 7325 7201 7326 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState*, Ref<DeferredPromise>&&); 7202 7327 … … 7209 7334 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState* state, Ref<DeferredPromise>&& promise) 7210 7335 { 7211 VM& vm = state->vm(); 7212 auto throwScope = DECLARE_THROW_SCOPE(vm); 7213 UNUSED_PARAM(throwScope); 7214 JSValue thisValue = state->thisValue(); 7215 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7216 if (UNLIKELY(!castedThis)) 7217 return throwThisTypeError(*state, throwScope, "TestObject", "testPromiseFunction"); 7218 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7336 return BindingCaller<JSTestObj>::callPromiseOperation<jsTestObjPrototypeFunctionTestPromiseFunctionCaller>(state, WTFMove(promise), "testPromiseFunction"); 7337 } 7338 7339 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionCaller(JSC::ExecState* state, JSTestObj* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 7340 { 7341 UNUSED_PARAM(state); 7342 UNUSED_PARAM(throwScope); 7219 7343 auto& impl = castedThis->wrapped(); 7220 7344 impl.testPromiseFunction(WTFMove(promise)); 7221 7345 return JSValue::encode(jsUndefined()); 7222 7346 } 7347 7348 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentCaller(JSC::ExecState*, JSTestObj*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 7223 7349 7224 7350 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState*, Ref<DeferredPromise>&&); … … 7232 7358 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState* state, Ref<DeferredPromise>&& promise) 7233 7359 { 7234 VM& vm = state->vm(); 7235 auto throwScope = DECLARE_THROW_SCOPE(vm); 7236 UNUSED_PARAM(throwScope); 7237 JSValue thisValue = state->thisValue(); 7238 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7239 if (UNLIKELY(!castedThis)) 7240 return throwThisTypeError(*state, throwScope, "TestObject", "testPromiseFunctionWithFloatArgument"); 7241 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7360 return BindingCaller<JSTestObj>::callPromiseOperation<jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentCaller>(state, WTFMove(promise), "testPromiseFunctionWithFloatArgument"); 7361 } 7362 7363 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentCaller(JSC::ExecState* state, JSTestObj* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 7364 { 7365 UNUSED_PARAM(state); 7366 UNUSED_PARAM(throwScope); 7242 7367 auto& impl = castedThis->wrapped(); 7243 7368 if (UNLIKELY(state->argumentCount() < 1)) … … 7249 7374 } 7250 7375 7376 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionCaller(JSC::ExecState*, JSTestObj*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 7377 7251 7378 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState*, Ref<DeferredPromise>&&); 7252 7379 … … 7259 7386 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState* state, Ref<DeferredPromise>&& promise) 7260 7387 { 7261 VM& vm = state->vm(); 7262 auto throwScope = DECLARE_THROW_SCOPE(vm); 7263 UNUSED_PARAM(throwScope); 7264 JSValue thisValue = state->thisValue(); 7265 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7266 if (UNLIKELY(!castedThis)) 7267 return throwThisTypeError(*state, throwScope, "TestObject", "testPromiseFunctionWithException"); 7268 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7388 return BindingCaller<JSTestObj>::callPromiseOperation<jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionCaller>(state, WTFMove(promise), "testPromiseFunctionWithException"); 7389 } 7390 7391 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionCaller(JSC::ExecState* state, JSTestObj* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 7392 { 7393 UNUSED_PARAM(state); 7394 UNUSED_PARAM(throwScope); 7269 7395 auto& impl = castedThis->wrapped(); 7270 7396 ExceptionCode ec = 0; … … 7274 7400 } 7275 7401 7402 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentCaller(JSC::ExecState*, JSTestObj*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 7403 7276 7404 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState*, Ref<DeferredPromise>&&); 7277 7405 … … 7284 7412 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState* state, Ref<DeferredPromise>&& promise) 7285 7413 { 7286 VM& vm = state->vm(); 7287 auto throwScope = DECLARE_THROW_SCOPE(vm); 7288 UNUSED_PARAM(throwScope); 7289 JSValue thisValue = state->thisValue(); 7290 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7291 if (UNLIKELY(!castedThis)) 7292 return throwThisTypeError(*state, throwScope, "TestObject", "testPromiseFunctionWithOptionalIntArgument"); 7293 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7414 return BindingCaller<JSTestObj>::callPromiseOperation<jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentCaller>(state, WTFMove(promise), "testPromiseFunctionWithOptionalIntArgument"); 7415 } 7416 7417 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentCaller(JSC::ExecState* state, JSTestObj* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 7418 { 7419 UNUSED_PARAM(state); 7420 UNUSED_PARAM(throwScope); 7294 7421 auto& impl = castedThis->wrapped(); 7295 7422 auto a = state->argument(0).isUndefined() ? Optional<int32_t>() : convert<IDLLong>(*state, state->uncheckedArgument(0), NormalConversion); … … 7298 7425 return JSValue::encode(jsUndefined()); 7299 7426 } 7427 7428 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Caller(JSC::ExecState*, JSTestObj*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 7300 7429 7301 7430 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise(ExecState*, Ref<DeferredPromise>&&); … … 7309 7438 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise(ExecState* state, Ref<DeferredPromise>&& promise) 7310 7439 { 7311 VM& vm = state->vm(); 7312 auto throwScope = DECLARE_THROW_SCOPE(vm); 7313 UNUSED_PARAM(throwScope); 7314 JSValue thisValue = state->thisValue(); 7315 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7316 if (UNLIKELY(!castedThis)) 7317 return throwThisTypeError(*state, throwScope, "TestObject", "testPromiseOverloadedFunction"); 7318 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7440 return BindingCaller<JSTestObj>::callPromiseOperation<jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Caller>(state, WTFMove(promise), "testPromiseOverloadedFunction"); 7441 } 7442 7443 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Caller(JSC::ExecState* state, JSTestObj* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 7444 { 7445 UNUSED_PARAM(state); 7446 UNUSED_PARAM(throwScope); 7319 7447 auto& impl = castedThis->wrapped(); 7320 7448 if (UNLIKELY(state->argumentCount() < 1)) … … 7326 7454 } 7327 7455 7456 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Caller(JSC::ExecState*, JSTestObj*, Ref<DeferredPromise>&&, JSC::ThrowScope&); 7457 7328 7458 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise(ExecState*, Ref<DeferredPromise>&&); 7329 7459 … … 7336 7466 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise(ExecState* state, Ref<DeferredPromise>&& promise) 7337 7467 { 7338 VM& vm = state->vm(); 7339 auto throwScope = DECLARE_THROW_SCOPE(vm); 7340 UNUSED_PARAM(throwScope); 7341 JSValue thisValue = state->thisValue(); 7342 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7343 if (UNLIKELY(!castedThis)) 7344 return throwThisTypeError(*state, throwScope, "TestObject", "testPromiseOverloadedFunction"); 7345 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7468 return BindingCaller<JSTestObj>::callPromiseOperation<jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Caller>(state, WTFMove(promise), "testPromiseOverloadedFunction"); 7469 } 7470 7471 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Caller(JSC::ExecState* state, JSTestObj* castedThis, Ref<DeferredPromise>&& promise, JSC::ThrowScope& throwScope) 7472 { 7473 UNUSED_PARAM(state); 7474 UNUSED_PARAM(throwScope); 7346 7475 auto& impl = castedThis->wrapped(); 7347 7476 if (UNLIKELY(state->argumentCount() < 1)) … … 7407 7536 } 7408 7537 7538 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestCustomPromiseFunctionCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7539 7409 7540 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestCustomPromiseFunction(ExecState* state) 7410 7541 { 7411 VM& vm = state->vm(); 7412 auto throwScope = DECLARE_THROW_SCOPE(vm); 7413 UNUSED_PARAM(throwScope); 7414 JSValue thisValue = state->thisValue(); 7415 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7416 if (UNLIKELY(!castedThis)) 7417 return createRejectedPromiseWithTypeError(*state, makeThisTypeErrorMessage("TestObject", "testCustomPromiseFunction")); 7418 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7542 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionTestCustomPromiseFunctionCaller, CastedThisErrorBehavior::RejectPromise>(state, "testCustomPromiseFunction"); 7543 } 7544 7545 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionTestCustomPromiseFunctionCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7546 { 7547 UNUSED_PARAM(state); 7548 UNUSED_PARAM(throwScope); 7419 7549 return JSValue::encode(castedThis->testCustomPromiseFunction(*state)); 7420 7550 } 7421 7551 7422 7552 #if ENABLE(CONDITION1) 7553 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7554 7423 7555 static inline EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload1(ExecState* state) 7424 7556 { 7425 VM& vm = state->vm(); 7426 auto throwScope = DECLARE_THROW_SCOPE(vm); 7427 UNUSED_PARAM(throwScope); 7428 JSValue thisValue = state->thisValue(); 7429 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7430 if (UNLIKELY(!castedThis)) 7431 return throwThisTypeError(*state, throwScope, "TestObject", "conditionalOverload"); 7432 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7557 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConditionalOverload1Caller>(state, "conditionalOverload"); 7558 } 7559 7560 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7561 { 7562 UNUSED_PARAM(state); 7563 UNUSED_PARAM(throwScope); 7433 7564 auto& impl = castedThis->wrapped(); 7434 7565 if (UNLIKELY(state->argumentCount() < 1)) … … 7443 7574 7444 7575 #if ENABLE(CONDITION2) 7576 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7577 7445 7578 static inline EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload2(ExecState* state) 7446 7579 { 7447 VM& vm = state->vm(); 7448 auto throwScope = DECLARE_THROW_SCOPE(vm); 7449 UNUSED_PARAM(throwScope); 7450 JSValue thisValue = state->thisValue(); 7451 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7452 if (UNLIKELY(!castedThis)) 7453 return throwThisTypeError(*state, throwScope, "TestObject", "conditionalOverload"); 7454 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7580 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionConditionalOverload2Caller>(state, "conditionalOverload"); 7581 } 7582 7583 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7584 { 7585 UNUSED_PARAM(state); 7586 UNUSED_PARAM(throwScope); 7455 7587 auto& impl = castedThis->wrapped(); 7456 7588 if (UNLIKELY(state->argumentCount() < 1)) … … 7485 7617 #endif 7486 7618 7619 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionSingleConditionalOverload1Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7620 7487 7621 static inline EncodedJSValue jsTestObjPrototypeFunctionSingleConditionalOverload1(ExecState* state) 7488 7622 { 7489 VM& vm = state->vm(); 7490 auto throwScope = DECLARE_THROW_SCOPE(vm); 7491 UNUSED_PARAM(throwScope); 7492 JSValue thisValue = state->thisValue(); 7493 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7494 if (UNLIKELY(!castedThis)) 7495 return throwThisTypeError(*state, throwScope, "TestObject", "singleConditionalOverload"); 7496 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7623 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionSingleConditionalOverload1Caller>(state, "singleConditionalOverload"); 7624 } 7625 7626 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionSingleConditionalOverload1Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7627 { 7628 UNUSED_PARAM(state); 7629 UNUSED_PARAM(throwScope); 7497 7630 auto& impl = castedThis->wrapped(); 7498 7631 if (UNLIKELY(state->argumentCount() < 1)) … … 7505 7638 7506 7639 #if ENABLE(CONDITION) 7640 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionSingleConditionalOverload2Caller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7641 7507 7642 static inline EncodedJSValue jsTestObjPrototypeFunctionSingleConditionalOverload2(ExecState* state) 7508 7643 { 7509 VM& vm = state->vm(); 7510 auto throwScope = DECLARE_THROW_SCOPE(vm); 7511 UNUSED_PARAM(throwScope); 7512 JSValue thisValue = state->thisValue(); 7513 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7514 if (UNLIKELY(!castedThis)) 7515 return throwThisTypeError(*state, throwScope, "TestObject", "singleConditionalOverload"); 7516 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7644 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionSingleConditionalOverload2Caller>(state, "singleConditionalOverload"); 7645 } 7646 7647 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionSingleConditionalOverload2Caller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7648 { 7649 UNUSED_PARAM(state); 7650 UNUSED_PARAM(throwScope); 7517 7651 auto& impl = castedThis->wrapped(); 7518 7652 if (UNLIKELY(state->argumentCount() < 1)) … … 7543 7677 } 7544 7678 7679 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionAttachShadowRootCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7680 7545 7681 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAttachShadowRoot(ExecState* state) 7546 7682 { 7547 VM& vm = state->vm(); 7548 auto throwScope = DECLARE_THROW_SCOPE(vm); 7549 UNUSED_PARAM(throwScope); 7550 JSValue thisValue = state->thisValue(); 7551 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7552 if (UNLIKELY(!castedThis)) 7553 return throwThisTypeError(*state, throwScope, "TestObject", "attachShadowRoot"); 7554 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7683 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionAttachShadowRootCaller>(state, "attachShadowRoot"); 7684 } 7685 7686 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionAttachShadowRootCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7687 { 7688 UNUSED_PARAM(state); 7689 UNUSED_PARAM(throwScope); 7555 7690 auto& impl = castedThis->wrapped(); 7556 7691 if (UNLIKELY(state->argumentCount() < 1)) … … 7562 7697 } 7563 7698 7699 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7700 7564 7701 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter(ExecState* state) 7565 7702 { 7566 VM& vm = state->vm(); 7567 auto throwScope = DECLARE_THROW_SCOPE(vm); 7568 UNUSED_PARAM(throwScope); 7569 JSValue thisValue = state->thisValue(); 7570 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7571 if (UNLIKELY(!castedThis)) 7572 return throwThisTypeError(*state, throwScope, "TestObject", "operationWithExternalDictionaryParameter"); 7573 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7703 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterCaller>(state, "operationWithExternalDictionaryParameter"); 7704 } 7705 7706 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7707 { 7708 UNUSED_PARAM(state); 7709 UNUSED_PARAM(throwScope); 7574 7710 auto& impl = castedThis->wrapped(); 7575 7711 if (UNLIKELY(state->argumentCount() < 1)) … … 7581 7717 } 7582 7718 7719 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionToStringCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 7720 7583 7721 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToString(ExecState* state) 7584 7722 { 7585 VM& vm = state->vm(); 7586 auto throwScope = DECLARE_THROW_SCOPE(vm); 7587 UNUSED_PARAM(throwScope); 7588 JSValue thisValue = state->thisValue(); 7589 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 7590 if (UNLIKELY(!castedThis)) 7591 return throwThisTypeError(*state, throwScope, "TestObject", "toString"); 7592 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 7723 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionToStringCaller>(state, "toString"); 7724 } 7725 7726 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionToStringCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 7727 { 7728 UNUSED_PARAM(state); 7729 UNUSED_PARAM(throwScope); 7593 7730 auto& impl = castedThis->wrapped(); 7594 7731 JSValue result = jsStringWithCache(state, impl.stringifierAttribute()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r207150 r207192 54 54 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); 55 55 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 56 static JSTestObj* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);57 56 mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute1; 58 57 mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute2; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r206723 r207192 157 157 } 158 158 159 template<> inline JSTestOverrideBuiltins* BindingCaller<JSTestOverrideBuiltins>::castForOperation(ExecState& state) 160 { 161 return jsDynamicCast<JSTestOverrideBuiltins*>(state.thisValue()); 162 } 163 159 164 EncodedJSValue jsTestOverrideBuiltinsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) 160 165 { … … 197 202 } 198 203 204 static inline JSC::EncodedJSValue jsTestOverrideBuiltinsPrototypeFunctionNamedItemCaller(JSC::ExecState*, JSTestOverrideBuiltins*, JSC::ThrowScope&); 205 199 206 EncodedJSValue JSC_HOST_CALL jsTestOverrideBuiltinsPrototypeFunctionNamedItem(ExecState* state) 200 207 { 201 VM& vm = state->vm(); 202 auto throwScope = DECLARE_THROW_SCOPE(vm); 208 return BindingCaller<JSTestOverrideBuiltins>::callOperation<jsTestOverrideBuiltinsPrototypeFunctionNamedItemCaller>(state, "namedItem"); 209 } 210 211 static inline JSC::EncodedJSValue jsTestOverrideBuiltinsPrototypeFunctionNamedItemCaller(JSC::ExecState* state, JSTestOverrideBuiltins* castedThis, JSC::ThrowScope& throwScope) 212 { 213 UNUSED_PARAM(state); 203 214 UNUSED_PARAM(throwScope); 204 JSValue thisValue = state->thisValue();205 auto castedThis = jsDynamicCast<JSTestOverrideBuiltins*>(thisValue);206 if (UNLIKELY(!castedThis))207 return throwThisTypeError(*state, throwScope, "TestOverrideBuiltins", "namedItem");208 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestOverrideBuiltins::info());209 215 auto& impl = castedThis->wrapped(); 210 216 if (UNLIKELY(state->argumentCount() < 1)) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r206992 r207192 133 133 } 134 134 135 inline JSTestSerializedScriptValueInterface* JSTestSerializedScriptValueInterface::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)135 template<> inline JSTestSerializedScriptValueInterface* BindingCaller<JSTestSerializedScriptValueInterface>::castForAttribute(ExecState&, EncodedJSValue thisValue) 136 136 { 137 137 return jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
r206953 r207192 52 52 53 53 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 54 static JSTestSerializedScriptValueInterface* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);55 54 mutable JSC::WriteBarrier<JSC::Unknown> m_cachedValue; 56 55 mutable JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r207150 r207192 217 217 } 218 218 219 inline JSTestTypedefs* JSTestTypedefs::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)219 template<> inline JSTestTypedefs* BindingCaller<JSTestTypedefs>::castForAttribute(ExecState&, EncodedJSValue thisValue) 220 220 { 221 221 return jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 222 } 223 224 template<> inline JSTestTypedefs* BindingCaller<JSTestTypedefs>::castForOperation(ExecState& state) 225 { 226 return jsDynamicCast<JSTestTypedefs*>(state.thisValue()); 222 227 } 223 228 … … 483 488 } 484 489 490 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 491 485 492 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* state) 486 493 { 487 VM& vm = state->vm(); 488 auto throwScope = DECLARE_THROW_SCOPE(vm); 489 UNUSED_PARAM(throwScope); 490 JSValue thisValue = state->thisValue(); 491 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 492 if (UNLIKELY(!castedThis)) 493 return throwThisTypeError(*state, throwScope, "TestTypedefs", "func"); 494 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 494 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionFuncCaller>(state, "func"); 495 } 496 497 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 498 { 499 UNUSED_PARAM(state); 500 UNUSED_PARAM(throwScope); 495 501 auto& impl = castedThis->wrapped(); 496 502 auto x = state->argument(0).isUndefined() ? Vector<int32_t>() : convert<IDLSequence<IDLLong>>(*state, state->uncheckedArgument(0)); … … 500 506 } 501 507 508 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSetShadowCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 509 502 510 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState* state) 503 511 { 504 VM& vm = state->vm(); 505 auto throwScope = DECLARE_THROW_SCOPE(vm); 506 UNUSED_PARAM(throwScope); 507 JSValue thisValue = state->thisValue(); 508 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 509 if (UNLIKELY(!castedThis)) 510 return throwThisTypeError(*state, throwScope, "TestTypedefs", "setShadow"); 511 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 512 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionSetShadowCaller>(state, "setShadow"); 513 } 514 515 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSetShadowCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 516 { 517 UNUSED_PARAM(state); 518 UNUSED_PARAM(throwScope); 512 519 auto& impl = castedThis->wrapped(); 513 520 if (UNLIKELY(state->argumentCount() < 3)) … … 527 534 } 528 535 536 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithSequenceArgCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 537 529 538 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(ExecState* state) 530 539 { 531 VM& vm = state->vm(); 532 auto throwScope = DECLARE_THROW_SCOPE(vm); 533 UNUSED_PARAM(throwScope); 534 JSValue thisValue = state->thisValue(); 535 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 536 if (UNLIKELY(!castedThis)) 537 return throwThisTypeError(*state, throwScope, "TestTypedefs", "methodWithSequenceArg"); 538 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 540 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionMethodWithSequenceArgCaller>(state, "methodWithSequenceArg"); 541 } 542 543 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithSequenceArgCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 544 { 545 UNUSED_PARAM(state); 546 UNUSED_PARAM(throwScope); 539 547 auto& impl = castedThis->wrapped(); 540 548 if (UNLIKELY(state->argumentCount() < 1)) … … 546 554 } 547 555 556 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceArgCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 557 548 558 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceArg(ExecState* state) 549 559 { 550 VM& vm = state->vm(); 551 auto throwScope = DECLARE_THROW_SCOPE(vm); 552 UNUSED_PARAM(throwScope); 553 JSValue thisValue = state->thisValue(); 554 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 555 if (UNLIKELY(!castedThis)) 556 return throwThisTypeError(*state, throwScope, "TestTypedefs", "nullableSequenceArg"); 557 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 560 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionNullableSequenceArgCaller>(state, "nullableSequenceArg"); 561 } 562 563 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceArgCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 564 { 565 UNUSED_PARAM(state); 566 UNUSED_PARAM(throwScope); 558 567 auto& impl = castedThis->wrapped(); 559 568 if (UNLIKELY(state->argumentCount() < 1)) … … 565 574 } 566 575 576 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 577 567 578 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(ExecState* state) 568 579 { 569 VM& vm = state->vm(); 570 auto throwScope = DECLARE_THROW_SCOPE(vm); 571 UNUSED_PARAM(throwScope); 572 JSValue thisValue = state->thisValue(); 573 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 574 if (UNLIKELY(!castedThis)) 575 return throwThisTypeError(*state, throwScope, "TestTypedefs", "sequenceOfNullablesArg"); 576 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 580 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgCaller>(state, "sequenceOfNullablesArg"); 581 } 582 583 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 584 { 585 UNUSED_PARAM(state); 586 UNUSED_PARAM(throwScope); 577 587 auto& impl = castedThis->wrapped(); 578 588 if (UNLIKELY(state->argumentCount() < 1)) … … 584 594 } 585 595 596 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 597 586 598 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(ExecState* state) 587 599 { 588 VM& vm = state->vm(); 589 auto throwScope = DECLARE_THROW_SCOPE(vm); 590 UNUSED_PARAM(throwScope); 591 JSValue thisValue = state->thisValue(); 592 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 593 if (UNLIKELY(!castedThis)) 594 return throwThisTypeError(*state, throwScope, "TestTypedefs", "nullableSequenceOfNullablesArg"); 595 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 600 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgCaller>(state, "nullableSequenceOfNullablesArg"); 601 } 602 603 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 604 { 605 UNUSED_PARAM(state); 606 UNUSED_PARAM(throwScope); 596 607 auto& impl = castedThis->wrapped(); 597 608 if (UNLIKELY(state->argumentCount() < 1)) … … 603 614 } 604 615 616 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionUnionArgCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 617 605 618 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(ExecState* state) 606 619 { 607 VM& vm = state->vm(); 608 auto throwScope = DECLARE_THROW_SCOPE(vm); 609 UNUSED_PARAM(throwScope); 610 JSValue thisValue = state->thisValue(); 611 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 612 if (UNLIKELY(!castedThis)) 613 return throwThisTypeError(*state, throwScope, "TestTypedefs", "unionArg"); 614 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 620 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionUnionArgCaller>(state, "unionArg"); 621 } 622 623 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionUnionArgCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 624 { 625 UNUSED_PARAM(state); 626 UNUSED_PARAM(throwScope); 615 627 auto& impl = castedThis->wrapped(); 616 628 if (UNLIKELY(state->argumentCount() < 1)) … … 622 634 } 623 635 636 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 637 624 638 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecState* state) 625 639 { 626 VM& vm = state->vm(); 627 auto throwScope = DECLARE_THROW_SCOPE(vm); 628 UNUSED_PARAM(throwScope); 629 JSValue thisValue = state->thisValue(); 630 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 631 if (UNLIKELY(!castedThis)) 632 return throwThisTypeError(*state, throwScope, "TestTypedefs", "funcWithClamp"); 633 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 640 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionFuncWithClampCaller>(state, "funcWithClamp"); 641 } 642 643 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 644 { 645 UNUSED_PARAM(state); 646 UNUSED_PARAM(throwScope); 634 647 auto& impl = castedThis->wrapped(); 635 648 if (UNLIKELY(state->argumentCount() < 1)) … … 643 656 } 644 657 658 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionImmutablePointFunctionCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 659 645 660 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* state) 646 661 { 647 VM& vm = state->vm(); 648 auto throwScope = DECLARE_THROW_SCOPE(vm); 649 UNUSED_PARAM(throwScope); 650 JSValue thisValue = state->thisValue(); 651 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 652 if (UNLIKELY(!castedThis)) 653 return throwThisTypeError(*state, throwScope, "TestTypedefs", "immutablePointFunction"); 654 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 662 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionImmutablePointFunctionCaller>(state, "immutablePointFunction"); 663 } 664 665 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionImmutablePointFunctionCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 666 { 667 UNUSED_PARAM(state); 668 UNUSED_PARAM(throwScope); 655 669 auto& impl = castedThis->wrapped(); 656 670 JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())); … … 658 672 } 659 673 674 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunctionCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 675 660 676 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(ExecState* state) 661 677 { 662 VM& vm = state->vm(); 663 auto throwScope = DECLARE_THROW_SCOPE(vm); 664 UNUSED_PARAM(throwScope); 665 JSValue thisValue = state->thisValue(); 666 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 667 if (UNLIKELY(!castedThis)) 668 return throwThisTypeError(*state, throwScope, "TestTypedefs", "stringSequenceFunction"); 669 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 678 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionStringSequenceFunctionCaller>(state, "stringSequenceFunction"); 679 } 680 681 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunctionCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 682 { 683 UNUSED_PARAM(state); 684 UNUSED_PARAM(throwScope); 670 685 auto& impl = castedThis->wrapped(); 671 686 if (UNLIKELY(state->argumentCount() < 1)) … … 680 695 } 681 696 697 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunction2Caller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 698 682 699 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction2(ExecState* state) 683 700 { 684 VM& vm = state->vm(); 685 auto throwScope = DECLARE_THROW_SCOPE(vm); 686 UNUSED_PARAM(throwScope); 687 JSValue thisValue = state->thisValue(); 688 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 689 if (UNLIKELY(!castedThis)) 690 return throwThisTypeError(*state, throwScope, "TestTypedefs", "stringSequenceFunction2"); 691 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 701 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionStringSequenceFunction2Caller>(state, "stringSequenceFunction2"); 702 } 703 704 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunction2Caller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 705 { 706 UNUSED_PARAM(state); 707 UNUSED_PARAM(throwScope); 692 708 auto& impl = castedThis->wrapped(); 693 709 if (UNLIKELY(state->argumentCount() < 1)) … … 702 718 } 703 719 720 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 721 704 722 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(ExecState* state) 705 723 { 706 VM& vm = state->vm(); 707 auto throwScope = DECLARE_THROW_SCOPE(vm); 708 UNUSED_PARAM(throwScope); 709 JSValue thisValue = state->thisValue(); 710 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 711 if (UNLIKELY(!castedThis)) 712 return throwThisTypeError(*state, throwScope, "TestTypedefs", "callWithSequenceThatRequiresInclude"); 713 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 724 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeCaller>(state, "callWithSequenceThatRequiresInclude"); 725 } 726 727 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 728 { 729 UNUSED_PARAM(state); 730 UNUSED_PARAM(throwScope); 714 731 auto& impl = castedThis->wrapped(); 715 732 if (UNLIKELY(state->argumentCount() < 1)) … … 721 738 } 722 739 740 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithExceptionCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&); 741 723 742 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(ExecState* state) 724 743 { 725 VM& vm = state->vm(); 726 auto throwScope = DECLARE_THROW_SCOPE(vm); 727 UNUSED_PARAM(throwScope); 728 JSValue thisValue = state->thisValue(); 729 auto castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); 730 if (UNLIKELY(!castedThis)) 731 return throwThisTypeError(*state, throwScope, "TestTypedefs", "methodWithException"); 732 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); 744 return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionMethodWithExceptionCaller>(state, "methodWithException"); 745 } 746 747 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithExceptionCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope) 748 { 749 UNUSED_PARAM(state); 750 UNUSED_PARAM(throwScope); 733 751 auto& impl = castedThis->wrapped(); 734 752 ExceptionCode ec = 0; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
r206953 r207192 50 50 51 51 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 52 static JSTestTypedefs* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);53 52 public: 54 53 static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
r206992 r207192 133 133 } 134 134 135 inline JSattribute* JSattribute::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)135 template<> inline JSattribute* BindingCaller<JSattribute>::castForAttribute(ExecState&, EncodedJSValue thisValue) 136 136 { 137 137 return jsDynamicCast<JSattribute*>(JSValue::decode(thisValue)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h
r206953 r207192 51 51 52 52 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); 53 static JSattribute* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);54 53 public: 55 54 static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
Note: See TracChangeset
for help on using the changeset viewer.