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

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

Issue 2690063002: Refactor CompilerOutput (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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/ssa/ssa_tracer.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tracer.dart
diff --git a/pkg/compiler/lib/src/tracer.dart b/pkg/compiler/lib/src/tracer.dart
index 0c5336a2b84fe117bddb8abcbc0eb2b1797f9d18..ad0b47adc1b613533560e2d76d16eed563178209 100644
--- a/pkg/compiler/lib/src/tracer.dart
+++ b/pkg/compiler/lib/src/tracer.dart
@@ -4,9 +4,8 @@
library tracer;
-import 'dart:async' show EventSink;
-
-import '../compiler.dart' as api;
+import '../compiler_new.dart' as api;
+import 'compiler.dart' show Compiler;
import 'js_backend/namer.dart' show Namer;
import 'ssa/nodes.dart' as ssa show HGraph;
import 'ssa/ssa_tracer.dart' show HTracer;
@@ -32,16 +31,16 @@ class Tracer extends TracerUtil {
final ClosedWorld closedWorld;
final Namer namer;
bool traceActive = false;
- final EventSink<String> output;
+ final api.OutputSink output;
final RegExp traceFilter;
- Tracer(
- this.closedWorld, this.namer, api.CompilerOutputProvider outputProvider)
+ Tracer(this.closedWorld, this.namer, Compiler compiler)
: traceFilter = TRACE_FILTER_PATTERN == null
? null
: new RegExp(TRACE_FILTER_PATTERN),
- output =
- TRACE_FILTER_PATTERN != null ? outputProvider('dart', 'cfg') : null;
+ output = TRACE_FILTER_PATTERN != null
+ ? compiler.outputProvider('dart', 'cfg', api.OutputType.debug)
+ : null;
bool get isEnabled => traceFilter != null;
@@ -71,7 +70,7 @@ class Tracer extends TracerUtil {
}
abstract class TracerUtil {
- EventSink<String> get output;
+ api.OutputSink get output;
final Indentation _ind = new Indentation();
void tag(String tagName, Function f) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa_tracer.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698