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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart

Issue 27510002: Add a much simplified set implementation designed to waste little memory for small sets. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
index 1d0932255e4cee3bc104cd245dbd7e180ff2b908..898a51cd46cde52598d02505d57e35ff8e569fb2 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart
@@ -46,7 +46,7 @@ abstract class TypeInformation {
bool get isConcrete => false;
TypeInformation([users, assignments])
- : users = (users == null) ? new Set<TypeInformation>() : users,
+ : users = (users == null) ? new Setlet<TypeInformation>() : users,
assignments = (assignments == null) ? <TypeInformation>[] : assignments;
@@ -176,8 +176,8 @@ class ParameterAssignments extends IterableBase<TypeInformation> {
*/
class ElementTypeInformation extends TypeInformation {
final Element element;
- final Map<Element, Set<Spannable>> callers =
- new Map<Element, Set<Spannable>>();
+ final Map<Element, Setlet<Spannable>> callers =
+ new Map<Element, Setlet<Spannable>>();
ElementTypeInformation.internal(this.element, assignments)
: super(null, assignments);
@@ -192,11 +192,11 @@ class ElementTypeInformation extends TypeInformation {
}
void addCall(Element caller, Spannable node) {
- callers.putIfAbsent(caller, () => new Set<Spannable>()).add(node);
+ callers.putIfAbsent(caller, () => new Setlet<Spannable>()).add(node);
}
void removeCall(Element caller, Spannable node) {
- Set<Spannable> calls = callers[caller];
+ Setlet<Spannable> calls = callers[caller];
if (calls == null) return;
calls.remove(node);
if (calls.isEmpty) {

Powered by Google App Engine
This is Rietveld 408576698