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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 2729383002: Prepare for late creation of ResolutionEnqueuer (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index e34d0e397c58d8f9eccdb8df1ec99c9660f5f6f6..6ad622e190913cf75c361c9feaacd41085f8ad24 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -585,6 +585,7 @@ abstract class Compiler implements LibraryLoaderListener {
/// Performs the compilation when all libraries have been loaded.
void compileLoadedLibraries() =>
selfTask.measureSubtask("Compiler.compileLoadedLibraries", () {
+ Enqueuer resolutionEnqueuer = enqueuer.createResolutionEnqueuer();
WorldImpact mainImpact = computeMain();
mirrorUsageAnalyzerTask.analyzeUsage(mainApp);
@@ -600,32 +601,32 @@ abstract class Compiler implements LibraryLoaderListener {
supportSerialization: serialization.supportSerialization);
phase = PHASE_RESOLVING;
- enqueuer.resolution.applyImpact(mainImpact);
+ resolutionEnqueuer.applyImpact(mainImpact);
if (options.resolveOnly) {
libraryLoader.libraries.where((LibraryElement library) {
return !serialization.isDeserialized(library);
}).forEach((LibraryElement library) {
reporter.log('Enqueuing ${library.canonicalUri}');
- enqueuer.resolution.applyImpact(computeImpactForLibrary(library));
+ resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
});
} else if (analyzeAll) {
libraryLoader.libraries.forEach((LibraryElement library) {
reporter.log('Enqueuing ${library.canonicalUri}');
- enqueuer.resolution.applyImpact(computeImpactForLibrary(library));
+ resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
});
} else if (options.analyzeMain) {
if (mainApp != null) {
- enqueuer.resolution.applyImpact(computeImpactForLibrary(mainApp));
+ resolutionEnqueuer.applyImpact(computeImpactForLibrary(mainApp));
}
if (librariesToAnalyzeWhenRun != null) {
for (Uri libraryUri in librariesToAnalyzeWhenRun) {
- enqueuer.resolution.applyImpact(computeImpactForLibrary(
+ resolutionEnqueuer.applyImpact(computeImpactForLibrary(
libraryLoader.lookupLibrary(libraryUri)));
}
}
}
if (deferredLoadTask.isProgramSplit) {
- enqueuer.resolution
+ resolutionEnqueuer
.applyImpact(backend.computeDeferredLoadingImpact());
}
resolveLibraryMetadata();
@@ -636,9 +637,9 @@ abstract class Compiler implements LibraryLoaderListener {
mainMethod = mainFunction;
}
- processQueue(enqueuer.resolution, mainMethod, libraryLoader.libraries,
+ processQueue(resolutionEnqueuer, mainMethod, libraryLoader.libraries,
onProgress: showResolutionProgress);
- enqueuer.resolution.logSummary(reporter.log);
+ resolutionEnqueuer.logSummary(reporter.log);
_reporter.reportSuppressedMessagesSummary();
@@ -709,7 +710,7 @@ abstract class Compiler implements LibraryLoaderListener {
backend.onCodegenEnd();
- checkQueues(enqueuer.resolution, codegenEnqueuer);
+ checkQueues(resolutionEnqueuer, codegenEnqueuer);
});
/// Perform the steps needed to fully end the resolution phase.
« 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