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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 /// A new representation of dependencies from one info to another. An entry in | 117 /// A new representation of dependencies from one info to another. An entry in |
118 /// this map indicates that an [Info] depends on another (e.g. a function | 118 /// this map indicates that an [Info] depends on another (e.g. a function |
119 /// invokes another). Please note that the data in this field might not be | 119 /// invokes another). Please note that the data in this field might not be |
120 /// accurate yet (this is work in progress). | 120 /// accurate yet (this is work in progress). |
121 Map<Info, List<Info>> dependencies = {}; | 121 Map<Info, List<Info>> dependencies = {}; |
122 | 122 |
123 /// Major version indicating breaking changes in the format. A new version | 123 /// Major version indicating breaking changes in the format. A new version |
124 /// means that an old deserialization algorithm will not work with the new | 124 /// means that an old deserialization algorithm will not work with the new |
125 /// format. | 125 /// format. |
126 final int version = 3; | 126 final int version = 4; |
127 | 127 |
128 /// Minor version indicating non-breaking changes in the format. A change in | 128 /// Minor version indicating non-breaking changes in the format. A change in |
129 /// this version number means that the json parsing in this library from a | 129 /// this version number means that the json parsing in this library from a |
130 /// previous will continue to work after the change. This is typically | 130 /// previous will continue to work after the change. This is typically |
131 /// increased when adding new entries to the file format. | 131 /// increased when adding new entries to the file format. |
132 // Note: the dump-info.viewer app was written using a json parser version 3.2. | 132 // Note: the dump-info.viewer app was written using a json parser version 3.2. |
133 final int minorVersion = 6; | 133 final int minorVersion = 0; |
134 | 134 |
135 AllInfo(); | 135 AllInfo(); |
136 | 136 |
137 dynamic accept(InfoVisitor visitor) => visitor.visitAll(this); | 137 dynamic accept(InfoVisitor visitor) => visitor.visitAll(this); |
138 } | 138 } |
139 | 139 |
140 class ProgramInfo { | 140 class ProgramInfo { |
141 FunctionInfo entrypoint; | 141 FunctionInfo entrypoint; |
142 int size; | 142 int size; |
143 String dart2jsVersion; | 143 String dart2jsVersion; |
144 DateTime compilationMoment; | 144 DateTime compilationMoment; |
145 Duration compilationDuration; | 145 Duration compilationDuration; |
146 // TODO(sigmund): use Duration. | 146 Duration toJsonDuration; |
147 int toJsonDuration; | 147 Duration dumpInfoDuration; |
148 int dumpInfoDuration; | |
149 bool noSuchMethodEnabled; | 148 bool noSuchMethodEnabled; |
150 bool minified; | 149 bool minified; |
151 | 150 |
152 ProgramInfo( | 151 ProgramInfo( |
153 {this.entrypoint, | 152 {this.entrypoint, |
154 this.size, | 153 this.size, |
155 this.dart2jsVersion, | 154 this.dart2jsVersion, |
156 this.compilationMoment, | 155 this.compilationMoment, |
157 this.compilationDuration, | 156 this.compilationDuration, |
158 this.toJsonDuration, | 157 this.toJsonDuration, |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 513 |
515 visitConstant(ConstantInfo info) {} | 514 visitConstant(ConstantInfo info) {} |
516 | 515 |
517 visitFunction(FunctionInfo info) { | 516 visitFunction(FunctionInfo info) { |
518 info.closures.forEach(visitFunction); | 517 info.closures.forEach(visitFunction); |
519 } | 518 } |
520 | 519 |
521 visitTypedef(TypedefInfo info) {} | 520 visitTypedef(TypedefInfo info) {} |
522 visitOutput(OutputUnitInfo info) {} | 521 visitOutput(OutputUnitInfo info) {} |
523 } | 522 } |
OLD | NEW |