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

Unified Diff: pkg/compiler/tool/perf.dart

Issue 2735763002: Create ResolutionEnqueuer after library loading. (Closed)
Patch Set: Updated cf. comments. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/tool/perf.dart
diff --git a/pkg/compiler/tool/perf.dart b/pkg/compiler/tool/perf.dart
index b6ecb444a905ac8298884a2056fef07cb8807d0a..125121a708ce344226b028908a6b70209cba7c5f 100644
--- a/pkg/compiler/tool/perf.dart
+++ b/pkg/compiler/tool/perf.dart
@@ -16,6 +16,7 @@ import 'package:compiler/src/common.dart';
import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
import 'package:compiler/src/diagnostics/messages.dart'
show Message, MessageTemplate;
+import 'package:compiler/src/enqueue.dart' show ResolutionEnqueuer;
import 'package:compiler/src/io/source_file.dart';
import 'package:compiler/src/options.dart';
import 'package:compiler/src/parser/element_listener.dart' show ScannerOptions;
@@ -346,6 +347,7 @@ class MyCompiler extends CompilerImpl {
/// Performs the compilation when all libraries have been loaded.
void compileLoadedLibraries() =>
selfTask.measureSubtask('KernelCompiler.compileLoadedLibraries', () {
+ ResolutionEnqueuer resolutionEnqueuer = startResolution();
WorldImpact mainImpact = computeMain();
mirrorUsageAnalyzerTask.analyzeUsage(mainApp);
@@ -356,21 +358,21 @@ class MyCompiler extends CompilerImpl {
supportSerialization: serialization.supportSerialization);
phase = Compiler.PHASE_RESOLVING;
- enqueuer.resolution.applyImpact(mainImpact);
+ resolutionEnqueuer.applyImpact(mainImpact);
// Note: we enqueue everything in the program so we measure generating
// kernel for the entire code, not just what's reachable from main.
libraryLoader.libraries.forEach((LibraryElement library) {
- enqueuer.resolution.applyImpact(computeImpactForLibrary(library));
+ resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
});
if (deferredLoadTask.isProgramSplit) {
- enqueuer.resolution
+ resolutionEnqueuer
.applyImpact(backend.computeDeferredLoadingImpact());
}
resolveLibraryMetadata();
reporter.log('Resolving...');
- processQueue(enqueuer.resolution, mainFunction, libraryLoader.libraries);
- enqueuer.resolution.logSummary(reporter.log);
+ processQueue(resolutionEnqueuer, mainFunction, libraryLoader.libraries);
+ resolutionEnqueuer.logSummary(reporter.log);
(reporter as CompilerDiagnosticReporter)
.reportSuppressedMessagesSummary();
« no previous file with comments | « pkg/compiler/lib/src/universe/resolution_world_builder.dart ('k') | tests/compiler/dart2js/kernel/closed_world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698