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

Unified Diff: sdk/lib/_internal/compiler/implementation/universe/function_set.dart

Issue 12262035: Simplify the selector map and get rid of the partial type tree. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: iterateMatching -> computeMatching. Created 7 years, 10 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: sdk/lib/_internal/compiler/implementation/universe/function_set.dart
diff --git a/sdk/lib/_internal/compiler/implementation/universe/function_set.dart b/sdk/lib/_internal/compiler/implementation/universe/function_set.dart
index 6afdf09f09e0a316424be476782ec216a95fc982..b6c6a53e197ebbfe42d39d25fed739b4cd99132f 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/function_set.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/function_set.dart
@@ -89,7 +89,7 @@ class FunctionSetNode {
isList = false;
}
elements.add(element);
- cache.clear();
+ if (!cache.isEmpty) cache.clear();
ngeoffray 2013/02/14 10:14:33 Why adding this?
}
}
@@ -103,14 +103,14 @@ class FunctionSetNode {
if (index != list.length) {
list[index] = last;
}
- cache.clear();
+ if (!cache.isEmpty) cache.clear();
} else {
Set set = elements;
if (set.remove(element)) {
// To avoid wobbling between the two representations, we do
// not transition back to the list representation even if we
// end up with few enough elements at this point.
- cache.clear();
+ if (!cache.isEmpty) cache.clear();
}
}
}

Powered by Google App Engine
This is Rietveld 408576698