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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 992973002: Small fixes (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index cab929bd70d137c3efa53f87444d8ac90046572a..028a5152f56f0ae9ab30c4dd018c910a93fdb44d 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -1241,6 +1241,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
JS.Expression _emitPrefixIncrement(Token op, Expression expr) {
var one = AstBuilder.integerLiteral(1);
+ one.staticType = rules.provider.intType;
var increment = AstBuilder.binaryExpression(expr, op.lexeme[0], one);
return _emitAssignment(expr, increment);
}
@@ -1516,7 +1517,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
}
var catchVarDecl = new JS.VariableDeclaration(_catchParameter);
- var catchBody = _statement(_visitList(clauses));
+ var catchBody = new JS.Block(_visitList(clauses));
vsm 2015/03/10 13:34:47 The js ast code asserts this is a block.
Jennifer Messerly 2015/03/10 15:04:08 funny! we must've only hit the code path for >2 st
_catchParameter = savedCatch;
return new JS.Catch(catchVarDecl, catchBody);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698