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

Unified Diff: pkg/compiler/lib/src/universe/function_set.dart

Issue 2580403002: Extract ClosedWorldImpl from WorldImpl. (Closed)
Patch Set: Created 4 years 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: pkg/compiler/lib/src/universe/function_set.dart
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index 0fb00187f1daab198ecb8b13807d6c59c539d192..e631e507a50a73587f6774b027257c8a2c6fa93c 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -13,13 +13,8 @@ import '../world.dart' show ClosedWorld;
import 'selector.dart' show Selector;
import 'world_builder.dart' show ReceiverConstraint;
-// TODO(kasperl): This actually holds getters and setters just fine
-// too and stricly they aren't functions. Maybe this needs a better
-// name -- something like ElementSet seems a bit too generic.
-class FunctionSet {
- final ClosedWorld closedWorld;
+class FunctionSetBuilder {
final Map<String, FunctionSetNode> nodes = new Map<String, FunctionSetNode>();
- FunctionSet(this.closedWorld);
FunctionSetNode newNode(String name) => new FunctionSetNode(name);
@@ -41,6 +36,20 @@ class FunctionSet {
}
}
+ FunctionSet close(ClosedWorld closedWorld) {
+ return new FunctionSet(closedWorld, nodes);
+ }
+}
+
+// TODO(kasperl): This actually holds getters and setters just fine
+// too and stricly they aren't functions. Maybe this needs a better
+// name -- something like ElementSet seems a bit too generic.
+class FunctionSet {
+ final ClosedWorld closedWorld;
+ final Map<String, FunctionSetNode> nodes;
+
+ FunctionSet(this.closedWorld, this.nodes);
+
bool contains(Element element) {
assert(element.isInstanceMember);
assert(!element.isAbstract);

Powered by Google App Engine
This is Rietveld 408576698