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

Unified Diff: lib/compiler/implementation/universe/partial_type_tree.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/universe/partial_type_tree.dart
diff --git a/lib/compiler/implementation/universe/partial_type_tree.dart b/lib/compiler/implementation/universe/partial_type_tree.dart
index 3d69017ce5bff0296429f45e45b694d66e025826..ae6e9b961ed49ef9984582b5d78e19b64df6ab15 100644
--- a/lib/compiler/implementation/universe/partial_type_tree.dart
+++ b/lib/compiler/implementation/universe/partial_type_tree.dart
@@ -44,7 +44,7 @@ abstract class PartialTypeTree {
// tree. If so, we have a tree with interface subtypes. If not,
// keep track of them so we can deal with it if the interface is
// added to the tree later.
- for (Link link = type.interfaces; !link.isEmpty(); link = link.tail) {
+ for (Link link = type.interfaces; !link.isEmpty; link = link.tail) {
InterfaceType superType = link.head;
ClassElement superTypeElement = superType.element;
if (nodes.containsKey(superTypeElement)) {
@@ -86,11 +86,11 @@ abstract class PartialTypeTree {
// current node to being children of a new node if we need
// to insert that.
Link<PartialTypeTreeNode> subtypes = const Link();
- for (Link link = current.children; !link.isEmpty(); link = link.tail) {
+ for (Link link = current.children; !link.isEmpty; link = link.tail) {
PartialTypeTreeNode child = link.head;
ClassElement childType = child.type;
if (type.isSubclassOf(childType)) {
- assert(subtypes.isEmpty());
+ assert(subtypes.isEmpty);
current = child;
continue L;
} else if (childType.isSubclassOf(type)) {
@@ -105,10 +105,10 @@ abstract class PartialTypeTree {
// that are subtypes of the type of the new node below the new
// node in the hierarchy.
PartialTypeTreeNode newNode = newNode(type);
- if (!subtypes.isEmpty()) {
+ if (!subtypes.isEmpty) {
newNode.children = subtypes;
Link<PartialTypeTreeNode> remaining = const Link();
- for (Link link = current.children; !link.isEmpty(); link = link.tail) {
+ for (Link link = current.children; !link.isEmpty; link = link.tail) {
PartialTypeTreeNode child = link.head;
if (!child.type.isSubclassOf(type)) {
remaining = remaining.prepend(child);
@@ -137,7 +137,7 @@ abstract class PartialTypeTree {
L: while (!identical(current.type, type)) {
assert(type.isSubclassOf(current.type));
if (!visit(current)) return;
- for (Link link = current.children; !link.isEmpty(); link = link.tail) {
+ for (Link link = current.children; !link.isEmpty; link = link.tail) {
PartialTypeTreeNode child = link.head;
ClassElement childType = child.type;
if (type.isSubclassOf(childType)) {
@@ -167,7 +167,7 @@ class PartialTypeTreeNode {
*/
bool visitRecursively(bool visit(PartialTypeTreeNode node)) {
if (!visit(this)) return false;
- for (Link link = children; !link.isEmpty(); link = link.tail) {
+ for (Link link = children; !link.isEmpty; link = link.tail) {
PartialTypeTreeNode child = link.head;
if (!child.visitRecursively(visit)) return false;
}
« no previous file with comments | « lib/compiler/implementation/types/types.dart ('k') | lib/compiler/implementation/universe/selector_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698