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

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

Issue 830703004: Emit to StreamCodeOutput instead of CodeBuffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 5 years, 11 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/io/source_map_builder.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js/printer.dart
diff --git a/pkg/compiler/lib/src/js/printer.dart b/pkg/compiler/lib/src/js/printer.dart
index b5bce3d2ff845228da321d15ef4c1a0117d4f23a..1e43895d09c03fbf15880aeb7accaf2993a6fbc4 100644
--- a/pkg/compiler/lib/src/js/printer.dart
+++ b/pkg/compiler/lib/src/js/printer.dart
@@ -58,7 +58,7 @@ class Printer extends Indentation implements NodeVisitor {
if (str != "") {
if (pendingSemicolon) {
if (!shouldCompressOutput) {
- outBuffer.write(";");
+ outBuffer.add(";");
} else if (str != "}") {
// We want to output newline instead of semicolon because it makes
// the raw stack traces much easier to read and it also makes line-
@@ -72,19 +72,19 @@ class Printer extends Indentation implements NodeVisitor {
// is escaped in strings, it is a lot easier to deal with semicolons
// than newlines because the former doesn't need escaping.
if (USE_NEW_EMITTER || expressionContinuationRegExp.hasMatch(str)) {
- outBuffer.write(";");
+ outBuffer.add(";");
} else {
- outBuffer.write("\n");
+ outBuffer.add("\n");
}
}
}
if (pendingSpace &&
(!shouldCompressOutput || identifierCharacterRegExp.hasMatch(str))) {
- outBuffer.write(" ");
+ outBuffer.add(" ");
}
pendingSpace = false;
pendingSemicolon = false;
- outBuffer.write(str);
+ outBuffer.add(str);
lastAddedString = str;
}
}
« no previous file with comments | « pkg/compiler/lib/src/io/source_map_builder.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698