| 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'; |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 @override | 670 @override |
| 671 Expression visitAwait(cps_ir.Await node) { | 671 Expression visitAwait(cps_ir.Await node) { |
| 672 return new Await(getVariableUse(node.input)); | 672 return new Await(getVariableUse(node.input)); |
| 673 } | 673 } |
| 674 | 674 |
| 675 @override | 675 @override |
| 676 Expression visitRefinement(cps_ir.Refinement node) { | 676 Expression visitRefinement(cps_ir.Refinement node) { |
| 677 throw 'Unexpected Refinement node in tree builder'; | 677 throw 'Unexpected Refinement node in tree builder'; |
| 678 } | 678 } |
| 679 | 679 |
| 680 @override |
| 681 Expression visitBoundsCheck(cps_ir.BoundsCheck node) { |
| 682 throw 'Unexpected BoundsCheck node in tree builder'; |
| 683 } |
| 684 |
| 680 /********** UNUSED VISIT METHODS *************/ | 685 /********** UNUSED VISIT METHODS *************/ |
| 681 | 686 |
| 682 unexpectedNode(cps_ir.Node node) { | 687 unexpectedNode(cps_ir.Node node) { |
| 683 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node'); | 688 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node'); |
| 684 } | 689 } |
| 685 | 690 |
| 686 visitFunctionDefinition(cps_ir.FunctionDefinition node) { | 691 visitFunctionDefinition(cps_ir.FunctionDefinition node) { |
| 687 unexpectedNode(node); | 692 unexpectedNode(node); |
| 688 } | 693 } |
| 689 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); | 694 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 708 --enclosingFunctions; | 713 --enclosingFunctions; |
| 709 } | 714 } |
| 710 | 715 |
| 711 @override | 716 @override |
| 712 visitInterpolatedNode(js.InterpolatedNode node) { | 717 visitInterpolatedNode(js.InterpolatedNode node) { |
| 713 if (enclosingFunctions > 0) { | 718 if (enclosingFunctions > 0) { |
| 714 found = true; | 719 found = true; |
| 715 } | 720 } |
| 716 } | 721 } |
| 717 } | 722 } |
| OLD | NEW |