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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart

Issue 13466011: Remove dart:io import from ssa/tracer.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update co19 status Created 7 years, 8 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: dart/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
index 57545f968aa23636e1daf463bdbe698a44aa143d..ca58e8fa3bc6be8429a5360da7cf107194339b1e 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
@@ -4,7 +4,8 @@
library tracer;
-import 'dart:io';
+import 'dart:async' show EventSink;
+
import 'ssa.dart';
import '../js_backend/js_backend.dart';
import '../dart2jslib.dart';
@@ -15,17 +16,14 @@ const String SSA_TRACE_FILTER = null;
class HTracer extends HGraphVisitor implements Tracer {
JavaScriptItemCompilationContext context;
int indent = 0;
- final RandomAccessFile output;
+ final EventSink<String> output;
final bool enabled = GENERATE_SSA_TRACE;
bool traceActive = false;
- HTracer([String path = "dart.cfg"])
- : output = GENERATE_SSA_TRACE
- ? new File(path).openSync(mode: FileMode.WRITE)
- : null;
+ HTracer(this.output);
void close() {
- if (enabled) output.closeSync();
+ if (enabled) output.close();
}
void traceCompilation(String methodName,
@@ -156,7 +154,7 @@ class HTracer extends HGraphVisitor implements Tracer {
}
void add(String string) {
- output.writeStringSync(string);
+ output.add(string);
}
void addIndent() {
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/lib/js_string.dart ('k') | dart/tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698