| 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 tree_ir_builder; | 5 library tree_ir_builder; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../constants/values.dart'; | 8 import '../constants/values.dart'; |
| 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; | 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| 11 import 'package:js_ast/js_ast.dart' as js; | |
| 12 | 11 |
| 13 import 'tree_ir_nodes.dart'; | 12 import 'tree_ir_nodes.dart'; |
| 14 | 13 |
| 15 typedef Statement NodeCallback(Statement next); | 14 typedef Statement NodeCallback(Statement next); |
| 16 | 15 |
| 17 /** | 16 /** |
| 18 * Builder translates from CPS-based IR to direct-style Tree. | 17 * Builder translates from CPS-based IR to direct-style Tree. |
| 19 * | 18 * |
| 20 * A call `Invoke(fun, cont, args)`, where cont is a singly-referenced | 19 * A call `Invoke(fun, cont, args)`, where cont is a singly-referenced |
| 21 * non-exit continuation `Cont(v, body)` is translated into a direct-style call | 20 * non-exit continuation `Cont(v, body)` is translated into a direct-style call |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 | 741 |
| 743 visitFunctionDefinition(cps_ir.FunctionDefinition node) { | 742 visitFunctionDefinition(cps_ir.FunctionDefinition node) { |
| 744 unexpectedNode(node); | 743 unexpectedNode(node); |
| 745 } | 744 } |
| 746 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); | 745 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); |
| 747 visitContinuation(cps_ir.Continuation node) => unexpectedNode(node); | 746 visitContinuation(cps_ir.Continuation node) => unexpectedNode(node); |
| 748 visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node); | 747 visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node); |
| 749 visitRethrow(cps_ir.Rethrow node) => unexpectedNode(node); | 748 visitRethrow(cps_ir.Rethrow node) => unexpectedNode(node); |
| 750 visitBoundsCheck(cps_ir.BoundsCheck node) => unexpectedNode(node); | 749 visitBoundsCheck(cps_ir.BoundsCheck node) => unexpectedNode(node); |
| 751 } | 750 } |
| OLD | NEW |