| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library dump_info; | 5 library dump_info; |
| 6 | 6 |
| 7 import 'dart:convert' | 7 import 'dart:convert' |
| 8 show HtmlEscape, JsonEncoder, StringConversionSink, ChunkedConversionSink; | 8 show HtmlEscape, JsonEncoder, StringConversionSink, ChunkedConversionSink; |
| 9 | 9 |
| 10 import 'package:dart2js_info/info.dart'; | 10 import 'package:dart2js_info/info.dart'; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 TypeMask; | 24 TypeMask; |
| 25 import 'deferred_load.dart' show | 25 import 'deferred_load.dart' show |
| 26 OutputUnit; | 26 OutputUnit; |
| 27 import 'js_backend/js_backend.dart' show | 27 import 'js_backend/js_backend.dart' show |
| 28 JavaScriptBackend; | 28 JavaScriptBackend; |
| 29 import 'js_emitter/full_emitter/emitter.dart' as full show | 29 import 'js_emitter/full_emitter/emitter.dart' as full show |
| 30 Emitter; | 30 Emitter; |
| 31 import 'js/js.dart' as jsAst; | 31 import 'js/js.dart' as jsAst; |
| 32 import 'universe/universe.dart' show | 32 import 'universe/universe.dart' show |
| 33 UniverseSelector; | 33 UniverseSelector; |
| 34 import 'stats/builder.dart'; | 34 import 'info/send_info.dart' show collectSendMeasurements; |
| 35 | 35 |
| 36 class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> { | 36 class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> { |
| 37 final Compiler compiler; | 37 final Compiler compiler; |
| 38 | 38 |
| 39 final AllInfo result = new AllInfo(); | 39 final AllInfo result = new AllInfo(); |
| 40 final Map<Element, Info> _elementToInfo = <Element, Info>{}; | 40 final Map<Element, Info> _elementToInfo = <Element, Info>{}; |
| 41 final Map<ConstantValue, Info> _constantToInfo = <ConstantValue, Info>{}; | 41 final Map<ConstantValue, Info> _constantToInfo = <ConstantValue, Info>{}; |
| 42 final Map<OutputUnit, OutputUnitInfo> _outputToInfo = {}; | 42 final Map<OutputUnit, OutputUnitInfo> _outputToInfo = {}; |
| 43 | 43 |
| 44 ElementInfoCollector(this.compiler); | 44 ElementInfoCollector(this.compiler); |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 559 |
| 560 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( | 560 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( |
| 561 new StringConversionSink.fromStringSink(buffer)); | 561 new StringConversionSink.fromStringSink(buffer)); |
| 562 sink.add(result.toJson()); | 562 sink.add(result.toJson()); |
| 563 compiler.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { | 563 compiler.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { |
| 564 'text': "View the dumped .info.json file at " | 564 'text': "View the dumped .info.json file at " |
| 565 "https://dart-lang.github.io/dump-info-visualizer" | 565 "https://dart-lang.github.io/dump-info-visualizer" |
| 566 }); | 566 }); |
| 567 } | 567 } |
| 568 } | 568 } |
| OLD | NEW |