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

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

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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 | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/helpers/helpers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index bfcd252fdd20cc8d208581049b2ce81589bccdd9..6d71d732d8992e8e5f5da11e092beae0165bd250 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -27,6 +27,8 @@ import 'compiler.dart' show
import 'dart_types.dart' show
DartType,
InterfaceType;
+import 'diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
import 'diagnostics/invariant.dart' show
invariant;
import 'diagnostics/spannable.dart' show
@@ -154,6 +156,8 @@ abstract class Enqueuer {
QueueFilter get filter => compiler.enqueuerFilter;
+ DiagnosticReporter get reporter => compiler.reporter;
+
/// Returns [:true:] if [member] has been processed by this enqueuer.
bool isProcessed(Element member);
@@ -526,7 +530,7 @@ abstract class Enqueuer {
// have run before tree shaking is disabled and thus everything is
// enqueued.
recents = _processedClasses.toSet();
- compiler.log('Enqueuing everything');
+ reporter.log('Enqueuing everything');
for (LibraryElement lib in compiler.libraryLoader.libraries) {
enqueueReflectiveElementsInLibrary(lib, recents);
}
@@ -903,7 +907,7 @@ class ResolutionEnqueuer extends Enqueuer {
void emptyDeferredTaskQueue() {
while (!deferredTaskQueue.isEmpty) {
DeferredTask task = deferredTaskQueue.removeFirst();
- compiler.withCurrentElement(task.element, task.action);
+ reporter.withCurrentElement(task.element, task.action);
}
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/helpers/helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698