| 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.optimization.statement_rewriter; | 5 library tree_ir.optimization.statement_rewriter; |
| 6 | 6 |
| 7 import 'optimization.dart' show Pass; | 7 import 'optimization.dart' show Pass; |
| 8 import '../tree_ir_nodes.dart'; | 8 import '../tree_ir_nodes.dart'; |
| 9 import '../../io/source_information.dart'; | 9 import '../../io/source_information.dart'; |
| 10 | 10 |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 | 1140 |
| 1141 @override | 1141 @override |
| 1142 Expression visitAwait(Await node) { | 1142 Expression visitAwait(Await node) { |
| 1143 node.input = visitExpression(node.input); | 1143 node.input = visitExpression(node.input); |
| 1144 return node; | 1144 return node; |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 @override | 1147 @override |
| 1148 Statement visitYield(Yield node) { | 1148 Statement visitYield(Yield node) { |
| 1149 node.input = visitExpression(node.input); | 1149 node.input = visitExpression(node.input); |
| 1150 node.next = visitStatement(node.next); |
| 1150 return node; | 1151 return node; |
| 1151 } | 1152 } |
| 1152 } | 1153 } |
| 1153 | 1154 |
| 1154 /// Result of combining two expressions, with the potential for reverting the | 1155 /// Result of combining two expressions, with the potential for reverting the |
| 1155 /// combination. | 1156 /// combination. |
| 1156 /// | 1157 /// |
| 1157 /// Reverting a combination is done by calling [uncombine]. In this case, | 1158 /// Reverting a combination is done by calling [uncombine]. In this case, |
| 1158 /// both the original expressions should remain in the tree, and the [combined] | 1159 /// both the original expressions should remain in the tree, and the [combined] |
| 1159 /// expression should be orphaned. | 1160 /// expression should be orphaned. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 VariableUseVisitor(this.callback); | 1240 VariableUseVisitor(this.callback); |
| 1240 | 1241 |
| 1241 visitVariableUse(VariableUse use) => callback(use); | 1242 visitVariableUse(VariableUse use) => callback(use); |
| 1242 | 1243 |
| 1243 visitInnerFunction(FunctionDefinition node) {} | 1244 visitInnerFunction(FunctionDefinition node) {} |
| 1244 | 1245 |
| 1245 static void visit(Expression node, VariableUseCallback callback) { | 1246 static void visit(Expression node, VariableUseCallback callback) { |
| 1246 new VariableUseVisitor(callback).visitExpression(node); | 1247 new VariableUseVisitor(callback).visitExpression(node); |
| 1247 } | 1248 } |
| 1248 } | 1249 } |
| OLD | NEW |