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

Unified Diff: pkg/compiler/lib/src/common/tasks.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/common/resolution.dart ('k') | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/tasks.dart
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
index 32966df50b3fbdd936ed8d9df26cd518ff3eba15..56253dbf3cbdafb28eb49945fac5b21f21bb1b25 100644
--- a/pkg/compiler/lib/src/common/tasks.dart
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -8,6 +8,8 @@ import 'dart:profiler' show
UserTag;
import '../compiler.dart' show
Compiler;
+import '../diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
import '../elements/elements.dart' show
Element;
@@ -30,6 +32,8 @@ class CompilerTask {
: this.compiler = compiler,
watch = (compiler.verbose) ? new Stopwatch() : null;
+ DiagnosticReporter get reporter => compiler.reporter;
+
String get name => "Unknown task '${this.runtimeType}'";
int get timing {
@@ -66,7 +70,7 @@ class CompilerTask {
}
measureElement(Element element, action()) {
- compiler.withCurrentElement(element, () => measure(action));
+ reporter.withCurrentElement(element, () => measure(action));
}
/// Measure the time spent in [action] (if in verbose mode) and accumulate it
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698