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

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

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 months 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/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/backend.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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 for (Element inlined in inlineMap[element]) { 591 for (Element inlined in inlineMap[element]) {
592 Info inlinedInfo = infoCollector._elementToInfo[inlined]; 592 Info inlinedInfo = infoCollector._elementToInfo[inlined];
593 if (inlinedInfo == null) continue; 593 if (inlinedInfo == null) continue;
594 outerInfo.uses.add(new DependencyInfo(inlinedInfo, 'inlined')); 594 outerInfo.uses.add(new DependencyInfo(inlinedInfo, 'inlined'));
595 } 595 }
596 } 596 }
597 597
598 result.deferredFiles = compiler.deferredLoadTask.computeDeferredMap(); 598 result.deferredFiles = compiler.deferredLoadTask.computeDeferredMap();
599 stopwatch.stop(); 599 stopwatch.stop();
600 result.program = new ProgramInfo( 600 result.program = new ProgramInfo(
601 entrypoint: infoCollector._elementToInfo[compiler.mainFunction], 601 entrypoint: infoCollector
602 ._elementToInfo[closedWorld.elementEnvironment.mainFunction],
602 size: _programSize, 603 size: _programSize,
603 dart2jsVersion: 604 dart2jsVersion:
604 compiler.options.hasBuildId ? compiler.options.buildId : null, 605 compiler.options.hasBuildId ? compiler.options.buildId : null,
605 compilationMoment: new DateTime.now(), 606 compilationMoment: new DateTime.now(),
606 compilationDuration: compiler.measurer.wallClock.elapsed, 607 compilationDuration: compiler.measurer.wallClock.elapsed,
607 toJsonDuration: 608 toJsonDuration:
608 new Duration(milliseconds: stopwatch.elapsedMilliseconds), 609 new Duration(milliseconds: stopwatch.elapsedMilliseconds),
609 dumpInfoDuration: new Duration(milliseconds: this.timing), 610 dumpInfoDuration: new Duration(milliseconds: this.timing),
610 noSuchMethodEnabled: closedWorld.backendUsage.isNoSuchMethodUsed, 611 noSuchMethodEnabled: closedWorld.backendUsage.isNoSuchMethodUsed,
611 minified: compiler.options.enableMinification); 612 minified: compiler.options.enableMinification);
612 613
613 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 614 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
614 new StringConversionSink.fromStringSink(buffer)); 615 new StringConversionSink.fromStringSink(buffer));
615 sink.add(new AllInfoJsonCodec().encode(result)); 616 sink.add(new AllInfoJsonCodec().encode(result));
616 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 617 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
617 'text': "View the dumped .info.json file at " 618 'text': "View the dumped .info.json file at "
618 "https://dart-lang.github.io/dump-info-visualizer" 619 "https://dart-lang.github.io/dump-info-visualizer"
619 }); 620 });
620 } 621 }
621 } 622 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698