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

Unified Diff: sdk/lib/_internal/compiler/implementation/compilation_info.dart

Issue 430913002: Better dependency tracking (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix self critiques Created 6 years, 5 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/compilation_info.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compilation_info.dart b/sdk/lib/_internal/compiler/implementation/compilation_info.dart
deleted file mode 100644
index 3732338f93b31391a07287fac39e8c908f2c3731..0000000000000000000000000000000000000000
--- a/sdk/lib/_internal/compiler/implementation/compilation_info.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-library dart2js.compilation_info;
-
-import 'dart2jslib.dart';
-import 'elements/elements.dart';
-import 'tree/tree.dart';
-
-
-abstract class CompilationInformation {
- factory CompilationInformation(Enqueuer enqueuer, bool dumpInfoEnabled) {
- if (dumpInfoEnabled) {
- return new _CompilationInformation(enqueuer);
- } else {
- return new _EmptyCompilationInformation();
- }
- }
-
- Map<Element, Set<Element>> get enqueuesMap;
- Map<Element, Set<Element>> get addsToWorkListMap;
-
- void enqueues(Element function, Element source) {}
- void addsToWorkList(Element context, Element element) {}
- void registerCallSite(TreeElements context, Send node) {}
-}
-
-class _EmptyCompilationInformation implements CompilationInformation {
- _EmptyCompilationInformation();
- Map<Element, Set<Element>> get enqueuesMap => <Element, Set<Element>>{};
- Map<Element, Set<Element>> get addsToWorkListMap => <Element, Set<Element>>{};
-
- void enqueues(Element function, Element source) {}
- void addsToWorkList(Element context, Element element) {}
- void registerCallSite(TreeElements context, Send node) {}
-}
-
-
-class _CompilationInformation implements CompilationInformation {
- final String prefix;
-
- final Map<Element, Set<Element>> enqueuesMap = {};
- final Map<Element, Set<Element>> addsToWorkListMap = {};
-
- _CompilationInformation(Enqueuer enqueuer)
- : prefix = enqueuer.isResolutionQueue ? 'resolution' : 'codegen';
-
- Set<CallSite> callSites = new Set<CallSite>();
-
- enqueues(Element function, Element source) {
- enqueuesMap.putIfAbsent(function, () => new Set())
- .add(source);
- }
-
- addsToWorkList(Element context, Element element) {
- addsToWorkListMap.putIfAbsent(context, () => new Set())
- .add(element);
- }
-
- registerCallSite(TreeElements context, Send node) {
- callSites.add(new CallSite(context, node));
- }
-}
-
-class CallSite {
- final TreeElements context;
- final Send node;
- CallSite(this.context, this.node);
-}

Powered by Google App Engine
This is Rietveld 408576698