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

Unified Diff: pkg/compiler/lib/src/info/info.dart

Issue 1279093003: dart2js: dump info about dependencies added by the enqueuer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« pkg/compiler/lib/src/enqueue.dart ('K') | « pkg/compiler/lib/src/enqueue.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/info/info.dart
diff --git a/pkg/compiler/lib/src/info/info.dart b/pkg/compiler/lib/src/info/info.dart
index c9fc7ef8c65e70bdcb58d10aab42f04168d1fe4f..69b739c53fc8bec5b18da6905a5551b0a1c174b3 100644
--- a/pkg/compiler/lib/src/info/info.dart
+++ b/pkg/compiler/lib/src/info/info.dart
@@ -114,6 +114,8 @@ class AllInfo {
// the same map that is created for the `--deferred-map` flag.
Map<String, Map<String, dynamic>> deferredFiles;
+ Map<Info, List<Info>> deps = {};
Harry Terkelsen 2015/08/11 01:33:09 rename to dependencies
Siggi Cherem (dart-lang) 2015/08/11 19:51:45 Done.
+
/// Major version indicating breaking changes in the format. A new version
/// means that an old deserialization algorithm will not work with the new
/// format.
@@ -124,7 +126,7 @@ class AllInfo {
/// previous will continue to work after the change. This is typically
/// increased when adding new entries to the file format.
// Note: the dump-info.viewer app was written using a json parser version 3.2.
- final int minorVersion = 4;
+ final int minorVersion = 5;
AllInfo();
@@ -149,6 +151,14 @@ class AllInfo {
return map;
}
+ Map _extractDeps() {
+ var map = <String, List>{};
+ deps.forEach((k, v) {
+ map[k.serializedId] = v.map((i) => i.serializedId).toList();
+ });
+ return map;
+ }
+
Map toJson() => {
'elements': {
'library': _listAsJsonMap(libraries),
@@ -158,6 +168,7 @@ class AllInfo {
'field': _listAsJsonMap(fields),
},
'holding': _extractHoldingInfo(),
+ 'deps': _extractDeps(),
'outputUnits': outputUnits.map((u) => u.toJson()).toList(),
'dump_version': version,
'deferredFiles': deferredFiles,
@@ -234,6 +245,10 @@ class _ParseHelper {
}
});
+ json['deps']?.forEach((k, deps) {
+ result.deps[idMap[k]] = deps.map((d) => idMap[d]).toList();
+ });
+
result.program = parseProgram(json['program']);
// todo: version, etc
return result;
« pkg/compiler/lib/src/enqueue.dart ('K') | « pkg/compiler/lib/src/enqueue.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698