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

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

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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/universe/selector_map.dart ('k') | lib/compiler/implementation/util/link.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/universe/universe.dart
diff --git a/lib/compiler/implementation/universe/universe.dart b/lib/compiler/implementation/universe/universe.dart
index 505c5d4e89aa5b9a57079fa035dbaeb4268f491e..d9df893ca0525fb36f2da1196ad7c96c14a9cc16 100644
--- a/lib/compiler/implementation/universe/universe.dart
+++ b/lib/compiler/implementation/universe/universe.dart
@@ -136,7 +136,7 @@ class Selector {
: this.name = name,
this.library = name.isPrivate() ? library : null,
this.namedArguments = namedArguments,
- this.orderedNamedArguments = namedArguments.isEmpty()
+ this.orderedNamedArguments = namedArguments.isEmpty
? namedArguments
: <SourceString>[] {
assert(!name.isPrivate() || library != null);
@@ -246,7 +246,7 @@ class Selector {
// number of positional arguments are not greater than the
// number of parameters.
assert(positionalArgumentCount <= parameters.parameterCount);
- return namedArguments.isEmpty();
+ return namedArguments.isEmpty;
}
} else {
if (positionalArgumentCount > requiredParameterCount) return false;
@@ -275,8 +275,8 @@ class Selector {
int requiredParameterCount = parameters.requiredParameterCount;
int optionalParameterCount = parameters.optionalParameterCount;
- bool hasOptionalParameters = !parameters.optionalParameters.isEmpty();
- if (namedArguments.isEmpty()) {
+ bool hasOptionalParameters = !parameters.optionalParameters.isEmpty;
+ if (namedArguments.isEmpty) {
if (!hasOptionalParameters) {
return requiredParameterCount == argumentCount;
} else {
@@ -291,7 +291,7 @@ class Selector {
}
Set<SourceString> nameSet = new Set<SourceString>();
for (;
- !remainingNamedParameters.isEmpty();
+ !remainingNamedParameters.isEmpty;
remainingNamedParameters = remainingNamedParameters.tail) {
nameSet.add(remainingNamedParameters.head.name);
}
@@ -328,7 +328,7 @@ class Selector {
// Visit named arguments and add them into a temporary list.
List compiledNamedArguments = [];
- for (; !arguments.isEmpty(); arguments = arguments.tail) {
+ for (; !arguments.isEmpty; arguments = arguments.tail) {
NamedArgument namedArgument = arguments.head;
compiledNamedArguments.add(compileArgument(namedArgument.expression));
}
@@ -346,7 +346,7 @@ class Selector {
// their values: either in the temporary list or using the
// default value.
for (;
- !remainingNamedParameters.isEmpty();
+ !remainingNamedParameters.isEmpty;
remainingNamedParameters = remainingNamedParameters.tail) {
Element parameter = remainingNamedParameters.head;
int foundIndex = namedArguments.indexOf(parameter.name);
@@ -389,7 +389,7 @@ class Selector {
compiler);
} else {
parameters.forEachOptionalParameter((element) {
- if (!arguments.isEmpty()) {
+ if (!arguments.isEmpty) {
list.add(compileArgument(arguments.head));
arguments = arguments.tail;
} else {
@@ -400,7 +400,7 @@ class Selector {
} else {
// Visit named arguments and add them into a temporary list.
List compiledNamedArguments = [];
- for (; !arguments.isEmpty(); arguments = arguments.tail) {
+ for (; !arguments.isEmpty; arguments = arguments.tail) {
NamedArgument namedArgument = arguments.head;
compiledNamedArguments.add(compileArgument(namedArgument.expression));
}
@@ -441,8 +441,8 @@ class Selector {
}
List<SourceString> getOrderedNamedArguments() {
- if (namedArguments.isEmpty()) return namedArguments;
- if (!orderedNamedArguments.isEmpty()) return orderedNamedArguments;
+ if (namedArguments.isEmpty) return namedArguments;
+ if (!orderedNamedArguments.isEmpty) return orderedNamedArguments;
orderedNamedArguments.addAll(namedArguments);
orderedNamedArguments.sort((SourceString first, SourceString second) {
« no previous file with comments | « lib/compiler/implementation/universe/selector_map.dart ('k') | lib/compiler/implementation/util/link.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698