Title: [200314] trunk/Source/WebCore
- Revision
- 200314
- Author
- [email protected]
- Date
- 2016-05-01 17:21:50 -0700 (Sun, 01 May 2016)
Log Message
Drop CanUseWTFOptionalForParameter() from bindings generator
https://bugs.webkit.org/show_bug.cgi?id=157247
Reviewed by Darin Adler.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
(CanUseWTFOptionalForParameter): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (200313 => 200314)
--- trunk/Source/WebCore/ChangeLog 2016-05-02 00:17:55 UTC (rev 200313)
+++ trunk/Source/WebCore/ChangeLog 2016-05-02 00:21:50 UTC (rev 200314)
@@ -1,3 +1,14 @@
+2016-05-01 Chris Dumez <[email protected]>
+
+ Drop CanUseWTFOptionalForParameter() from bindings generator
+ https://bugs.webkit.org/show_bug.cgi?id=157247
+
+ Reviewed by Darin Adler.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateParametersCheck):
+ (CanUseWTFOptionalForParameter): Deleted.
+
2016-05-01 Darin Adler <[email protected]>
Update Fetch to use enum class instead of string for enumerations
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200313 => 200314)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-05-02 00:17:55 UTC (rev 200313)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-05-02 00:21:50 UTC (rev 200314)
@@ -3448,19 +3448,6 @@
}
}
-sub CanUseWTFOptionalForParameter
-{
- my $parameter = shift;
- my $type = $parameter->type;
-
- # FIXME: We should progressively stop blacklisting each type below
- # and eventually get rid of this function entirely.
- return 0 if $parameter->isVariadic;
- return 0 if $codeGenerator->IsStringBasedEnumType($type);
-
- return 1;
-}
-
my %automaticallyGeneratedDefaultValues = (
"any" => "undefined",
@@ -3573,22 +3560,6 @@
$parameter->default("null") if $codeGenerator->IsCallbackInterface($argType);
}
- # FIXME: We should eventually stop generating any early calls, and instead use either default parameter values or WTF::Optional<>.
- if ($optional && !defined($parameter->default) && !CanUseWTFOptionalForParameter($parameter)) {
- # Generate early call if there are enough parameters.
- if (!$hasOptionalArguments) {
- push(@$outputArray, "\n size_t argsCount = state->argumentCount();\n");
- $hasOptionalArguments = 1;
- }
- push(@$outputArray, " if (argsCount <= $argsIndex) {\n");
-
- my @optionalCallbackArguments = @arguments;
- push @optionalCallbackArguments, GenerateReturnParameters($function);
- my $functionString = "$functionName(" . join(", ", @optionalCallbackArguments) . ")";
- GenerateImplementationFunctionCall($function, $functionString, " " x 2, $svgPropertyType, $interfaceName);
- push(@$outputArray, " }\n\n");
- }
-
my $name = $parameter->name;
my $value = $name;
@@ -3783,7 +3754,7 @@
$outer = "state->argument($argsIndex).isUndefined() ? $defaultValue : ";
$inner = "state->uncheckedArgument($argsIndex)";
- } elsif ($optional && !defined($parameter->default) && CanUseWTFOptionalForParameter($parameter)) {
+ } elsif ($optional && !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.
my $defaultValue = "Optional<$nativeType>()";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes