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

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

Issue 2531303002: Decouple WorkItem from Compiler (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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 | « pkg/compiler/lib/src/universe/world_impact.dart ('k') | pkg/dart2js_incremental/lib/caching_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/tool/perf.dart
diff --git a/pkg/compiler/tool/perf.dart b/pkg/compiler/tool/perf.dart
index 7705061577a73490f464d575779bf8aff37c5617..4725014a8138b4396645ed1ee73c66602ac75bec 100644
--- a/pkg/compiler/tool/perf.dart
+++ b/pkg/compiler/tool/perf.dart
@@ -11,7 +11,6 @@ import 'dart:io';
import 'package:compiler/compiler_new.dart';
import 'package:compiler/src/apiimpl.dart';
import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/kernel/task.dart';
import 'package:compiler/src/elements/elements.dart';
import 'package:compiler/src/common.dart';
import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
@@ -28,6 +27,7 @@ import 'package:compiler/src/platform_configuration.dart' as platform;
import 'package:compiler/src/scanner/scanner.dart';
import 'package:compiler/src/source_file_provider.dart';
import 'package:compiler/src/tokens/token.dart' show Token;
+import 'package:compiler/src/universe/world_impact.dart' show WorldImpact;
import 'package:package_config/discovery.dart' show findPackages;
import 'package:package_config/packages.dart' show Packages;
import 'package:package_config/src/util.dart' show checkValidPackageUri;
@@ -359,7 +359,7 @@ class MyCompiler extends CompilerImpl {
/// Performs the compilation when all libraries have been loaded.
void compileLoadedLibraries() =>
selfTask.measureSubtask("KernelCompiler.compileLoadedLibraries", () {
- computeMain();
+ WorldImpact mainImpact = computeMain();
mirrorUsageAnalyzerTask.analyzeUsage(mainApp);
deferredLoadTask.beforeResolution(this);
@@ -369,14 +369,18 @@ class MyCompiler extends CompilerImpl {
supportSerialization: serialization.supportSerialization);
phase = Compiler.PHASE_RESOLVING;
-
+ enqueuer.resolution.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) {
- fullyEnqueueLibrary(library, enqueuer.resolution);
+ enqueuer.resolution.applyImpact(computeImpactForLibrary(library));
});
- backend.enqueueHelpers(enqueuer.resolution);
+ if (deferredLoadTask.isProgramSplit) {
+ enqueuer.resolution.applyImpact(
+ backend.computeDeferredLoadingImpact());
+ }
+ enqueuer.resolution.applyImpact(backend.computeHelpersImpact());
resolveLibraryMetadata();
reporter.log('Resolving...');
processQueue(enqueuer.resolution, mainFunction);
« no previous file with comments | « pkg/compiler/lib/src/universe/world_impact.dart ('k') | pkg/dart2js_incremental/lib/caching_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698