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

Unified Diff: compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java

Issue 8232014: Fix named parameters handling of values that are falsy in JS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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
Index: compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
===================================================================
--- compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java (revision 350)
+++ compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java (working copy)
@@ -18,7 +18,6 @@
import com.google.dart.compiler.DartSource;
import com.google.dart.compiler.ast.DartClass;
import com.google.dart.compiler.ast.DartNode;
-import com.google.dart.compiler.ast.DartTypeNode;
import com.google.dart.compiler.ast.DartUnit;
import com.google.dart.compiler.ast.LibraryNode;
import com.google.dart.compiler.ast.LibraryUnit;
@@ -378,7 +377,8 @@
// Generate the Javascript AST.
GenerateJavascriptAST generator =
- new GenerateJavascriptAST(unit, typeProvider, context, optimizationStrategy);
+ new GenerateJavascriptAST(unit, typeProvider, context, optimizationStrategy,
+ generateClosureCompatibleCode());
generator.translateNode(translationContext, node, staticInitBlock);
TraceEvent namerEvent =
@@ -403,7 +403,7 @@
nonClassTranslationContext = TranslationContext.createContext(unit,
nonClassStatements, mangler);
nonClassGenerator = new GenerateJavascriptAST(unit, typeProvider, context,
- optimizationStrategy);
+ optimizationStrategy, generateClosureCompatibleCode());
} finally {
Tracer.end(genInitEvent);
}
@@ -551,4 +551,8 @@
}
protected abstract boolean shouldOptimize();
+
+ protected boolean generateClosureCompatibleCode() {
+ return false;
+ }
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/backend/js/ClosureJsBackend.java » ('j') | tests/language/language.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698