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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/compiler/dart2js/js_backend_cps_ir_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library code_generator; 5 library code_generator;
6 6
7 import 'glue.dart'; 7 import 'glue.dart';
8 8
9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; 9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } 275 }
276 276
277 @override 277 @override
278 void visitWhileTrue(tree_ir.WhileTrue node) { 278 void visitWhileTrue(tree_ir.WhileTrue node) {
279 giveup(node); 279 giveup(node);
280 // TODO: implement visitWhileTrue 280 // TODO: implement visitWhileTrue
281 } 281 }
282 282
283 @override 283 @override
284 void visitReturn(tree_ir.Return node) { 284 void visitReturn(tree_ir.Return node) {
285 if (node.value != null) { 285 accumulator.add(new js.Return(visitExpression(node.value)));
286 accumulator.add(new js.Return(visitExpression(node.value)));
287 }
288 } 286 }
289 287
290 bool isNullLiteral(js.Expression exp) => exp is js.LiteralNull; 288 bool isNullLiteral(js.Expression exp) => exp is js.LiteralNull;
291 289
292 } 290 }
OLDNEW
« 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