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

Unified Diff: lib/compiler/implementation/closure.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
Index: lib/compiler/implementation/closure.dart
diff --git a/lib/compiler/implementation/closure.dart b/lib/compiler/implementation/closure.dart
index 090a8e9c5b304645014e2ee05fdd8ddd2f8148f9..9f5e2092f128efa666f15096b241c02458fc5462 100644
--- a/lib/compiler/implementation/closure.dart
+++ b/lib/compiler/implementation/closure.dart
@@ -115,7 +115,7 @@ class ClosureScope {
ClosureScope(this.boxElement, this.capturedVariableMapping)
: boxedLoopVariables = const <Element>[];
- bool hasBoxedLoopVariables() => !boxedLoopVariables.isEmpty();
+ bool hasBoxedLoopVariables() => !boxedLoopVariables.isEmpty;
}
class ClosureClassMap {
@@ -250,7 +250,7 @@ class ClosureTranslator extends Visitor {
}
});
ClassElement closureElement = data.closureClassElement;
- assert(closureElement != null || fieldCaptures.isEmpty());
+ assert(closureElement != null || fieldCaptures.isEmpty);
for (Element capturedElement in fieldCaptures) {
SourceString name;
if (capturedElement is BoxElement) {
@@ -302,7 +302,7 @@ class ClosureTranslator extends Visitor {
visitVariableDefinitions(VariableDefinitions node) {
for (Link<Node> link = node.definitions.nodes;
- !link.isEmpty();
+ !link.isEmpty;
link = link.tail) {
Node definition = link.head;
Element element = elements[definition];
@@ -436,7 +436,7 @@ class ClosureTranslator extends Visitor {
capturedVariableMapping[element] = boxed;
}
}
- if (!scopeMapping.isEmpty()) {
+ if (!scopeMapping.isEmpty) {
ClosureScope scope = new ClosureScope(box, scopeMapping);
closureData.capturingScopes[node] = scope;
}
@@ -469,7 +469,7 @@ class ClosureTranslator extends Visitor {
if (scopeData == null) return;
List<Element> result = <Element>[];
for (Link<Node> link = definitions.definitions.nodes;
- !link.isEmpty();
+ !link.isEmpty;
link = link.tail) {
Node definition = link.head;
Element element = elements[definition];
@@ -587,7 +587,7 @@ class ClosureTranslator extends Visitor {
// Mark all free variables as captured and use them in the outer function.
List<Element> freeVariables =
savedClosureData.freeVariableMapping.getKeys();
- assert(freeVariables.isEmpty() || savedInsideClosure);
+ assert(freeVariables.isEmpty || savedInsideClosure);
for (Element freeElement in freeVariables) {
if (capturedVariableMapping[freeElement] != null &&
capturedVariableMapping[freeElement] != freeElement) {

Powered by Google App Engine
This is Rietveld 408576698