| 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 '../diagnostics/invariant.dart' show | 7 import '../diagnostics/invariant.dart' show |
| 8 InternalErrorFunction; | 8 InternalErrorFunction; |
| 9 import '../diagnostics/spannable.dart' show | 9 import '../diagnostics/spannable.dart' show |
| 10 CURRENT_ELEMENT_SPANNABLE; | 10 CURRENT_ELEMENT_SPANNABLE; |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 getVariableUse(node.index), | 668 getVariableUse(node.index), |
| 669 getVariableUse(node.value)); | 669 getVariableUse(node.value)); |
| 670 } | 670 } |
| 671 | 671 |
| 672 @override | 672 @override |
| 673 NodeCallback visitAwait(cps_ir.Await node) { | 673 NodeCallback visitAwait(cps_ir.Await node) { |
| 674 Expression value = new Await(getVariableUse(node.input)); | 674 Expression value = new Await(getVariableUse(node.input)); |
| 675 return makeCallExpression(node, value); | 675 return makeCallExpression(node, value); |
| 676 } | 676 } |
| 677 | 677 |
| 678 @override |
| 679 Expression visitRefinement(cps_ir.Refinement node) { |
| 680 throw 'Unexpected Refinement node in tree builder'; |
| 681 } |
| 682 |
| 678 /********** UNUSED VISIT METHODS *************/ | 683 /********** UNUSED VISIT METHODS *************/ |
| 679 | 684 |
| 680 unexpectedNode(cps_ir.Node node) { | 685 unexpectedNode(cps_ir.Node node) { |
| 681 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node'); | 686 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node'); |
| 682 } | 687 } |
| 683 | 688 |
| 684 visitFunctionDefinition(cps_ir.FunctionDefinition node) { | 689 visitFunctionDefinition(cps_ir.FunctionDefinition node) { |
| 685 unexpectedNode(node); | 690 unexpectedNode(node); |
| 686 } | 691 } |
| 687 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); | 692 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); |
| 688 visitContinuation(cps_ir.Continuation node) => unexpectedNode(node); | 693 visitContinuation(cps_ir.Continuation node) => unexpectedNode(node); |
| 689 visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node); | 694 visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node); |
| 690 } | 695 } |
| 691 | 696 |
| OLD | NEW |