Chromium Code Reviews| 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; |