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

Unified Diff: lib/compiler/implementation/js/printer.dart

Issue 10901002: Hook up the --minify option in dart2js and use it to get rid of unnecessary whitespace inside funct… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 4 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: lib/compiler/implementation/js/printer.dart
diff --git a/lib/compiler/implementation/js/printer.dart b/lib/compiler/implementation/js/printer.dart
index 287961218b1ac7c71132320e063675f6286a0935..b13ef55add526743a5ec1630d627cb9270bee178 100644
--- a/lib/compiler/implementation/js/printer.dart
+++ b/lib/compiler/implementation/js/printer.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
class Printer implements NodeVisitor {
- final bool shouldCompressOutput = false;
+ final bool shouldCompressOutput;
leg.Compiler compiler;
var positionElement;
leg.CodeBuffer outBuffer;
@@ -13,7 +13,8 @@ class Printer implements NodeVisitor {
final DanglingElseVisitor danglingElseVisitor;
Printer(leg.Compiler compiler, this.positionElement)
- : this.compiler = compiler,
+ : shouldCompressOutput = compiler.enableMinification,
+ this.compiler = compiler,
outBuffer = new leg.CodeBuffer(),
danglingElseVisitor = new DanglingElseVisitor(compiler);
« no previous file with comments | « lib/compiler/implementation/dart_backend/renamer.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698