| 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 'elements/elements.dart'; | 10 import 'elements/elements.dart'; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 * function body | 360 * function body |
| 361 */ | 361 */ |
| 362 void elementUsesSelector(Element element, UniverseSelector selector) { | 362 void elementUsesSelector(Element element, UniverseSelector selector) { |
| 363 if (compiler.dumpInfo) { | 363 if (compiler.dumpInfo) { |
| 364 selectorsFromElement | 364 selectorsFromElement |
| 365 .putIfAbsent(element, () => new Set<UniverseSelector>()) | 365 .putIfAbsent(element, () => new Set<UniverseSelector>()) |
| 366 .add(selector); | 366 .add(selector); |
| 367 } | 367 } |
| 368 } | 368 } |
| 369 | 369 |
| 370 final Map<Element, List<Element>> _dependencies = {}; | 370 final Map<Element, Set<Element>> _dependencies = {}; |
| 371 void registerDependency(Element source, Element target) { | 371 void registerDependency(Element source, Element target) { |
| 372 _dependencies.putIfAbsent(source, () => new Set()).add(target); | 372 _dependencies.putIfAbsent(source, () => new Set()).add(target); |
| 373 } | 373 } |
| 374 | 374 |
| 375 /** | 375 /** |
| 376 * Returns an iterable of [Selection]s that are used by | 376 * Returns an iterable of [Selection]s that are used by |
| 377 * [element]. Each [Selection] contains an element that is | 377 * [element]. Each [Selection] contains an element that is |
| 378 * used and the selector that selected the element. | 378 * used and the selector that selected the element. |
| 379 */ | 379 */ |
| 380 Iterable<Selection> getRetaining(Element element) { | 380 Iterable<Selection> getRetaining(Element element) { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( | 526 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( |
| 527 new StringConversionSink.fromStringSink(buffer)); | 527 new StringConversionSink.fromStringSink(buffer)); |
| 528 sink.add(result.toJson()); | 528 sink.add(result.toJson()); |
| 529 compiler.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { | 529 compiler.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { |
| 530 'text': "View the dumped .info.json file at " | 530 'text': "View the dumped .info.json file at " |
| 531 "https://dart-lang.github.io/dump-info-visualizer" | 531 "https://dart-lang.github.io/dump-info-visualizer" |
| 532 }); | 532 }); |
| 533 } | 533 } |
| 534 } | 534 } |
| OLD | NEW |