Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: lib/compiler/implementation/universe/universe.dart

Issue 10919316: Address Peter's comments on the new parameter specification implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/universe/universe.dart
===================================================================
--- lib/compiler/implementation/universe/universe.dart (revision 12495)
+++ lib/compiler/implementation/universe/universe.dart (working copy)
@@ -207,6 +207,8 @@
if (positionalArgumentCount < requiredParameterCount) return false;
if (!parameters.optionalParametersAreNamed) {
+ // TODO(5074): Remove this check once we don't accept the
+ // deprecated parameter specification.
if (!Compiler.REJECT_NAMED_ARGUMENT_AS_POSITIONAL) {
return optionalParametersAppliesDEPRECATED(element, compiler);
} else {
@@ -219,6 +221,7 @@
}
} else {
if (positionalArgumentCount > requiredParameterCount) return false;
+ assert(positionalArgumentCount == requiredParameterCount);
if (namedArgumentCount > optionalParameterCount) return false;
Set<SourceString> nameSet = new Set<SourceString>();
parameters.optionalParameters.forEach((Element element) {
@@ -226,9 +229,9 @@
});
for (SourceString name in namedArguments) {
if (!nameSet.contains(name)) return false;
- // TODO(ngeoffray): By removing from the set we are checking
+ // TODO(5213): By removing from the set we are checking
// that we are not passing the name twice. We should have this
- // check in the resolver instead.
+ // check in the resolver also.
nameSet.remove(name);
}
return true;
@@ -345,6 +348,8 @@
});
if (!parameters.optionalParametersAreNamed) {
+ // TODO(5074): Remove this check once we don't accept the
+ // deprecated parameter specification.
if (!Compiler.REJECT_NAMED_ARGUMENT_AS_POSITIONAL) {
addOptionalArgumentsToListDEPRECATED(
arguments, list, element, compileArgument, compileConstant,
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698