Log Message
[Binding] Use unchekcedArgument if argumentCount is already checked https://bugs.webkit.org/show_bug.cgi?id=162502
Reviewed by Geoffrey Garen. It is not necessary to use `exec->argument(n)` after checking the argument exists. This patch changes `argument(n)` to `uncheckedArgument(n)` if we already proved that the argument exists. This change drops branches generated by `exec->argument(n)`. And it is good for small DOM operations in which DOM binding code occupies large part of entire processing. This patch and another small patch[1] offer roughly 5% improvement in Dromaeo dom-attr's getAttribute and setAttribute tests. [1]: https://bugs.webkit.org/show_bug.cgi?id=162503 * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): GenerateParameterCheck requires GenerateArgumentsCountCheck. As a result, existence of mandatory arguments are already checked. We can use `uncheckedArgument(n)` for mandatory arguments. * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetPrototypeFunctionItem): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation): (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1): (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::construct): (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::construct): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::construct): (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1): (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString): (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter): (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod): (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg): (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionPrivateMethod): (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg): (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11): (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp): (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange): (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence): (WebCore::jsTestObjPrototypeFunctionStringArrayFunction): (WebCore::jsTestObjPrototypeFunctionDomStringListFunction): (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): (WebCore::jsTestObjPrototypeFunctionGetElementById): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert3): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod): (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod): (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod): (WebCore::jsTestObjPrototypeFunctionAny): (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise): (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise): (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): (WebCore::jsTestObjPrototypeFunctionConditionalOverload1): (WebCore::jsTestObjPrototypeFunctionConditionalOverload2): (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1): (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2): (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::constructJSTestOverloadedConstructors1): (WebCore::constructJSTestOverloadedConstructors2): (WebCore::constructJSTestOverloadedConstructors3): (WebCore::constructJSTestOverloadedConstructors4): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::constructJSTestOverloadedConstructorsWithSequence2): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefsConstructor::construct): (WebCore::jsTestTypedefsPrototypeFunctionSetShadow): (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg): (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction): (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2): (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
Modified Paths
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Diff
Modified: trunk/Source/WebCore/ChangeLog (206337 => 206338)
--- trunk/Source/WebCore/ChangeLog 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/ChangeLog 2016-09-23 23:57:26 UTC (rev 206338)
@@ -1,3 +1,129 @@
+2016-09-23 Yusuke Suzuki <[email protected]>
+
+ [Binding] Use unchekcedArgument if argumentCount is already checked
+ https://bugs.webkit.org/show_bug.cgi?id=162502
+
+ Reviewed by Geoffrey Garen.
+
+ It is not necessary to use `exec->argument(n)` after checking the argument exists.
+ This patch changes `argument(n)` to `uncheckedArgument(n)` if we already proved that
+ the argument exists. This change drops branches generated by `exec->argument(n)`.
+ And it is good for small DOM operations in which DOM binding code occupies large
+ part of entire processing. This patch and another small patch[1] offer roughly 5%
+ improvement in Dromaeo dom-attr's getAttribute and setAttribute tests.
+
+ [1]: https://bugs.webkit.org/show_bug.cgi?id=162503
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateParametersCheck): GenerateParameterCheck requires GenerateArgumentsCountCheck.
+ As a result, existence of mandatory arguments are already checked. We can use `uncheckedArgument(n)`
+ for mandatory arguments.
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+ (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
+ (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+ (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
+ * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+ (WebCore::jsTestEventTargetPrototypeFunctionItem):
+ * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+ (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
+ (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1):
+ (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2):
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ (WebCore::JSTestInterfaceConstructor::construct):
+ (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
+ (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+ (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
+ * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+ (WebCore::JSTestNamedConstructorNamedConstructor::construct):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::JSTestObjConstructor::construct):
+ (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1):
+ (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2):
+ (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
+ (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString):
+ (WebCore::jsTestObjPrototypeFunctionSerializedValue):
+ (WebCore::jsTestObjPrototypeFunctionOptionsObject):
+ (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
+ (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod):
+ (WebCore::jsTestObjPrototypeFunctionAddEventListener):
+ (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
+ (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
+ (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
+ (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
+ (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
+ (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
+ (WebCore::jsTestObjPrototypeFunctionGetElementById):
+ (WebCore::jsTestObjPrototypeFunctionConvert1):
+ (WebCore::jsTestObjPrototypeFunctionConvert2):
+ (WebCore::jsTestObjPrototypeFunctionConvert3):
+ (WebCore::jsTestObjPrototypeFunctionConvert4):
+ (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
+ (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
+ (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
+ (WebCore::jsTestObjPrototypeFunctionAny):
+ (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
+ (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
+ (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
+ (WebCore::jsTestObjPrototypeFunctionConditionalOverload1):
+ (WebCore::jsTestObjPrototypeFunctionConditionalOverload2):
+ (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1):
+ (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2):
+ (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot):
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+ (WebCore::constructJSTestOverloadedConstructors1):
+ (WebCore::constructJSTestOverloadedConstructors2):
+ (WebCore::constructJSTestOverloadedConstructors3):
+ (WebCore::constructJSTestOverloadedConstructors4):
+ * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
+ (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+ (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ (WebCore::JSTestTypedefsConstructor::construct):
+ (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
+ (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
+ (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg):
+ (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
+ (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction):
+ (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2):
+ (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
+
2016-09-23 Alex Christensen <[email protected]>
Refactor URLParser
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-09-23 23:57:26 UTC (rev 206338)
@@ -3987,10 +3987,11 @@
}
push(@$outputArray, " }\n");
} else {
+ die "CallbackInterface does not support Variadic parameter" if $parameter->isVariadic;
if ($codeGenerator->IsFunctionOnlyCallbackInterface($type)) {
- push(@$outputArray, " if (UNLIKELY(!state->argument($argumentIndex).isFunction()))\n");
+ push(@$outputArray, " if (UNLIKELY(!state->uncheckedArgument($argumentIndex).isFunction()))\n");
} else {
- push(@$outputArray, " if (UNLIKELY(!state->argument($argumentIndex).isObject()))\n");
+ push(@$outputArray, " if (UNLIKELY(!state->uncheckedArgument($argumentIndex).isObject()))\n");
}
push(@$outputArray, " return throwArgumentMustBeFunctionError(*state, throwScope, $argumentIndex, \"$name\", \"$visibleInterfaceName\", $quotedFunctionName);\n");
if ($function->isStatic) {
@@ -4026,6 +4027,9 @@
my $defineOptionalValue = "auto optionalValue";
my $indent = "";
+ die "Variadic parameter is already handled here" if $parameter->isVariadic;
+ my $argumentLookupMethod = $parameter->isOptional ? "argument" : "uncheckedArgument";
+
if ($parameter->isOptional && !defined($parameter->default)) {
$nativeType = "Optional<$className>";
$optionalValue = $name;
@@ -4032,7 +4036,7 @@
$defineOptionalValue = $name;
}
- push(@$outputArray, " auto ${name}Value = state->argument($argumentIndex);\n");
+ push(@$outputArray, " auto ${name}Value = state->$argumentLookupMethod($argumentIndex);\n");
push(@$outputArray, " $nativeType $name;\n");
if ($parameter->isOptional) {
@@ -4061,9 +4065,12 @@
my $isTearOff = $codeGenerator->IsSVGTypeNeedingTearOff($type) && $interfaceName !~ /List$/;
my $shouldPassByReference = $isTearOff || ShouldPassWrapperByReference($parameter, $interface);
+ die "Variadic parameter is already handled here" if $parameter->isVariadic;
+ my $argumentLookupMethod = $parameter->isOptional ? "argument" : "uncheckedArgument";
+
if (!$shouldPassByReference && $codeGenerator->IsWrapperType($type)) {
$implIncludes{"<runtime/Error.h>"} = 1;
- my $checkedArgument = "state->argument($argumentIndex)";
+ my $checkedArgument = "state->$argumentLookupMethod($argumentIndex)";
my $uncheckedArgument = "state->uncheckedArgument($argumentIndex)";
my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $parameter, $uncheckedArgument, $function->signature->extendedAttributes->{"Conditional"});
push(@$outputArray, " $nativeType $name = nullptr;\n");
@@ -4098,15 +4105,15 @@
$defaultValue = "JSValue::JSUndefined" if $defaultValue eq "undefined";
}
- $outer = "state->argument($argumentIndex).isUndefined() ? $defaultValue : ";
+ $outer = "state->$argumentLookupMethod($argumentIndex).isUndefined() ? $defaultValue : ";
$inner = "state->uncheckedArgument($argumentIndex)";
} elsif ($parameter->isOptional && !defined($parameter->default)) {
# Use WTF::Optional<>() for optional parameters that are missing or undefined and that do not have a default value in the IDL.
- $outer = "state->argument($argumentIndex).isUndefined() ? Optional<$nativeType>() : ";
+ $outer = "state->$argumentLookupMethod($argumentIndex).isUndefined() ? Optional<$nativeType>() : ";
$inner = "state->uncheckedArgument($argumentIndex)";
} else {
$outer = "";
- $inner = "state->argument($argumentIndex)";
+ $inner = "state->$argumentLookupMethod($argumentIndex)";
}
my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $parameter, $inner, $function->signature->extendedAttributes->{"Conditional"});
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -203,7 +203,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto nextChild = JSNode::toWrapped(state->argument(0));
+ auto nextChild = JSNode::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!nextChild))
return throwArgumentTypeError(*state, throwScope, 0, "nextChild", "TestActiveDOMObject", "excitingFunction", "Node");
impl.excitingFunction(*nextChild);
@@ -223,7 +223,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto message = state->argument(0).toWTFString(state);
+ auto message = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.postMessage(WTFMove(message));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -200,7 +200,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto str = state->argument(0).toWTFString(state);
+ auto str = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.anotherFunction(WTFMove(str));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -213,7 +213,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto index = convert<uint32_t>(*state, state->argument(0), NormalConversion);
+ auto index = convert<uint32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(state, castedThis->globalObject(), impl.item(WTFMove(index)));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -375,7 +375,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto testParam = state->argument(0).toWTFString(state);
+ auto testParam = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.regularOperation(WTFMove(testParam));
@@ -396,7 +396,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto testParam = state->argument(0).toWTFString(state);
+ auto testParam = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.enabledAtRuntimeOperation(WTFMove(testParam));
@@ -419,7 +419,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto testParam = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto testParam = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.enabledAtRuntimeOperation(WTFMove(testParam));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -230,7 +230,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto str1 = state->argument(0).toWTFString(state);
+ auto str1 = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto str2 = state->argument(1).isUndefined() ? ASCIILiteral("defaultString") : state->uncheckedArgument(1).toWTFString(state);
@@ -859,10 +859,10 @@
auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
if (!context)
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(0).toWTFString(state);
+ auto strArg = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(1));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(1));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 1, "objArg", "TestInterface", "implementsMethod2", "TestObj");
JSValue result = toJS(state, castedThis->globalObject(), impl.implementsMethod2(*context, WTFMove(strArg), *objArg, ec));
@@ -937,10 +937,10 @@
auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
if (!context)
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(0).toWTFString(state);
+ auto strArg = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(1));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(1));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 1, "objArg", "TestInterface", "supplementalMethod2", "TestObj");
JSValue result = toJS(state, castedThis->globalObject(), WebCore::TestSupplemental::supplementalMethod2(impl, *context, WTFMove(strArg), *objArg, ec));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -165,7 +165,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- if (UNLIKELY(!state->argument(0).isFunction()))
+ if (UNLIKELY(!state->uncheckedArgument(0).isFunction()))
return throwArgumentMustBeFunctionError(*state, throwScope, 0, "listener", "TestMediaQueryListListener", "method");
auto listener = JSMediaQueryListListener::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
impl.method(WTFMove(listener));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -90,7 +90,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto str1 = state->argument(0).toWTFString(state);
+ auto str1 = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto str2 = state->argument(1).isUndefined() ? ASCIILiteral("defaultString") : state->uncheckedArgument(1).toWTFString(state);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -1137,10 +1137,10 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- if (UNLIKELY(!state->argument(0).isObject()))
+ if (UNLIKELY(!state->uncheckedArgument(0).isObject()))
return throwArgumentMustBeFunctionError(*state, throwScope, 0, "testCallback", "TestObject", nullptr);
auto testCallback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
- if (UNLIKELY(!state->argument(1).isFunction()))
+ if (UNLIKELY(!state->uncheckedArgument(1).isFunction()))
return throwArgumentMustBeFunctionError(*state, throwScope, 1, "testCallbackFunction", "TestObject", nullptr);
auto testCallbackFunction = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject());
ScriptExecutionContext* context = castedThis->scriptExecutionContext();
@@ -4621,7 +4621,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto testParam = state->argument(0).toWTFString(state);
+ auto testParam = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.enabledAtRuntimeOperation(WTFMove(testParam));
@@ -4644,7 +4644,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto testParam = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto testParam = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.enabledAtRuntimeOperation(WTFMove(testParam));
@@ -4702,13 +4702,13 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 3))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto longArg = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(1).toWTFString(state);
+ auto strArg = state->uncheckedArgument(1).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(2));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "voidMethodWithArgs", "TestObj");
impl.voidMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg);
@@ -4743,13 +4743,13 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 3))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto byteArg = convert<int8_t>(*state, state->argument(0), NormalConversion);
+ auto byteArg = convert<int8_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(1).toWTFString(state);
+ auto strArg = state->uncheckedArgument(1).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(2));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "byteMethodWithArgs", "TestObj");
JSValue result = jsNumber(impl.byteMethodWithArgs(WTFMove(byteArg), WTFMove(strArg), *objArg));
@@ -4784,13 +4784,13 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 3))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto octetArg = convert<uint8_t>(*state, state->argument(0), NormalConversion);
+ auto octetArg = convert<uint8_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(1).toWTFString(state);
+ auto strArg = state->uncheckedArgument(1).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(2));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "octetMethodWithArgs", "TestObj");
JSValue result = jsNumber(impl.octetMethodWithArgs(WTFMove(octetArg), WTFMove(strArg), *objArg));
@@ -4825,13 +4825,13 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 3))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto longArg = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(1).toWTFString(state);
+ auto strArg = state->uncheckedArgument(1).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(2));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "longMethodWithArgs", "TestObj");
JSValue result = jsNumber(impl.longMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg));
@@ -4866,13 +4866,13 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 3))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto longArg = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto strArg = state->argument(1).toWTFString(state);
+ auto strArg = state->uncheckedArgument(1).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(2));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(2));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 2, "objArg", "TestObject", "objMethodWithArgs", "TestObj");
JSValue result = toJS(state, castedThis->globalObject(), impl.objMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg));
@@ -4907,7 +4907,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arg = valueToStringTreatingNullAsEmptyString(state, state->argument(0));
+ auto arg = valueToStringTreatingNullAsEmptyString(state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.methodWithArgTreatingNullAsEmptyString(WTFMove(arg));
@@ -4927,7 +4927,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto resolver = JSXPathNSResolver::toWrapped(*state, state->argument(0));
+ auto resolver = JSXPathNSResolver::toWrapped(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
if (UNLIKELY(!resolver))
@@ -4973,7 +4973,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto index = convert<uint32_t>(*state, state->argument(0), NormalConversion);
+ auto index = convert<uint32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(WTFMove(index)));
@@ -4993,7 +4993,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto enumArgValue = state->argument(0);
+ auto enumArgValue = state->uncheckedArgument(0);
TestObj::EnumType enumArg;
auto optionalValue = parse<TestObj::EnumType>(*state, enumArgValue);
if (UNLIKELY(throwScope.exception()))
@@ -5070,10 +5070,10 @@
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto strArg = state->argument(0).toWTFString(state);
+ auto strArg = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArg = JSTestObj::toWrapped(state->argument(1));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(1));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 1, "objArg", "TestObject", "methodThatRequiresAllArgsAndThrows", "TestObj");
JSValue result = toJS(state, castedThis->globalObject(), impl.methodThatRequiresAllArgsAndThrows(WTFMove(strArg), *objArg, ec));
@@ -5095,7 +5095,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto str = valueToUSVString(state, state->argument(0));
+ auto str = valueToUSVString(state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.methodWithUSVStringArg(WTFMove(str));
@@ -5115,7 +5115,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto str = valueToUSVStringWithUndefinedOrNullCheck(state, state->argument(0));
+ auto str = valueToUSVStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.methodWithNullableUSVStringArg(WTFMove(str));
@@ -5135,7 +5135,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto str = valueToUSVStringTreatingNullAsEmptyString(state, state->argument(0));
+ auto str = valueToUSVStringTreatingNullAsEmptyString(state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.methodWithUSVStringArgTreatingNullAsEmptyString(WTFMove(str));
@@ -5155,7 +5155,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto serializedArg = SerializedScriptValue::create(state, state->argument(0), 0, 0);
+ auto serializedArg = SerializedScriptValue::create(state, state->uncheckedArgument(0), 0, 0);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.serializedValue(WTFMove(serializedArg));
@@ -5175,7 +5175,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto oo = Dictionary(state, state->argument(0));
+ auto oo = Dictionary(state, state->uncheckedArgument(0));
auto ooo = Dictionary(state, state->argument(1));
impl.optionsObject(WTFMove(oo), WTFMove(ooo));
return JSValue::encode(jsUndefined());
@@ -5254,7 +5254,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto argument = state->argument(0).toWTFString(state);
+ auto argument = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsStringWithCache(state, impl.privateMethod(WTFMove(argument)));
@@ -5274,7 +5274,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto argument = state->argument(0).toWTFString(state);
+ auto argument = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsStringWithCache(state, impl.publicAndPrivateMethod(WTFMove(argument)));
@@ -5294,10 +5294,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto type = state->argument(0).toWTFString(state);
+ auto type = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto listener = JSEventListener::create(state->argument(1), *castedThis, false, currentWorld(state));
+ auto listener = JSEventListener::create(state->uncheckedArgument(1), *castedThis, false, currentWorld(state));
if (UNLIKELY(!listener))
return throwArgumentTypeError(*state, throwScope, 1, "listener", "TestObject", "addEventListener", "EventListener");
auto useCapture = state->argument(2).toBoolean(state);
@@ -5320,10 +5320,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto type = state->argument(0).toWTFString(state);
+ auto type = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto listener = JSEventListener::create(state->argument(1), *castedThis, false, currentWorld(state));
+ auto listener = JSEventListener::create(state->uncheckedArgument(1), *castedThis, false, currentWorld(state));
if (UNLIKELY(!listener))
return throwArgumentTypeError(*state, throwScope, 1, "listener", "TestObject", "removeEventListener", "EventListener");
auto useCapture = state->argument(2).toBoolean(state);
@@ -5599,7 +5599,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto nonOpt = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto nonOpt = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto opt = state->argument(1).isUndefined() ? Optional<int32_t>() : convert<int32_t>(*state, state->uncheckedArgument(1), NormalConversion);
@@ -5622,7 +5622,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto nonOpt = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto nonOpt = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto opt1 = state->argument(1).isUndefined() ? Optional<int32_t>() : convert<int32_t>(*state, state->uncheckedArgument(1), NormalConversion);
@@ -6107,7 +6107,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- if (UNLIKELY(!state->argument(0).isObject()))
+ if (UNLIKELY(!state->uncheckedArgument(0).isObject()))
return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "methodWithCallbackArg");
auto callback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
impl.methodWithCallbackArg(WTFMove(callback));
@@ -6127,10 +6127,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto nonCallback = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto nonCallback = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- if (UNLIKELY(!state->argument(1).isObject()))
+ if (UNLIKELY(!state->uncheckedArgument(1).isObject()))
return throwArgumentMustBeFunctionError(*state, throwScope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackArg");
auto callback = JSTestCallback::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject());
impl.methodWithNonCallbackArgAndCallbackArg(WTFMove(nonCallback), WTFMove(callback));
@@ -6171,7 +6171,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- if (UNLIKELY(!state->argument(0).isFunction()))
+ if (UNLIKELY(!state->uncheckedArgument(0).isFunction()))
return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "methodWithCallbackFunctionArg");
auto callback = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
impl.methodWithCallbackFunctionArg(WTFMove(callback));
@@ -6191,10 +6191,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto nonCallback = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto nonCallback = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- if (UNLIKELY(!state->argument(1).isFunction()))
+ if (UNLIKELY(!state->uncheckedArgument(1).isFunction()))
return throwArgumentMustBeFunctionError(*state, throwScope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackFunctionArg");
auto callback = JSTestCallbackFunction::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject());
impl.methodWithNonCallbackArgAndCallbackFunctionArg(WTFMove(nonCallback), WTFMove(callback));
@@ -6244,7 +6244,7 @@
UNUSED_PARAM(throwScope);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- if (UNLIKELY(!state->argument(0).isObject()))
+ if (UNLIKELY(!state->uncheckedArgument(0).isObject()))
return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "staticMethodWithCallbackArg");
auto callback = createFunctionOnlyCallback<JSTestCallback>(state, jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), state->uncheckedArgument(0));
TestObj::staticMethodWithCallbackArg(WTFMove(callback));
@@ -6319,12 +6319,12 @@
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
TestObj* objArg = nullptr;
- if (!state->argument(0).isUndefinedOrNull()) {
+ if (!state->uncheckedArgument(0).isUndefinedOrNull()) {
objArg = JSTestObj::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 0, "objArg", "TestObject", "overloadedMethod", "TestObj");
}
- auto strArg = state->argument(1).toWTFString(state);
+ auto strArg = state->uncheckedArgument(1).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(objArg), WTFMove(strArg));
@@ -6345,7 +6345,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
TestObj* objArg = nullptr;
- if (!state->argument(0).isUndefinedOrNull()) {
+ if (!state->uncheckedArgument(0).isUndefinedOrNull()) {
objArg = JSTestObj::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 0, "objArg", "TestObject", "overloadedMethod", "TestObj");
@@ -6370,7 +6370,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto strArg = state->argument(0).toWTFString(state);
+ auto strArg = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(strArg));
@@ -6390,7 +6390,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto longArg = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto longArg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(longArg));
@@ -6410,7 +6410,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- if (UNLIKELY(!state->argument(0).isObject()))
+ if (UNLIKELY(!state->uncheckedArgument(0).isObject()))
return throwArgumentMustBeFunctionError(*state, throwScope, 0, "callback", "TestObject", "overloadedMethod");
auto callback = JSTestCallback::create(asObject(state->uncheckedArgument(0)), castedThis->globalObject());
impl.overloadedMethod(WTFMove(callback));
@@ -6431,7 +6431,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
DOMStringList* listArg = nullptr;
- if (!state->argument(0).isUndefinedOrNull()) {
+ if (!state->uncheckedArgument(0).isUndefinedOrNull()) {
listArg = JSDOMStringList::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!listArg))
return throwArgumentTypeError(*state, throwScope, 0, "listArg", "TestObject", "overloadedMethod", "DOMStringList");
@@ -6453,7 +6453,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arrayArg = toNativeArray<String>(*state, state->argument(0));
+ auto arrayArg = toNativeArray<String>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(arrayArg));
@@ -6473,7 +6473,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto objArg = JSTestObj::toWrapped(state->argument(0));
+ auto objArg = JSTestObj::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 0, "objArg", "TestObject", "overloadedMethod", "TestObj");
impl.overloadedMethod(*objArg);
@@ -6493,7 +6493,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arrayArg = toNativeArray<String>(*state, state->argument(0));
+ auto arrayArg = toNativeArray<String>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(arrayArg));
@@ -6513,7 +6513,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arrayArg = toNativeArray<uint32_t>(*state, state->argument(0));
+ auto arrayArg = toNativeArray<uint32_t>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(arrayArg));
@@ -6533,7 +6533,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto strArg = state->argument(0).toWTFString(state);
+ auto strArg = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(WTFMove(strArg));
@@ -6615,7 +6615,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto strArg = state->argument(0).toWTFString(state);
+ auto strArg = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
TestObj* objArg = nullptr;
@@ -6642,7 +6642,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
TestObj* objArg = nullptr;
- if (!state->argument(0).isUndefinedOrNull()) {
+ if (!state->uncheckedArgument(0).isUndefinedOrNull()) {
objArg = JSTestObj::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!objArg))
return throwArgumentTypeError(*state, throwScope, 0, "objArg", "TestObject", "overloadedMethodWithOptionalParameter", "TestObj");
@@ -6718,7 +6718,7 @@
UNUSED_PARAM(throwScope);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arg = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto arg = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
TestObj::overloadedMethod1(WTFMove(arg));
@@ -6735,7 +6735,7 @@
UNUSED_PARAM(throwScope);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto type = state->argument(0).toWTFString(state);
+ auto type = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
TestObj::overloadedMethod1(WTFMove(type));
@@ -6778,10 +6778,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto objArgsShort = convert<uint16_t>(*state, state->argument(0), Clamp);
+ auto objArgsShort = convert<uint16_t>(*state, state->uncheckedArgument(0), Clamp);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArgsLong = convert<uint32_t>(*state, state->argument(1), Clamp);
+ auto objArgsLong = convert<uint32_t>(*state, state->uncheckedArgument(1), Clamp);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.classMethodWithClamp(WTFMove(objArgsShort), WTFMove(objArgsLong));
@@ -6801,10 +6801,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto objArgsShort = convert<uint16_t>(*state, state->argument(0), EnforceRange);
+ auto objArgsShort = convert<uint16_t>(*state, state->uncheckedArgument(0), EnforceRange);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto objArgsLong = convert<uint32_t>(*state, state->argument(1), EnforceRange);
+ auto objArgsLong = convert<uint32_t>(*state, state->uncheckedArgument(1), EnforceRange);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.classMethodWithEnforceRange(WTFMove(objArgsShort), WTFMove(objArgsLong));
@@ -6824,7 +6824,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto unsignedLongSequence = toNativeArray<uint32_t>(*state, state->argument(0));
+ auto unsignedLongSequence = toNativeArray<uint32_t>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.methodWithUnsignedLongSequence(WTFMove(unsignedLongSequence));
@@ -6845,7 +6845,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto values = toNativeArray<String>(*state, state->argument(0));
+ auto values = toNativeArray<String>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsArray(state, castedThis->globalObject(), impl.stringArrayFunction(WTFMove(values), ec));
@@ -6868,7 +6868,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto values = JSDOMStringList::toWrapped(state->argument(0));
+ auto values = JSDOMStringList::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!values))
return throwArgumentTypeError(*state, throwScope, 0, "values", "TestObject", "domStringListFunction", "DOMStringList");
JSValue result = toJS(state, castedThis->globalObject(), impl.domStringListFunction(*values, ec));
@@ -6890,10 +6890,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arrayArg = toNativeArray<uint32_t>(*state, state->argument(0));
+ auto arrayArg = toNativeArray<uint32_t>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto nullableArrayArg = toNativeArray<uint32_t>(*state, state->argument(1));
+ auto nullableArrayArg = toNativeArray<uint32_t>(*state, state->uncheckedArgument(1));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.methodWithAndWithoutNullableSequence(WTFMove(arrayArg), WTFMove(nullableArrayArg));
@@ -6913,7 +6913,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto elementId = AtomicString(state->argument(0).toString(state)->toExistingAtomicString(state));
+ auto elementId = AtomicString(state->uncheckedArgument(0).toString(state)->toExistingAtomicString(state));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(state, castedThis->globalObject(), impl.getElementById(WTFMove(elementId)));
@@ -6953,7 +6953,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto value = JSTestNode::toWrapped(state->argument(0));
+ auto value = JSTestNode::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!value))
return throwArgumentTypeError(*state, throwScope, 0, "value", "TestObject", "convert1", "TestNode");
impl.convert1(*value);
@@ -6974,7 +6974,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
TestNode* value = nullptr;
- if (!state->argument(0).isUndefinedOrNull()) {
+ if (!state->uncheckedArgument(0).isUndefinedOrNull()) {
value = JSTestNode::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!value))
return throwArgumentTypeError(*state, throwScope, 0, "value", "TestObject", "convert2", "TestNode");
@@ -6996,7 +6996,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto value = state->argument(0).toWTFString(state);
+ auto value = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.convert3(WTFMove(value));
@@ -7016,7 +7016,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto value = valueToStringWithUndefinedOrNullCheck(state, state->argument(0));
+ auto value = valueToStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.convert4(WTFMove(value));
@@ -7081,7 +7081,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto head = state->argument(0).toWTFString(state);
+ auto head = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto tail = toArguments<VariadicHelper<JSC::JSValue, String>>(*state, 1);
@@ -7104,7 +7104,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto head = convert<double>(*state, state->argument(0), ShouldAllowNonFinite::Yes);
+ auto head = convert<double>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::Yes);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto tail = toArguments<VariadicHelper<JSC::JSValue, double>>(*state, 1);
@@ -7127,7 +7127,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto head = JSNode::toWrapped(state->argument(0));
+ auto head = JSNode::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!head))
return throwArgumentTypeError(*state, throwScope, 0, "head", "TestObject", "variadicNodeMethod", "Node");
auto tail = toArguments<VariadicHelper<JSNode, Node>>(*state, 1);
@@ -7150,10 +7150,10 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto a = convert<float>(*state, state->argument(0), ShouldAllowNonFinite::Yes);
+ auto a = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::Yes);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto b = convert<int32_t>(*state, state->argument(1), NormalConversion);
+ auto b = convert<int32_t>(*state, state->uncheckedArgument(1), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.any(WTFMove(a), WTFMove(b));
@@ -7204,7 +7204,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto a = convert<float>(*state, state->argument(0), ShouldAllowNonFinite::No);
+ auto a = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::No);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.testPromiseFunctionWithFloatArgument(WTFMove(a), WTFMove(promise));
@@ -7283,7 +7283,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto a = convert<float>(*state, state->argument(0), ShouldAllowNonFinite::No);
+ auto a = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::No);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.testPromiseOverloadedFunction(WTFMove(a), WTFMove(promise));
@@ -7311,7 +7311,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto request = JSFetchRequest::toWrapped(state->argument(0));
+ auto request = JSFetchRequest::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!request))
return throwArgumentTypeError(*state, throwScope, 0, "request", "TestObject", "testPromiseOverloadedFunction", "FetchRequest");
impl.testPromiseOverloadedFunction(*request, WTFMove(promise));
@@ -7416,7 +7416,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto str = state->argument(0).toWTFString(state);
+ auto str = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.conditionalOverload(WTFMove(str));
@@ -7439,7 +7439,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto a = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto a = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.conditionalOverload(WTFMove(a));
@@ -7482,7 +7482,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto str = state->argument(0).toWTFString(state);
+ auto str = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.singleConditionalOverload(WTFMove(str));
@@ -7503,7 +7503,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto a = convert<int32_t>(*state, state->argument(0), NormalConversion);
+ auto a = convert<int32_t>(*state, state->uncheckedArgument(0), NormalConversion);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.singleConditionalOverload(WTFMove(a));
@@ -7542,7 +7542,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto init = convertDictionary<TestObj::Dictionary>(*state, state->argument(0));
+ auto init = convertDictionary<TestObj::Dictionary>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.attachShadowRoot(init.value());
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -74,7 +74,7 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arrayBuffer = toArrayBuffer(state->argument(0));
+ auto arrayBuffer = toArrayBuffer(state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
if (UNLIKELY(!arrayBuffer))
@@ -92,7 +92,7 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arrayBufferView = toArrayBufferView(state->argument(0));
+ auto arrayBufferView = toArrayBufferView(state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
if (UNLIKELY(!arrayBufferView))
@@ -110,7 +110,7 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto blob = JSBlob::toWrapped(state->argument(0));
+ auto blob = JSBlob::toWrapped(state->uncheckedArgument(0));
if (UNLIKELY(!blob))
return throwArgumentTypeError(*state, throwScope, 0, "blob", "TestOverloadedConstructors", nullptr, "Blob");
auto object = TestOverloadedConstructors::create(*blob);
@@ -126,7 +126,7 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto string = state->argument(0).toWTFString(state);
+ auto string = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto object = TestOverloadedConstructors::create(WTFMove(string));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -87,7 +87,7 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto string = state->argument(0).toWTFString(state);
+ auto string = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto object = TestOverloadedConstructorsWithSequence::create(WTFMove(string));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -209,7 +209,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto name = state->argument(0).toWTFString(state);
+ auto name = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(state, castedThis->globalObject(), impl.namedItem(WTFMove(name)));
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (206337 => 206338)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2016-09-23 23:40:46 UTC (rev 206337)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2016-09-23 23:57:26 UTC (rev 206338)
@@ -131,10 +131,10 @@
ASSERT(castedThis);
if (UNLIKELY(state->argumentCount() < 2))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto hello = state->argument(0).toWTFString(state);
+ auto hello = state->uncheckedArgument(0).toWTFString(state);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- if (UNLIKELY(!state->argument(1).isObject()))
+ if (UNLIKELY(!state->uncheckedArgument(1).isObject()))
return throwArgumentMustBeFunctionError(*state, throwScope, 1, "testCallback", "TestTypedefs", nullptr);
auto testCallback = JSTestCallback::create(asObject(state->uncheckedArgument(1)), castedThis->globalObject());
auto object = TestTypedefs::create(WTFMove(hello), *testCallback);
@@ -516,13 +516,13 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 3))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto width = convert<float>(*state, state->argument(0), ShouldAllowNonFinite::Yes);
+ auto width = convert<float>(*state, state->uncheckedArgument(0), ShouldAllowNonFinite::Yes);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto height = convert<float>(*state, state->argument(1), ShouldAllowNonFinite::Yes);
+ auto height = convert<float>(*state, state->uncheckedArgument(1), ShouldAllowNonFinite::Yes);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
- auto blur = convert<float>(*state, state->argument(2), ShouldAllowNonFinite::Yes);
+ auto blur = convert<float>(*state, state->uncheckedArgument(2), ShouldAllowNonFinite::Yes);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto color = state->argument(3).isUndefined() ? String() : state->uncheckedArgument(3).toWTFString(state);
@@ -548,7 +548,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto sequenceArg = toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(*state, state->argument(0));
+ auto sequenceArg = toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.methodWithSequenceArg(WTFMove(sequenceArg)));
@@ -568,7 +568,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto sequenceArg = toNativeArray<String>(*state, state->argument(0));
+ auto sequenceArg = toNativeArray<String>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
impl.nullableSequenceArg(WTFMove(sequenceArg));
@@ -588,7 +588,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto arg1 = convert<uint64_t>(*state, state->argument(0), Clamp);
+ auto arg1 = convert<uint64_t>(*state, state->uncheckedArgument(0), Clamp);
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
auto arg2 = state->argument(1).isUndefined() ? Optional<uint64_t>() : convert<uint64_t>(*state, state->uncheckedArgument(1), Clamp);
@@ -627,7 +627,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto values = toNativeArray<String>(*state, state->argument(0));
+ auto values = toNativeArray<String>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsArray(state, castedThis->globalObject(), impl.stringSequenceFunction(WTFMove(values), ec));
@@ -650,7 +650,7 @@
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
ExceptionCode ec = 0;
- auto values = toNativeArray<String>(*state, state->argument(0));
+ auto values = toNativeArray<String>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsArray(state, castedThis->globalObject(), impl.stringSequenceFunction2(WTFMove(values), ec));
@@ -672,7 +672,7 @@
auto& impl = castedThis->wrapped();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto sequenceArg = toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(*state, state->argument(0));
+ auto sequenceArg = toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(*state, state->uncheckedArgument(0));
if (UNLIKELY(throwScope.exception()))
return JSValue::encode(jsUndefined());
JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(WTFMove(sequenceArg)));
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
