| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |