Changeset 206338 in webkit
- Timestamp:
- Sep 23, 2016, 4:57:26 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206337 r206338 1 2016-09-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [Binding] Use unchekcedArgument if argumentCount is already checked 4 https://bugs.webkit.org/show_bug.cgi?id=162502 5 6 Reviewed by Geoffrey Garen. 7 8 It is not necessary to use `exec->argument(n)` after checking the argument exists. 9 This patch changes `argument(n)` to `uncheckedArgument(n)` if we already proved that 10 the argument exists. This change drops branches generated by `exec->argument(n)`. 11 And it is good for small DOM operations in which DOM binding code occupies large 12 part of entire processing. This patch and another small patch[1] offer roughly 5% 13 improvement in Dromaeo dom-attr's getAttribute and setAttribute tests. 14 15 [1]: https://bugs.webkit.org/show_bug.cgi?id=162503 16 17 * bindings/scripts/CodeGeneratorJS.pm: 18 (GenerateParametersCheck): GenerateParameterCheck requires GenerateArgumentsCountCheck. 19 As a result, existence of mandatory arguments are already checked. We can use `uncheckedArgument(n)` 20 for mandatory arguments. 21 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 22 (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): 23 (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): 24 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 25 (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): 26 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 27 (WebCore::jsTestEventTargetPrototypeFunctionItem): 28 * bindings/scripts/test/JS/JSTestGlobalObject.cpp: 29 (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation): 30 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1): 31 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2): 32 * bindings/scripts/test/JS/JSTestInterface.cpp: 33 (WebCore::JSTestInterfaceConstructor::construct): 34 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2): 35 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): 36 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 37 (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): 38 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 39 (WebCore::JSTestNamedConstructorNamedConstructor::construct): 40 * bindings/scripts/test/JS/JSTestObj.cpp: 41 (WebCore::JSTestObjConstructor::construct): 42 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1): 43 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2): 44 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): 45 (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs): 46 (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs): 47 (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs): 48 (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): 49 (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString): 50 (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter): 51 (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod): 52 (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): 53 (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): 54 (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg): 55 (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg): 56 (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString): 57 (WebCore::jsTestObjPrototypeFunctionSerializedValue): 58 (WebCore::jsTestObjPrototypeFunctionOptionsObject): 59 (WebCore::jsTestObjPrototypeFunctionPrivateMethod): 60 (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod): 61 (WebCore::jsTestObjPrototypeFunctionAddEventListener): 62 (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): 63 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): 64 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): 65 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): 66 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): 67 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg): 68 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg): 69 (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg): 70 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): 71 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): 72 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): 73 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): 74 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): 75 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): 76 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): 77 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): 78 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): 79 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): 80 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11): 81 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1): 82 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2): 83 (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): 84 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): 85 (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp): 86 (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange): 87 (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence): 88 (WebCore::jsTestObjPrototypeFunctionStringArrayFunction): 89 (WebCore::jsTestObjPrototypeFunctionDomStringListFunction): 90 (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): 91 (WebCore::jsTestObjPrototypeFunctionGetElementById): 92 (WebCore::jsTestObjPrototypeFunctionConvert1): 93 (WebCore::jsTestObjPrototypeFunctionConvert2): 94 (WebCore::jsTestObjPrototypeFunctionConvert3): 95 (WebCore::jsTestObjPrototypeFunctionConvert4): 96 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod): 97 (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod): 98 (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod): 99 (WebCore::jsTestObjPrototypeFunctionAny): 100 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise): 101 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise): 102 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): 103 (WebCore::jsTestObjPrototypeFunctionConditionalOverload1): 104 (WebCore::jsTestObjPrototypeFunctionConditionalOverload2): 105 (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1): 106 (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2): 107 (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot): 108 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 109 (WebCore::constructJSTestOverloadedConstructors1): 110 (WebCore::constructJSTestOverloadedConstructors2): 111 (WebCore::constructJSTestOverloadedConstructors3): 112 (WebCore::constructJSTestOverloadedConstructors4): 113 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: 114 (WebCore::constructJSTestOverloadedConstructorsWithSequence2): 115 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 116 (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem): 117 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 118 (WebCore::JSTestTypedefsConstructor::construct): 119 (WebCore::jsTestTypedefsPrototypeFunctionSetShadow): 120 (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg): 121 (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg): 122 (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): 123 (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction): 124 (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2): 125 (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude): 126 1 127 2016-09-23 Alex Christensen <achristensen@webkit.org> 2 128 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r206252 r206338 3988 3988 push(@$outputArray, " }\n"); 3989 3989 } else { 3990 die "CallbackInterface does not support Variadic parameter" if $parameter->isVariadic; 3990 3991 if ($codeGenerator->IsFunctionOnlyCallbackInterface($type)) { 3991 push(@$outputArray, " if (UNLIKELY(!state-> argument($argumentIndex).isFunction()))\n");3992 push(@$outputArray, " if (UNLIKELY(!state->uncheckedArgument($argumentIndex).isFunction()))\n"); 3992 3993 } else { 3993 push(@$outputArray, " if (UNLIKELY(!state-> argument($argumentIndex).isObject()))\n");3994 push(@$outputArray, " if (UNLIKELY(!state->uncheckedArgument($argumentIndex).isObject()))\n"); 3994 3995 } 3995 3996 push(@$outputArray, " return throwArgumentMustBeFunctionError(*state, throwScope, $argumentIndex, \"$name\", \"$visibleInterfaceName\", $quotedFunctionName);\n"); … … 4027 4028 my $indent = ""; 4028 4029 4030 die "Variadic parameter is already handled here" if $parameter->isVariadic; 4031 my $argumentLookupMethod = $parameter->isOptional ? "argument" : "uncheckedArgument"; 4032 4029 4033 if ($parameter->isOptional && !defined($parameter->default)) { 4030 4034 $nativeType = "Optional<$className>"; … … 4033 4037 } 4034 4038 4035 push(@$outputArray, " auto ${name}Value = state-> argument($argumentIndex);\n");4039 push(@$outputArray, " auto ${name}Value = state->$argumentLookupMethod($argumentIndex);\n"); 4036 4040 push(@$outputArray, " $nativeType $name;\n"); 4037 4041 … … 4062 4066 my $shouldPassByReference = $isTearOff || ShouldPassWrapperByReference($parameter, $interface); 4063 4067 4068 die "Variadic parameter is already handled here" if $parameter->isVariadic; 4069 my $argumentLookupMethod = $parameter->isOptional ? "argument" : "uncheckedArgument"; 4070 4064 4071 if (!$shouldPassByReference && $codeGenerator->IsWrapperType($type)) { 4065 4072 $implIncludes{"<runtime/Error.h>"} = 1; 4066 my $checkedArgument = "state-> argument($argumentIndex)";4073 my $checkedArgument = "state->$argumentLookupMethod($argumentIndex)"; 4067 4074 my $uncheckedArgument = "state->uncheckedArgument($argumentIndex)"; 4068 4075 my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $parameter, $uncheckedArgument, $function->signature->extendedAttributes->{"Conditional"}); … … 4099 4106 } 4100 4107 4101 $outer = "state-> argument($argumentIndex).isUndefined() ? $defaultValue : ";4108 $outer = "state->$argumentLookupMethod($argumentIndex).isUndefined() ? $defaultValue : "; 4102 4109 $inner = "state->uncheckedArgument($argumentIndex)"; 4103 4110 } elsif ($parameter->isOptional && !defined($parameter->default)) { 4104 4111 # Use WTF::Optional<>() for optional parameters that are missing or undefined and that do not have a default value in the IDL. 4105 $outer = "state-> argument($argumentIndex).isUndefined() ? Optional<$nativeType>() : ";4112 $outer = "state->$argumentLookupMethod($argumentIndex).isUndefined() ? Optional<$nativeType>() : "; 4106 4113 $inner = "state->uncheckedArgument($argumentIndex)"; 4107 4114 } else { 4108 4115 $outer = ""; 4109 $inner = "state-> argument($argumentIndex)";4116 $inner = "state->$argumentLookupMethod($argumentIndex)"; 4110 4117 } 4111 4118 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r205569 r206338 204 204 if (UNLIKELY(state->argumentCount() < 1)) 205 205 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 206 auto nextChild = JSNode::toWrapped(state-> argument(0));206 auto nextChild = JSNode::toWrapped(state->uncheckedArgument(0)); 207 207 if (UNLIKELY(!nextChild)) 208 208 return throwArgumentTypeError(*state, throwScope, 0, "nextChild", "TestActiveDOMObject", "excitingFunction", "Node"); … … 224 224 if (UNLIKELY(state->argumentCount() < 1)) 225 225 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 226 auto message = state-> argument(0).toWTFString(state);226 auto message = state->uncheckedArgument(0).toWTFString(state); 227 227 if (UNLIKELY(throwScope.exception())) 228 228 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r205569 r206338 201 201 if (UNLIKELY(state->argumentCount() < 1)) 202 202 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 203 auto str = state-> argument(0).toWTFString(state);203 auto str = state->uncheckedArgument(0).toWTFString(state); 204 204 if (UNLIKELY(throwScope.exception())) 205 205 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r205569 r206338 214 214 if (UNLIKELY(state->argumentCount() < 1)) 215 215 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 216 auto index = convert<uint32_t>(*state, state-> argument(0), NormalConversion);216 auto index = convert<uint32_t>(*state, state->uncheckedArgument(0), NormalConversion); 217 217 if (UNLIKELY(throwScope.exception())) 218 218 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
r205569 r206338 376 376 if (UNLIKELY(state->argumentCount() < 1)) 377 377 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 378 auto testParam = state-> argument(0).toWTFString(state);378 auto testParam = state->uncheckedArgument(0).toWTFString(state); 379 379 if (UNLIKELY(throwScope.exception())) 380 380 return JSValue::encode(jsUndefined()); … … 397 397 if (UNLIKELY(state->argumentCount() < 1)) 398 398 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 399 auto testParam = state-> argument(0).toWTFString(state);399 auto testParam = state->uncheckedArgument(0).toWTFString(state); 400 400 if (UNLIKELY(throwScope.exception())) 401 401 return JSValue::encode(jsUndefined()); … … 420 420 if (UNLIKELY(state->argumentCount() < 1)) 421 421 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 422 auto testParam = convert<int32_t>(*state, state-> argument(0), NormalConversion);422 auto testParam = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 423 423 if (UNLIKELY(throwScope.exception())) 424 424 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r205569 r206338 231 231 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 232 232 ExceptionCode ec = 0; 233 auto str1 = state-> argument(0).toWTFString(state);233 auto str1 = state->uncheckedArgument(0).toWTFString(state); 234 234 if (UNLIKELY(throwScope.exception())) 235 235 return JSValue::encode(jsUndefined()); … … 860 860 if (!context) 861 861 return JSValue::encode(jsUndefined()); 862 auto strArg = state-> argument(0).toWTFString(state);862 auto strArg = state->uncheckedArgument(0).toWTFString(state); 863 863 if (UNLIKELY(throwScope.exception())) 864 864 return JSValue::encode(jsUndefined()); 865 auto objArg = JSTestObj::toWrapped(state-> argument(1));865 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(1)); 866 866 if (UNLIKELY(!objArg)) 867 867 return throwArgumentTypeError(*state, throwScope, 1, "objArg", "TestInterface", "implementsMethod2", "TestObj"); … … 938 938 if (!context) 939 939 return JSValue::encode(jsUndefined()); 940 auto strArg = state-> argument(0).toWTFString(state);940 auto strArg = state->uncheckedArgument(0).toWTFString(state); 941 941 if (UNLIKELY(throwScope.exception())) 942 942 return JSValue::encode(jsUndefined()); 943 auto objArg = JSTestObj::toWrapped(state-> argument(1));943 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(1)); 944 944 if (UNLIKELY(!objArg)) 945 945 return throwArgumentTypeError(*state, throwScope, 1, "objArg", "TestInterface", "supplementalMethod2", "TestObj"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r205458 r206338 166 166 if (UNLIKELY(state->argumentCount() < 1)) 167 167 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 168 if (UNLIKELY(!state-> argument(0).isFunction()))168 if (UNLIKELY(!state->uncheckedArgument(0).isFunction())) 169 169 return throwArgumentMustBeFunctionError(*state, throwScope, 0, "listener", "TestMediaQueryListListener", "method"); 170 170 auto listener = JSMediaQueryListListener::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
r205569 r206338 91 91 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 92 92 ExceptionCode ec = 0; 93 auto str1 = state-> argument(0).toWTFString(state);93 auto str1 = state->uncheckedArgument(0).toWTFString(state); 94 94 if (UNLIKELY(throwScope.exception())) 95 95 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r206252 r206338 1138 1138 if (UNLIKELY(state->argumentCount() < 2)) 1139 1139 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 1140 if (UNLIKELY(!state-> argument(0).isObject()))1140 if (UNLIKELY(!state->uncheckedArgument(0).isObject())) 1141 1141 return throwArgumentMustBeFunctionError(*state, throwScope, 0, "testCallback", "TestObject", nullptr); 1142 1142 auto testCallback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject()); 1143 if (UNLIKELY(!state-> argument(1).isFunction()))1143 if (UNLIKELY(!state->uncheckedArgument(1).isFunction())) 1144 1144 return throwArgumentMustBeFunctionError(*state, throwScope, 1, "testCallbackFunction", "TestObject", nullptr); 1145 1145 auto testCallbackFunction = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject()); … … 4622 4622 if (UNLIKELY(state->argumentCount() < 1)) 4623 4623 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4624 auto testParam = state-> argument(0).toWTFString(state);4624 auto testParam = state->uncheckedArgument(0).toWTFString(state); 4625 4625 if (UNLIKELY(throwScope.exception())) 4626 4626 return JSValue::encode(jsUndefined()); … … 4645 4645 if (UNLIKELY(state->argumentCount() < 1)) 4646 4646 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4647 auto testParam = convert<int32_t>(*state, state-> argument(0), NormalConversion);4647 auto testParam = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 4648 4648 if (UNLIKELY(throwScope.exception())) 4649 4649 return JSValue::encode(jsUndefined()); … … 4703 4703 if (UNLIKELY(state->argumentCount() < 3)) 4704 4704 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4705 auto longArg = convert<int32_t>(*state, state-> argument(0), NormalConversion);4706 if (UNLIKELY(throwScope.exception())) 4707 return JSValue::encode(jsUndefined()); 4708 auto strArg = state-> argument(1).toWTFString(state);4709 if (UNLIKELY(throwScope.exception())) 4710 return JSValue::encode(jsUndefined()); 4711 auto objArg = JSTestObj::toWrapped(state-> argument(2));4705 auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 4706 if (UNLIKELY(throwScope.exception())) 4707 return JSValue::encode(jsUndefined()); 4708 auto strArg = state->uncheckedArgument(1).toWTFString(state); 4709 if (UNLIKELY(throwScope.exception())) 4710 return JSValue::encode(jsUndefined()); 4711 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2)); 4712 4712 if (UNLIKELY(!objArg)) 4713 4713 return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "voidMethodWithArgs", "TestObj"); … … 4744 4744 if (UNLIKELY(state->argumentCount() < 3)) 4745 4745 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4746 auto byteArg = convert<int8_t>(*state, state-> argument(0), NormalConversion);4747 if (UNLIKELY(throwScope.exception())) 4748 return JSValue::encode(jsUndefined()); 4749 auto strArg = state-> argument(1).toWTFString(state);4750 if (UNLIKELY(throwScope.exception())) 4751 return JSValue::encode(jsUndefined()); 4752 auto objArg = JSTestObj::toWrapped(state-> argument(2));4746 auto byteArg = convert<int8_t>(*state, state->uncheckedArgument(0), NormalConversion); 4747 if (UNLIKELY(throwScope.exception())) 4748 return JSValue::encode(jsUndefined()); 4749 auto strArg = state->uncheckedArgument(1).toWTFString(state); 4750 if (UNLIKELY(throwScope.exception())) 4751 return JSValue::encode(jsUndefined()); 4752 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2)); 4753 4753 if (UNLIKELY(!objArg)) 4754 4754 return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "byteMethodWithArgs", "TestObj"); … … 4785 4785 if (UNLIKELY(state->argumentCount() < 3)) 4786 4786 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4787 auto octetArg = convert<uint8_t>(*state, state-> argument(0), NormalConversion);4788 if (UNLIKELY(throwScope.exception())) 4789 return JSValue::encode(jsUndefined()); 4790 auto strArg = state-> argument(1).toWTFString(state);4791 if (UNLIKELY(throwScope.exception())) 4792 return JSValue::encode(jsUndefined()); 4793 auto objArg = JSTestObj::toWrapped(state-> argument(2));4787 auto octetArg = convert<uint8_t>(*state, state->uncheckedArgument(0), NormalConversion); 4788 if (UNLIKELY(throwScope.exception())) 4789 return JSValue::encode(jsUndefined()); 4790 auto strArg = state->uncheckedArgument(1).toWTFString(state); 4791 if (UNLIKELY(throwScope.exception())) 4792 return JSValue::encode(jsUndefined()); 4793 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2)); 4794 4794 if (UNLIKELY(!objArg)) 4795 4795 return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "octetMethodWithArgs", "TestObj"); … … 4826 4826 if (UNLIKELY(state->argumentCount() < 3)) 4827 4827 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4828 auto longArg = convert<int32_t>(*state, state-> argument(0), NormalConversion);4829 if (UNLIKELY(throwScope.exception())) 4830 return JSValue::encode(jsUndefined()); 4831 auto strArg = state-> argument(1).toWTFString(state);4832 if (UNLIKELY(throwScope.exception())) 4833 return JSValue::encode(jsUndefined()); 4834 auto objArg = JSTestObj::toWrapped(state-> argument(2));4828 auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 4829 if (UNLIKELY(throwScope.exception())) 4830 return JSValue::encode(jsUndefined()); 4831 auto strArg = state->uncheckedArgument(1).toWTFString(state); 4832 if (UNLIKELY(throwScope.exception())) 4833 return JSValue::encode(jsUndefined()); 4834 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2)); 4835 4835 if (UNLIKELY(!objArg)) 4836 4836 return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "longMethodWithArgs", "TestObj"); … … 4867 4867 if (UNLIKELY(state->argumentCount() < 3)) 4868 4868 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4869 auto longArg = convert<int32_t>(*state, state-> argument(0), NormalConversion);4870 if (UNLIKELY(throwScope.exception())) 4871 return JSValue::encode(jsUndefined()); 4872 auto strArg = state-> argument(1).toWTFString(state);4873 if (UNLIKELY(throwScope.exception())) 4874 return JSValue::encode(jsUndefined()); 4875 auto objArg = JSTestObj::toWrapped(state-> argument(2));4869 auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 4870 if (UNLIKELY(throwScope.exception())) 4871 return JSValue::encode(jsUndefined()); 4872 auto strArg = state->uncheckedArgument(1).toWTFString(state); 4873 if (UNLIKELY(throwScope.exception())) 4874 return JSValue::encode(jsUndefined()); 4875 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2)); 4876 4876 if (UNLIKELY(!objArg)) 4877 4877 return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "objMethodWithArgs", "TestObj"); … … 4908 4908 if (UNLIKELY(state->argumentCount() < 1)) 4909 4909 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4910 auto arg = valueToStringTreatingNullAsEmptyString(state, state-> argument(0));4910 auto arg = valueToStringTreatingNullAsEmptyString(state, state->uncheckedArgument(0)); 4911 4911 if (UNLIKELY(throwScope.exception())) 4912 4912 return JSValue::encode(jsUndefined()); … … 4928 4928 if (UNLIKELY(state->argumentCount() < 1)) 4929 4929 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4930 auto resolver = JSXPathNSResolver::toWrapped(*state, state-> argument(0));4930 auto resolver = JSXPathNSResolver::toWrapped(*state, state->uncheckedArgument(0)); 4931 4931 if (UNLIKELY(throwScope.exception())) 4932 4932 return JSValue::encode(jsUndefined()); … … 4974 4974 if (UNLIKELY(state->argumentCount() < 1)) 4975 4975 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4976 auto index = convert<uint32_t>(*state, state-> argument(0), NormalConversion);4976 auto index = convert<uint32_t>(*state, state->uncheckedArgument(0), NormalConversion); 4977 4977 if (UNLIKELY(throwScope.exception())) 4978 4978 return JSValue::encode(jsUndefined()); … … 4994 4994 if (UNLIKELY(state->argumentCount() < 1)) 4995 4995 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 4996 auto enumArgValue = state-> argument(0);4996 auto enumArgValue = state->uncheckedArgument(0); 4997 4997 TestObj::EnumType enumArg; 4998 4998 auto optionalValue = parse<TestObj::EnumType>(*state, enumArgValue); … … 5071 5071 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5072 5072 ExceptionCode ec = 0; 5073 auto strArg = state-> argument(0).toWTFString(state);5074 if (UNLIKELY(throwScope.exception())) 5075 return JSValue::encode(jsUndefined()); 5076 auto objArg = JSTestObj::toWrapped(state-> argument(1));5073 auto strArg = state->uncheckedArgument(0).toWTFString(state); 5074 if (UNLIKELY(throwScope.exception())) 5075 return JSValue::encode(jsUndefined()); 5076 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(1)); 5077 5077 if (UNLIKELY(!objArg)) 5078 5078 return throwArgumentTypeError(*state, throwScope, 1, "objArg", "TestObject", "methodThatRequiresAllArgsAndThrows", "TestObj"); … … 5096 5096 if (UNLIKELY(state->argumentCount() < 1)) 5097 5097 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5098 auto str = valueToUSVString(state, state-> argument(0));5098 auto str = valueToUSVString(state, state->uncheckedArgument(0)); 5099 5099 if (UNLIKELY(throwScope.exception())) 5100 5100 return JSValue::encode(jsUndefined()); … … 5116 5116 if (UNLIKELY(state->argumentCount() < 1)) 5117 5117 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5118 auto str = valueToUSVStringWithUndefinedOrNullCheck(state, state-> argument(0));5118 auto str = valueToUSVStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0)); 5119 5119 if (UNLIKELY(throwScope.exception())) 5120 5120 return JSValue::encode(jsUndefined()); … … 5136 5136 if (UNLIKELY(state->argumentCount() < 1)) 5137 5137 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5138 auto str = valueToUSVStringTreatingNullAsEmptyString(state, state-> argument(0));5138 auto str = valueToUSVStringTreatingNullAsEmptyString(state, state->uncheckedArgument(0)); 5139 5139 if (UNLIKELY(throwScope.exception())) 5140 5140 return JSValue::encode(jsUndefined()); … … 5156 5156 if (UNLIKELY(state->argumentCount() < 1)) 5157 5157 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5158 auto serializedArg = SerializedScriptValue::create(state, state-> argument(0), 0, 0);5158 auto serializedArg = SerializedScriptValue::create(state, state->uncheckedArgument(0), 0, 0); 5159 5159 if (UNLIKELY(throwScope.exception())) 5160 5160 return JSValue::encode(jsUndefined()); … … 5176 5176 if (UNLIKELY(state->argumentCount() < 1)) 5177 5177 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5178 auto oo = Dictionary(state, state-> argument(0));5178 auto oo = Dictionary(state, state->uncheckedArgument(0)); 5179 5179 auto ooo = Dictionary(state, state->argument(1)); 5180 5180 impl.optionsObject(WTFMove(oo), WTFMove(ooo)); … … 5255 5255 if (UNLIKELY(state->argumentCount() < 1)) 5256 5256 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5257 auto argument = state-> argument(0).toWTFString(state);5257 auto argument = state->uncheckedArgument(0).toWTFString(state); 5258 5258 if (UNLIKELY(throwScope.exception())) 5259 5259 return JSValue::encode(jsUndefined()); … … 5275 5275 if (UNLIKELY(state->argumentCount() < 1)) 5276 5276 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5277 auto argument = state-> argument(0).toWTFString(state);5277 auto argument = state->uncheckedArgument(0).toWTFString(state); 5278 5278 if (UNLIKELY(throwScope.exception())) 5279 5279 return JSValue::encode(jsUndefined()); … … 5295 5295 if (UNLIKELY(state->argumentCount() < 2)) 5296 5296 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5297 auto type = state-> argument(0).toWTFString(state);5298 if (UNLIKELY(throwScope.exception())) 5299 return JSValue::encode(jsUndefined()); 5300 auto listener = JSEventListener::create(state-> argument(1), *castedThis, false, currentWorld(state));5297 auto type = state->uncheckedArgument(0).toWTFString(state); 5298 if (UNLIKELY(throwScope.exception())) 5299 return JSValue::encode(jsUndefined()); 5300 auto listener = JSEventListener::create(state->uncheckedArgument(1), *castedThis, false, currentWorld(state)); 5301 5301 if (UNLIKELY(!listener)) 5302 5302 return throwArgumentTypeError(*state, throwScope, 1, "listener", "TestObject", "addEventListener", "EventListener"); … … 5321 5321 if (UNLIKELY(state->argumentCount() < 2)) 5322 5322 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5323 auto type = state-> argument(0).toWTFString(state);5324 if (UNLIKELY(throwScope.exception())) 5325 return JSValue::encode(jsUndefined()); 5326 auto listener = JSEventListener::create(state-> argument(1), *castedThis, false, currentWorld(state));5323 auto type = state->uncheckedArgument(0).toWTFString(state); 5324 if (UNLIKELY(throwScope.exception())) 5325 return JSValue::encode(jsUndefined()); 5326 auto listener = JSEventListener::create(state->uncheckedArgument(1), *castedThis, false, currentWorld(state)); 5327 5327 if (UNLIKELY(!listener)) 5328 5328 return throwArgumentTypeError(*state, throwScope, 1, "listener", "TestObject", "removeEventListener", "EventListener"); … … 5600 5600 if (UNLIKELY(state->argumentCount() < 1)) 5601 5601 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5602 auto nonOpt = convert<int32_t>(*state, state-> argument(0), NormalConversion);5602 auto nonOpt = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 5603 5603 if (UNLIKELY(throwScope.exception())) 5604 5604 return JSValue::encode(jsUndefined()); … … 5623 5623 if (UNLIKELY(state->argumentCount() < 1)) 5624 5624 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5625 auto nonOpt = convert<int32_t>(*state, state-> argument(0), NormalConversion);5625 auto nonOpt = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 5626 5626 if (UNLIKELY(throwScope.exception())) 5627 5627 return JSValue::encode(jsUndefined()); … … 6108 6108 if (UNLIKELY(state->argumentCount() < 1)) 6109 6109 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6110 if (UNLIKELY(!state-> argument(0).isObject()))6110 if (UNLIKELY(!state->uncheckedArgument(0).isObject())) 6111 6111 return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "methodWithCallbackArg"); 6112 6112 auto callback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject()); … … 6128 6128 if (UNLIKELY(state->argumentCount() < 2)) 6129 6129 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6130 auto nonCallback = convert<int32_t>(*state, state-> argument(0), NormalConversion);6131 if (UNLIKELY(throwScope.exception())) 6132 return JSValue::encode(jsUndefined()); 6133 if (UNLIKELY(!state-> argument(1).isObject()))6130 auto nonCallback = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 6131 if (UNLIKELY(throwScope.exception())) 6132 return JSValue::encode(jsUndefined()); 6133 if (UNLIKELY(!state->uncheckedArgument(1).isObject())) 6134 6134 return throwArgumentMustBeFunctionError(*state, throwScope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackArg"); 6135 6135 auto callback = JSTestCallback::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject()); … … 6172 6172 if (UNLIKELY(state->argumentCount() < 1)) 6173 6173 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6174 if (UNLIKELY(!state-> argument(0).isFunction()))6174 if (UNLIKELY(!state->uncheckedArgument(0).isFunction())) 6175 6175 return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "methodWithCallbackFunctionArg"); 6176 6176 auto callback = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject()); … … 6192 6192 if (UNLIKELY(state->argumentCount() < 2)) 6193 6193 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6194 auto nonCallback = convert<int32_t>(*state, state-> argument(0), NormalConversion);6195 if (UNLIKELY(throwScope.exception())) 6196 return JSValue::encode(jsUndefined()); 6197 if (UNLIKELY(!state-> argument(1).isFunction()))6194 auto nonCallback = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 6195 if (UNLIKELY(throwScope.exception())) 6196 return JSValue::encode(jsUndefined()); 6197 if (UNLIKELY(!state->uncheckedArgument(1).isFunction())) 6198 6198 return throwArgumentMustBeFunctionError(*state, throwScope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackFunctionArg"); 6199 6199 auto callback = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject()); … … 6245 6245 if (UNLIKELY(state->argumentCount() < 1)) 6246 6246 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6247 if (UNLIKELY(!state-> argument(0).isObject()))6247 if (UNLIKELY(!state->uncheckedArgument(0).isObject())) 6248 6248 return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "staticMethodWithCallbackArg"); 6249 6249 auto callback = createFunctionOnlyCallback<JSTestCallback>(state, jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), state->uncheckedArgument(0)); … … 6320 6320 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6321 6321 TestObj* objArg = nullptr; 6322 if (!state-> argument(0).isUndefinedOrNull()) {6322 if (!state->uncheckedArgument(0).isUndefinedOrNull()) { 6323 6323 objArg = JSTestObj::toWrapped(state->uncheckedArgument(0)); 6324 6324 if (UNLIKELY(!objArg)) 6325 6325 return throwArgumentTypeError(*state, throwScope, 0, "objArg", "TestObject", "overloadedMethod", "TestObj"); 6326 6326 } 6327 auto strArg = state-> argument(1).toWTFString(state);6327 auto strArg = state->uncheckedArgument(1).toWTFString(state); 6328 6328 if (UNLIKELY(throwScope.exception())) 6329 6329 return JSValue::encode(jsUndefined()); … … 6346 6346 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6347 6347 TestObj* objArg = nullptr; 6348 if (!state-> argument(0).isUndefinedOrNull()) {6348 if (!state->uncheckedArgument(0).isUndefinedOrNull()) { 6349 6349 objArg = JSTestObj::toWrapped(state->uncheckedArgument(0)); 6350 6350 if (UNLIKELY(!objArg)) … … 6371 6371 if (UNLIKELY(state->argumentCount() < 1)) 6372 6372 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6373 auto strArg = state-> argument(0).toWTFString(state);6373 auto strArg = state->uncheckedArgument(0).toWTFString(state); 6374 6374 if (UNLIKELY(throwScope.exception())) 6375 6375 return JSValue::encode(jsUndefined()); … … 6391 6391 if (UNLIKELY(state->argumentCount() < 1)) 6392 6392 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6393 auto longArg = convert<int32_t>(*state, state-> argument(0), NormalConversion);6393 auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 6394 6394 if (UNLIKELY(throwScope.exception())) 6395 6395 return JSValue::encode(jsUndefined()); … … 6411 6411 if (UNLIKELY(state->argumentCount() < 1)) 6412 6412 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6413 if (UNLIKELY(!state-> argument(0).isObject()))6413 if (UNLIKELY(!state->uncheckedArgument(0).isObject())) 6414 6414 return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "overloadedMethod"); 6415 6415 auto callback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject()); … … 6432 6432 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6433 6433 DOMStringList* listArg = nullptr; 6434 if (!state-> argument(0).isUndefinedOrNull()) {6434 if (!state->uncheckedArgument(0).isUndefinedOrNull()) { 6435 6435 listArg = JSDOMStringList::toWrapped(state->uncheckedArgument(0)); 6436 6436 if (UNLIKELY(!listArg)) … … 6454 6454 if (UNLIKELY(state->argumentCount() < 1)) 6455 6455 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6456 auto arrayArg = toNativeArray<String>(*state, state-> argument(0));6456 auto arrayArg = toNativeArray<String>(*state, state->uncheckedArgument(0)); 6457 6457 if (UNLIKELY(throwScope.exception())) 6458 6458 return JSValue::encode(jsUndefined()); … … 6474 6474 if (UNLIKELY(state->argumentCount() < 1)) 6475 6475 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6476 auto objArg = JSTestObj::toWrapped(state-> argument(0));6476 auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(0)); 6477 6477 if (UNLIKELY(!objArg)) 6478 6478 return throwArgumentTypeError(*state, throwScope, 0, "objArg", "TestObject", "overloadedMethod", "TestObj"); … … 6494 6494 if (UNLIKELY(state->argumentCount() < 1)) 6495 6495 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6496 auto arrayArg = toNativeArray<String>(*state, state-> argument(0));6496 auto arrayArg = toNativeArray<String>(*state, state->uncheckedArgument(0)); 6497 6497 if (UNLIKELY(throwScope.exception())) 6498 6498 return JSValue::encode(jsUndefined()); … … 6514 6514 if (UNLIKELY(state->argumentCount() < 1)) 6515 6515 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6516 auto arrayArg = toNativeArray<uint32_t>(*state, state-> argument(0));6516 auto arrayArg = toNativeArray<uint32_t>(*state, state->uncheckedArgument(0)); 6517 6517 if (UNLIKELY(throwScope.exception())) 6518 6518 return JSValue::encode(jsUndefined()); … … 6534 6534 if (UNLIKELY(state->argumentCount() < 1)) 6535 6535 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6536 auto strArg = state-> argument(0).toWTFString(state);6536 auto strArg = state->uncheckedArgument(0).toWTFString(state); 6537 6537 if (UNLIKELY(throwScope.exception())) 6538 6538 return JSValue::encode(jsUndefined()); … … 6616 6616 if (UNLIKELY(state->argumentCount() < 1)) 6617 6617 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6618 auto strArg = state-> argument(0).toWTFString(state);6618 auto strArg = state->uncheckedArgument(0).toWTFString(state); 6619 6619 if (UNLIKELY(throwScope.exception())) 6620 6620 return JSValue::encode(jsUndefined()); … … 6643 6643 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6644 6644 TestObj* objArg = nullptr; 6645 if (!state-> argument(0).isUndefinedOrNull()) {6645 if (!state->uncheckedArgument(0).isUndefinedOrNull()) { 6646 6646 objArg = JSTestObj::toWrapped(state->uncheckedArgument(0)); 6647 6647 if (UNLIKELY(!objArg)) … … 6719 6719 if (UNLIKELY(state->argumentCount() < 1)) 6720 6720 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6721 auto arg = convert<int32_t>(*state, state-> argument(0), NormalConversion);6721 auto arg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 6722 6722 if (UNLIKELY(throwScope.exception())) 6723 6723 return JSValue::encode(jsUndefined()); … … 6736 6736 if (UNLIKELY(state->argumentCount() < 1)) 6737 6737 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6738 auto type = state-> argument(0).toWTFString(state);6738 auto type = state->uncheckedArgument(0).toWTFString(state); 6739 6739 if (UNLIKELY(throwScope.exception())) 6740 6740 return JSValue::encode(jsUndefined()); … … 6779 6779 if (UNLIKELY(state->argumentCount() < 2)) 6780 6780 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6781 auto objArgsShort = convert<uint16_t>(*state, state-> argument(0), Clamp);6782 if (UNLIKELY(throwScope.exception())) 6783 return JSValue::encode(jsUndefined()); 6784 auto objArgsLong = convert<uint32_t>(*state, state-> argument(1), Clamp);6781 auto objArgsShort = convert<uint16_t>(*state, state->uncheckedArgument(0), Clamp); 6782 if (UNLIKELY(throwScope.exception())) 6783 return JSValue::encode(jsUndefined()); 6784 auto objArgsLong = convert<uint32_t>(*state, state->uncheckedArgument(1), Clamp); 6785 6785 if (UNLIKELY(throwScope.exception())) 6786 6786 return JSValue::encode(jsUndefined()); … … 6802 6802 if (UNLIKELY(state->argumentCount() < 2)) 6803 6803 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6804 auto objArgsShort = convert<uint16_t>(*state, state-> argument(0), EnforceRange);6805 if (UNLIKELY(throwScope.exception())) 6806 return JSValue::encode(jsUndefined()); 6807 auto objArgsLong = convert<uint32_t>(*state, state-> argument(1), EnforceRange);6804 auto objArgsShort = convert<uint16_t>(*state, state->uncheckedArgument(0), EnforceRange); 6805 if (UNLIKELY(throwScope.exception())) 6806 return JSValue::encode(jsUndefined()); 6807 auto objArgsLong = convert<uint32_t>(*state, state->uncheckedArgument(1), EnforceRange); 6808 6808 if (UNLIKELY(throwScope.exception())) 6809 6809 return JSValue::encode(jsUndefined()); … … 6825 6825 if (UNLIKELY(state->argumentCount() < 1)) 6826 6826 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6827 auto unsignedLongSequence = toNativeArray<uint32_t>(*state, state-> argument(0));6827 auto unsignedLongSequence = toNativeArray<uint32_t>(*state, state->uncheckedArgument(0)); 6828 6828 if (UNLIKELY(throwScope.exception())) 6829 6829 return JSValue::encode(jsUndefined()); … … 6846 6846 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6847 6847 ExceptionCode ec = 0; 6848 auto values = toNativeArray<String>(*state, state-> argument(0));6848 auto values = toNativeArray<String>(*state, state->uncheckedArgument(0)); 6849 6849 if (UNLIKELY(throwScope.exception())) 6850 6850 return JSValue::encode(jsUndefined()); … … 6869 6869 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6870 6870 ExceptionCode ec = 0; 6871 auto values = JSDOMStringList::toWrapped(state-> argument(0));6871 auto values = JSDOMStringList::toWrapped(state->uncheckedArgument(0)); 6872 6872 if (UNLIKELY(!values)) 6873 6873 return throwArgumentTypeError(*state, throwScope, 0, "values", "TestObject", "domStringListFunction", "DOMStringList"); … … 6891 6891 if (UNLIKELY(state->argumentCount() < 2)) 6892 6892 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6893 auto arrayArg = toNativeArray<uint32_t>(*state, state-> argument(0));6894 if (UNLIKELY(throwScope.exception())) 6895 return JSValue::encode(jsUndefined()); 6896 auto nullableArrayArg = toNativeArray<uint32_t>(*state, state-> argument(1));6893 auto arrayArg = toNativeArray<uint32_t>(*state, state->uncheckedArgument(0)); 6894 if (UNLIKELY(throwScope.exception())) 6895 return JSValue::encode(jsUndefined()); 6896 auto nullableArrayArg = toNativeArray<uint32_t>(*state, state->uncheckedArgument(1)); 6897 6897 if (UNLIKELY(throwScope.exception())) 6898 6898 return JSValue::encode(jsUndefined()); … … 6914 6914 if (UNLIKELY(state->argumentCount() < 1)) 6915 6915 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6916 auto elementId = AtomicString(state-> argument(0).toString(state)->toExistingAtomicString(state));6916 auto elementId = AtomicString(state->uncheckedArgument(0).toString(state)->toExistingAtomicString(state)); 6917 6917 if (UNLIKELY(throwScope.exception())) 6918 6918 return JSValue::encode(jsUndefined()); … … 6954 6954 if (UNLIKELY(state->argumentCount() < 1)) 6955 6955 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6956 auto value = JSTestNode::toWrapped(state-> argument(0));6956 auto value = JSTestNode::toWrapped(state->uncheckedArgument(0)); 6957 6957 if (UNLIKELY(!value)) 6958 6958 return throwArgumentTypeError(*state, throwScope, 0, "value", "TestObject", "convert1", "TestNode"); … … 6975 6975 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6976 6976 TestNode* value = nullptr; 6977 if (!state-> argument(0).isUndefinedOrNull()) {6977 if (!state->uncheckedArgument(0).isUndefinedOrNull()) { 6978 6978 value = JSTestNode::toWrapped(state->uncheckedArgument(0)); 6979 6979 if (UNLIKELY(!value)) … … 6997 6997 if (UNLIKELY(state->argumentCount() < 1)) 6998 6998 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 6999 auto value = state-> argument(0).toWTFString(state);6999 auto value = state->uncheckedArgument(0).toWTFString(state); 7000 7000 if (UNLIKELY(throwScope.exception())) 7001 7001 return JSValue::encode(jsUndefined()); … … 7017 7017 if (UNLIKELY(state->argumentCount() < 1)) 7018 7018 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7019 auto value = valueToStringWithUndefinedOrNullCheck(state, state-> argument(0));7019 auto value = valueToStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0)); 7020 7020 if (UNLIKELY(throwScope.exception())) 7021 7021 return JSValue::encode(jsUndefined()); … … 7082 7082 if (UNLIKELY(state->argumentCount() < 1)) 7083 7083 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7084 auto head = state-> argument(0).toWTFString(state);7084 auto head = state->uncheckedArgument(0).toWTFString(state); 7085 7085 if (UNLIKELY(throwScope.exception())) 7086 7086 return JSValue::encode(jsUndefined()); … … 7105 7105 if (UNLIKELY(state->argumentCount() < 1)) 7106 7106 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7107 auto head = convert<double>(*state, state-> argument(0), ShouldAllowNonFinite::Yes);7107 auto head = convert<double>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::Yes); 7108 7108 if (UNLIKELY(throwScope.exception())) 7109 7109 return JSValue::encode(jsUndefined()); … … 7128 7128 if (UNLIKELY(state->argumentCount() < 1)) 7129 7129 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7130 auto head = JSNode::toWrapped(state-> argument(0));7130 auto head = JSNode::toWrapped(state->uncheckedArgument(0)); 7131 7131 if (UNLIKELY(!head)) 7132 7132 return throwArgumentTypeError(*state, throwScope, 0, "head", "TestObject", "variadicNodeMethod", "Node"); … … 7151 7151 if (UNLIKELY(state->argumentCount() < 2)) 7152 7152 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7153 auto a = convert<float>(*state, state-> argument(0), ShouldAllowNonFinite::Yes);7154 if (UNLIKELY(throwScope.exception())) 7155 return JSValue::encode(jsUndefined()); 7156 auto b = convert<int32_t>(*state, state-> argument(1), NormalConversion);7153 auto a = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::Yes); 7154 if (UNLIKELY(throwScope.exception())) 7155 return JSValue::encode(jsUndefined()); 7156 auto b = convert<int32_t>(*state, state->uncheckedArgument(1), NormalConversion); 7157 7157 if (UNLIKELY(throwScope.exception())) 7158 7158 return JSValue::encode(jsUndefined()); … … 7205 7205 if (UNLIKELY(state->argumentCount() < 1)) 7206 7206 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7207 auto a = convert<float>(*state, state-> argument(0), ShouldAllowNonFinite::No);7207 auto a = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::No); 7208 7208 if (UNLIKELY(throwScope.exception())) 7209 7209 return JSValue::encode(jsUndefined()); … … 7284 7284 if (UNLIKELY(state->argumentCount() < 1)) 7285 7285 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7286 auto a = convert<float>(*state, state-> argument(0), ShouldAllowNonFinite::No);7286 auto a = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::No); 7287 7287 if (UNLIKELY(throwScope.exception())) 7288 7288 return JSValue::encode(jsUndefined()); … … 7312 7312 if (UNLIKELY(state->argumentCount() < 1)) 7313 7313 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7314 auto request = JSFetchRequest::toWrapped(state-> argument(0));7314 auto request = JSFetchRequest::toWrapped(state->uncheckedArgument(0)); 7315 7315 if (UNLIKELY(!request)) 7316 7316 return throwArgumentTypeError(*state, throwScope, 0, "request", "TestObject", "testPromiseOverloadedFunction", "FetchRequest"); … … 7417 7417 if (UNLIKELY(state->argumentCount() < 1)) 7418 7418 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7419 auto str = state-> argument(0).toWTFString(state);7419 auto str = state->uncheckedArgument(0).toWTFString(state); 7420 7420 if (UNLIKELY(throwScope.exception())) 7421 7421 return JSValue::encode(jsUndefined()); … … 7440 7440 if (UNLIKELY(state->argumentCount() < 1)) 7441 7441 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7442 auto a = convert<int32_t>(*state, state-> argument(0), NormalConversion);7442 auto a = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 7443 7443 if (UNLIKELY(throwScope.exception())) 7444 7444 return JSValue::encode(jsUndefined()); … … 7483 7483 if (UNLIKELY(state->argumentCount() < 1)) 7484 7484 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7485 auto str = state-> argument(0).toWTFString(state);7485 auto str = state->uncheckedArgument(0).toWTFString(state); 7486 7486 if (UNLIKELY(throwScope.exception())) 7487 7487 return JSValue::encode(jsUndefined()); … … 7504 7504 if (UNLIKELY(state->argumentCount() < 1)) 7505 7505 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7506 auto a = convert<int32_t>(*state, state-> argument(0), NormalConversion);7506 auto a = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion); 7507 7507 if (UNLIKELY(throwScope.exception())) 7508 7508 return JSValue::encode(jsUndefined()); … … 7543 7543 if (UNLIKELY(state->argumentCount() < 1)) 7544 7544 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 7545 auto init = convertDictionary<TestObj::Dictionary>(*state, state-> argument(0));7545 auto init = convertDictionary<TestObj::Dictionary>(*state, state->uncheckedArgument(0)); 7546 7546 if (UNLIKELY(throwScope.exception())) 7547 7547 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
r205569 r206338 75 75 if (UNLIKELY(state->argumentCount() < 1)) 76 76 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 77 auto arrayBuffer = toArrayBuffer(state-> argument(0));77 auto arrayBuffer = toArrayBuffer(state->uncheckedArgument(0)); 78 78 if (UNLIKELY(throwScope.exception())) 79 79 return JSValue::encode(jsUndefined()); … … 93 93 if (UNLIKELY(state->argumentCount() < 1)) 94 94 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 95 auto arrayBufferView = toArrayBufferView(state-> argument(0));95 auto arrayBufferView = toArrayBufferView(state->uncheckedArgument(0)); 96 96 if (UNLIKELY(throwScope.exception())) 97 97 return JSValue::encode(jsUndefined()); … … 111 111 if (UNLIKELY(state->argumentCount() < 1)) 112 112 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 113 auto blob = JSBlob::toWrapped(state-> argument(0));113 auto blob = JSBlob::toWrapped(state->uncheckedArgument(0)); 114 114 if (UNLIKELY(!blob)) 115 115 return throwArgumentTypeError(*state, throwScope, 0, "blob", "TestOverloadedConstructors", nullptr, "Blob"); … … 127 127 if (UNLIKELY(state->argumentCount() < 1)) 128 128 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 129 auto string = state-> argument(0).toWTFString(state);129 auto string = state->uncheckedArgument(0).toWTFString(state); 130 130 if (UNLIKELY(throwScope.exception())) 131 131 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp
r205569 r206338 88 88 if (UNLIKELY(state->argumentCount() < 1)) 89 89 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 90 auto string = state-> argument(0).toWTFString(state);90 auto string = state->uncheckedArgument(0).toWTFString(state); 91 91 if (UNLIKELY(throwScope.exception())) 92 92 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r205569 r206338 210 210 if (UNLIKELY(state->argumentCount() < 1)) 211 211 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 212 auto name = state-> argument(0).toWTFString(state);212 auto name = state->uncheckedArgument(0).toWTFString(state); 213 213 if (UNLIKELY(throwScope.exception())) 214 214 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r205569 r206338 132 132 if (UNLIKELY(state->argumentCount() < 2)) 133 133 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 134 auto hello = state-> argument(0).toWTFString(state);135 if (UNLIKELY(throwScope.exception())) 136 return JSValue::encode(jsUndefined()); 137 if (UNLIKELY(!state-> argument(1).isObject()))134 auto hello = state->uncheckedArgument(0).toWTFString(state); 135 if (UNLIKELY(throwScope.exception())) 136 return JSValue::encode(jsUndefined()); 137 if (UNLIKELY(!state->uncheckedArgument(1).isObject())) 138 138 return throwArgumentMustBeFunctionError(*state, throwScope, 1, "testCallback", "TestTypedefs", nullptr); 139 139 auto testCallback = JSTestCallback::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject()); … … 517 517 if (UNLIKELY(state->argumentCount() < 3)) 518 518 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 519 auto width = convert<float>(*state, state-> argument(0), ShouldAllowNonFinite::Yes);520 if (UNLIKELY(throwScope.exception())) 521 return JSValue::encode(jsUndefined()); 522 auto height = convert<float>(*state, state-> argument(1), ShouldAllowNonFinite::Yes);523 if (UNLIKELY(throwScope.exception())) 524 return JSValue::encode(jsUndefined()); 525 auto blur = convert<float>(*state, state-> argument(2), ShouldAllowNonFinite::Yes);519 auto width = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::Yes); 520 if (UNLIKELY(throwScope.exception())) 521 return JSValue::encode(jsUndefined()); 522 auto height = convert<float>(*state, state->uncheckedArgument(1), ShouldAllowNonFinite::Yes); 523 if (UNLIKELY(throwScope.exception())) 524 return JSValue::encode(jsUndefined()); 525 auto blur = convert<float>(*state, state->uncheckedArgument(2), ShouldAllowNonFinite::Yes); 526 526 if (UNLIKELY(throwScope.exception())) 527 527 return JSValue::encode(jsUndefined()); … … 549 549 if (UNLIKELY(state->argumentCount() < 1)) 550 550 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 551 auto sequenceArg = toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(*state, state-> argument(0));551 auto sequenceArg = toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(*state, state->uncheckedArgument(0)); 552 552 if (UNLIKELY(throwScope.exception())) 553 553 return JSValue::encode(jsUndefined()); … … 569 569 if (UNLIKELY(state->argumentCount() < 1)) 570 570 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 571 auto sequenceArg = toNativeArray<String>(*state, state-> argument(0));571 auto sequenceArg = toNativeArray<String>(*state, state->uncheckedArgument(0)); 572 572 if (UNLIKELY(throwScope.exception())) 573 573 return JSValue::encode(jsUndefined()); … … 589 589 if (UNLIKELY(state->argumentCount() < 1)) 590 590 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 591 auto arg1 = convert<uint64_t>(*state, state-> argument(0), Clamp);591 auto arg1 = convert<uint64_t>(*state, state->uncheckedArgument(0), Clamp); 592 592 if (UNLIKELY(throwScope.exception())) 593 593 return JSValue::encode(jsUndefined()); … … 628 628 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 629 629 ExceptionCode ec = 0; 630 auto values = toNativeArray<String>(*state, state-> argument(0));630 auto values = toNativeArray<String>(*state, state->uncheckedArgument(0)); 631 631 if (UNLIKELY(throwScope.exception())) 632 632 return JSValue::encode(jsUndefined()); … … 651 651 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 652 652 ExceptionCode ec = 0; 653 auto values = toNativeArray<String>(*state, state-> argument(0));653 auto values = toNativeArray<String>(*state, state->uncheckedArgument(0)); 654 654 if (UNLIKELY(throwScope.exception())) 655 655 return JSValue::encode(jsUndefined()); … … 673 673 if (UNLIKELY(state->argumentCount() < 1)) 674 674 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 675 auto sequenceArg = toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(*state, state-> argument(0));675 auto sequenceArg = toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(*state, state->uncheckedArgument(0)); 676 676 if (UNLIKELY(throwScope.exception())) 677 677 return JSValue::encode(jsUndefined());
Note:
See TracChangeset
for help on using the changeset viewer.