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

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

Issue 2000323006: Make CompilerTask independent of compiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index f6a431bc7cc7ad0ad1b434a0585874bc23e1b1ee..5eb8a447255a99e7e567721886b919dcd10a540e 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -90,11 +90,7 @@ typedef CompilerDiagnosticReporter MakeReporterFunction(
Compiler compiler, CompilerOptions options);
abstract class Compiler implements LibraryLoaderListener {
- /// Helper instance for measurements in [CompilerTask].
- ///
- /// Note: MUST be first field to ensure [Measurer.wallclock] is started
- /// before other computations.
- final Measurer measurer = new Measurer();
+ Measurer get measurer;
final IdGenerator idGenerator = new IdGenerator();
World world;
@@ -249,8 +245,6 @@ abstract class Compiler implements LibraryLoaderListener {
ti.TypesTask typesTask;
Backend backend;
- GenericTask reuseLibraryTask;
Siggi Cherem (dart-lang) 2016/05/25 01:45:18 now measured as a subtask of the loader
-
GenericTask selfTask;
/// The constant environment for the frontend interpretation of compile-time
@@ -265,8 +259,6 @@ abstract class Compiler implements LibraryLoaderListener {
/// A customizable filter that is applied to enqueued work items.
QueueFilter enqueuerFilter = new QueueFilter();
- static const String CREATE_INVOCATION_MIRROR = 'createInvocationMirror';
Siggi Cherem (dart-lang) 2016/05/25 01:45:18 only used in one place, no reason to have it here.
-
bool enabledRuntimeType = false;
bool enabledFunctionApply = false;
bool enabledInvokeOn = false;
@@ -344,7 +336,7 @@ abstract class Compiler implements LibraryLoaderListener {
tasks = [
dietParser =
- new DietParserTask(this, options, idGenerator, backend, reporter),
Siggi Cherem (dart-lang) 2016/05/25 01:45:18 now diet parser and scanner below no longer need a
+ new DietParserTask(options, idGenerator, backend, reporter, measurer),
scanner = createScannerTask(),
serialization = new SerializationTask(this),
libraryLoader = new LibraryLoaderTask(
@@ -366,8 +358,7 @@ abstract class Compiler implements LibraryLoaderListener {
mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this),
enqueuer = backend.makeEnqueuer(),
dumpInfoTask = new DumpInfoTask(this),
- reuseLibraryTask = new GenericTask('Reuse library', this),
- selfTask = new GenericTask('self', this),
+ selfTask = new GenericTask('self', measurer),
];
if (options.resolveOnly) {
serialization.supportSerialization = true;
@@ -382,8 +373,9 @@ abstract class Compiler implements LibraryLoaderListener {
/// Creates the scanner task.
///
/// Override this to mock the scanner for testing.
- ScannerTask createScannerTask() => new ScannerTask(this, dietParser,
- preserveComments: options.preserveComments, commentMap: commentMap);
+ ScannerTask createScannerTask() =>
+ new ScannerTask(dietParser, reporter, measurer,
+ preserveComments: options.preserveComments, commentMap: commentMap);
/// Creates the resolver task.
///

Powered by Google App Engine
This is Rietveld 408576698