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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/codegen.dart

Issue 739883003: Fix codegeneration for 'return'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | tests/compiler/dart2js/js_backend_cps_ir_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/codegen.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index db1d80479a40fefbb0a8f3c8f00ad1e4dce6e5f2..faaa53527df76e109a00cecb9982e0353d4f75ff 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -282,9 +282,7 @@ class CodeGenerator extends tree_ir.Visitor<dynamic, js.Expression> {
@override
void visitReturn(tree_ir.Return node) {
- if (node.value != null) {
- accumulator.add(new js.Return(visitExpression(node.value)));
- }
+ accumulator.add(new js.Return(visitExpression(node.value)));
}
bool isNullLiteral(js.Expression exp) => exp is js.LiteralNull;
« no previous file with comments | « no previous file | tests/compiler/dart2js/js_backend_cps_ir_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698