Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Data produced by dart2js when run with the `--dump-info` flag. | 5 /// Data produced by dart2js when run with the `--dump-info` flag. |
| 6 library dart2js_info.info; | 6 library dart2js_info.info; |
| 7 | 7 |
| 8 import 'src/measurements.dart'; | 8 import 'src/measurements.dart'; |
| 9 export 'src/measurements.dart'; | 9 export 'src/measurements.dart'; |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 | 143 |
| 144 /// Minor version indicating non-breaking changes in the format. A change in | 144 /// Minor version indicating non-breaking changes in the format. A change in |
| 145 /// this version number means that the json parsing in this library from a | 145 /// this version number means that the json parsing in this library from a |
| 146 /// previous will continue to work after the change. This is typically | 146 /// previous will continue to work after the change. This is typically |
| 147 /// increased when adding new entries to the file format. | 147 /// increased when adding new entries to the file format. |
| 148 // Note: the dump-info.viewer app was written using a json parser version 3.2. | 148 // Note: the dump-info.viewer app was written using a json parser version 3.2. |
| 149 final int minorVersion = 6; | 149 final int minorVersion = 6; |
| 150 | 150 |
| 151 AllInfo(); | 151 AllInfo(); |
| 152 | 152 |
| 153 static AllInfo parseFromJson(Map map) => new _ParseHelper().parseAll(map); | 153 factory AllInfo.fromJson(Map json) => new _ParseHelper().parseAll(json); |
|
Siggi Cherem (dart-lang)
2015/10/14 23:37:02
since this is a breaking change, we might need to
Harry Terkelsen
2015/10/15 00:13:55
I added a TODO for this. Let's go with 0.2.0-dev a
| |
| 154 | 154 |
| 155 Map _listAsJsonMap(List<Info> list) { | 155 Map _listAsJsonMap(List<Info> list) { |
| 156 var map = <String, Map>{}; | 156 var map = <String, Map>{}; |
| 157 for (var info in list) { | 157 for (var info in list) { |
| 158 map['${info.id}'] = info.toJson(); | 158 map['${info.id}'] = info.toJson(); |
| 159 } | 159 } |
| 160 return map; | 160 return map; |
| 161 } | 161 } |
| 162 | 162 |
| 163 Map _extractHoldingInfo() { | 163 Map _extractHoldingInfo() { |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 850 } | 850 } |
| 851 | 851 |
| 852 visitField(FieldInfo info) { | 852 visitField(FieldInfo info) { |
| 853 info.closures.forEach(visitFunction); | 853 info.closures.forEach(visitFunction); |
| 854 } | 854 } |
| 855 | 855 |
| 856 visitFunction(FunctionInfo info) { | 856 visitFunction(FunctionInfo info) { |
| 857 info.closures.forEach(visitFunction); | 857 info.closures.forEach(visitFunction); |
| 858 } | 858 } |
| 859 } | 859 } |
| OLD | NEW |