Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1259)

Side by Side Diff: pkg/compiler/lib/src/dump_info.dart

Issue 2549423002: Change Enqueuer to use Entity instead of Element. (Closed)
Patch Set: Updated cf. comments. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ChunkedConversionSink, JsonEncoder, StringConversionSink; 8 show ChunkedConversionSink, JsonEncoder, StringConversionSink;
9 9
10 import 'package:dart2js_info/info.dart'; 10 import 'package:dart2js_info/info.dart';
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 _dependencies.putIfAbsent(source, () => new Set()).add(target); 424 _dependencies.putIfAbsent(source, () => new Set()).add(target);
425 } 425 }
426 } 426 }
427 427
428 void registerImpact(Element element, WorldImpact impact) { 428 void registerImpact(Element element, WorldImpact impact) {
429 if (compiler.options.dumpInfo) { 429 if (compiler.options.dumpInfo) {
430 impacts[element] = impact; 430 impacts[element] = impact;
431 } 431 }
432 } 432 }
433 433
434 void unregisterImpact(Element element) { 434 void unregisterImpact(var impactSource) {
435 impacts.remove(element); 435 impacts.remove(impactSource);
436 } 436 }
437 437
438 /** 438 /**
439 * Returns an iterable of [Selection]s that are used by 439 * Returns an iterable of [Selection]s that are used by
440 * [element]. Each [Selection] contains an element that is 440 * [element]. Each [Selection] contains an element that is
441 * used and the selector that selected the element. 441 * used and the selector that selected the element.
442 */ 442 */
443 Iterable<Selection> getRetaining(Element element) { 443 Iterable<Selection> getRetaining(Element element) {
444 WorldImpact impact = impacts[element]; 444 WorldImpact impact = impacts[element];
445 if (impact == null) return const <Selection>[]; 445 if (impact == null) return const <Selection>[];
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 598
599 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 599 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
600 new StringConversionSink.fromStringSink(buffer)); 600 new StringConversionSink.fromStringSink(buffer));
601 sink.add(new AllInfoJsonCodec().encode(result)); 601 sink.add(new AllInfoJsonCodec().encode(result));
602 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 602 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
603 'text': "View the dumped .info.json file at " 603 'text': "View the dumped .info.json file at "
604 "https://dart-lang.github.io/dump-info-visualizer" 604 "https://dart-lang.github.io/dump-info-visualizer"
605 }); 605 });
606 } 606 }
607 } 607 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698