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

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

Issue 2564823002: Remove CodegenEnqueuer.compiler (Closed)
Patch Set: 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 | « no previous file | 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 412 }
413 413
414 void reportInlined(Element element, Element inlinedFrom) { 414 void reportInlined(Element element, Element inlinedFrom) {
415 inlineCount.putIfAbsent(element, () => 0); 415 inlineCount.putIfAbsent(element, () => 0);
416 inlineCount[element] += 1; 416 inlineCount[element] += 1;
417 inlineMap.putIfAbsent(inlinedFrom, () => new List<Element>()); 417 inlineMap.putIfAbsent(inlinedFrom, () => new List<Element>());
418 inlineMap[inlinedFrom].add(element); 418 inlineMap[inlinedFrom].add(element);
419 } 419 }
420 420
421 final Map<Element, Set<Element>> _dependencies = {}; 421 final Map<Element, Set<Element>> _dependencies = {};
422 void registerDependency(Element source, Element target) { 422 void registerDependency(Element target) {
423 if (compiler.options.dumpInfo) { 423 if (compiler.options.dumpInfo) {
424 _dependencies.putIfAbsent(source, () => new Set()).add(target); 424 _dependencies
425 .putIfAbsent(compiler.currentElement, () => new Set())
426 .add(target);
425 } 427 }
426 } 428 }
427 429
428 void registerImpact(Element element, WorldImpact impact) { 430 void registerImpact(Element element, WorldImpact impact) {
429 if (compiler.options.dumpInfo) { 431 if (compiler.options.dumpInfo) {
430 impacts[element] = impact; 432 impacts[element] = impact;
431 } 433 }
432 } 434 }
433 435
434 void unregisterImpact(var impactSource) { 436 void unregisterImpact(var impactSource) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 600
599 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 601 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
600 new StringConversionSink.fromStringSink(buffer)); 602 new StringConversionSink.fromStringSink(buffer));
601 sink.add(new AllInfoJsonCodec().encode(result)); 603 sink.add(new AllInfoJsonCodec().encode(result));
602 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 604 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
603 'text': "View the dumped .info.json file at " 605 'text': "View the dumped .info.json file at "
604 "https://dart-lang.github.io/dump-info-visualizer" 606 "https://dart-lang.github.io/dump-info-visualizer"
605 }); 607 });
606 } 608 }
607 } 609 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698