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 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'src/measurements.dart'; | 10 import 'src/measurements.dart'; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 | 195 |
| 196 LibraryInfo._(String serializedId) : super._fromId(serializedId); | 196 LibraryInfo._(String serializedId) : super._fromId(serializedId); |
| 197 | 197 |
| 198 dynamic accept(InfoVisitor visitor) => visitor.visitLibrary(this); | 198 dynamic accept(InfoVisitor visitor) => visitor.visitLibrary(this); |
| 199 } | 199 } |
| 200 | 200 |
| 201 /// Information about an output unit. Normally there is just one for the entire | 201 /// Information about an output unit. Normally there is just one for the entire |
| 202 /// program unless the application uses deferred imports, in which case there | 202 /// program unless the application uses deferred imports, in which case there |
| 203 /// would be an additional output unit per deferred chunk. | 203 /// would be an additional output unit per deferred chunk. |
| 204 class OutputUnitInfo extends BasicInfo { | 204 class OutputUnitInfo extends BasicInfo { |
| 205 /// The deferred imports that will load this output unit. | |
| 206 List<String> imports = <String>[]; | |
|
Siggi Cherem (dart-lang)
2015/11/04 03:33:16
Oh funny, my initial thought was that you meant "i
Harry Terkelsen
2015/11/12 19:21:01
I'm keeping it as imports to match the name in dar
| |
| 207 | |
| 205 static int _ids = 0; | 208 static int _ids = 0; |
| 209 | |
| 206 OutputUnitInfo(String name, int size) | 210 OutputUnitInfo(String name, int size) |
| 207 : super(InfoKind.outputUnit, _ids++, name, null, size, null); | 211 : super(InfoKind.outputUnit, _ids++, name, null, size, null); |
| 208 | 212 |
| 209 OutputUnitInfo._(String serializedId) : super._fromId(serializedId); | 213 OutputUnitInfo._(String serializedId) : super._fromId(serializedId); |
| 210 | 214 |
| 211 dynamic accept(InfoVisitor visitor) => visitor.visitOutput(this); | 215 dynamic accept(InfoVisitor visitor) => visitor.visitOutput(this); |
| 212 } | 216 } |
| 213 | 217 |
| 214 /// Information about a class element. | 218 /// Information about a class element. |
| 215 class ClassInfo extends BasicInfo { | 219 class ClassInfo extends BasicInfo { |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 | 514 |
| 511 visitConstant(ConstantInfo info) {} | 515 visitConstant(ConstantInfo info) {} |
| 512 | 516 |
| 513 visitFunction(FunctionInfo info) { | 517 visitFunction(FunctionInfo info) { |
| 514 info.closures.forEach(visitFunction); | 518 info.closures.forEach(visitFunction); |
| 515 } | 519 } |
| 516 | 520 |
| 517 visitTypedef(TypedefInfo info) {} | 521 visitTypedef(TypedefInfo info) {} |
| 518 visitOutput(OutputUnitInfo info) {} | 522 visitOutput(OutputUnitInfo info) {} |
| 519 } | 523 } |
| OLD | NEW |