| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.pull_into_initializers; | 5 library tree_ir.optimization.pull_into_initializers; |
| 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 | 9 |
| 10 /// Pulls assignment expressions to the top of the function body so they can be | 10 /// Pulls assignment expressions to the top of the function body so they can be |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 seenImpure = true; | 192 seenImpure = true; |
| 193 return node; | 193 return node; |
| 194 } | 194 } |
| 195 | 195 |
| 196 Expression visitInvokeConstructor(InvokeConstructor node) { | 196 Expression visitInvokeConstructor(InvokeConstructor node) { |
| 197 rewriteList(node.arguments); | 197 rewriteList(node.arguments); |
| 198 seenImpure = true; | 198 seenImpure = true; |
| 199 return node; | 199 return node; |
| 200 } | 200 } |
| 201 | 201 |
| 202 Expression visitConcatenateStrings(ConcatenateStrings node) { | |
| 203 rewriteList(node.arguments); | |
| 204 seenImpure = true; | |
| 205 return node; | |
| 206 } | |
| 207 | |
| 208 Expression visitTypeExpression(TypeExpression node) { | 202 Expression visitTypeExpression(TypeExpression node) { |
| 209 rewriteList(node.arguments); | 203 rewriteList(node.arguments); |
| 210 return node; | 204 return node; |
| 211 } | 205 } |
| 212 | 206 |
| 213 Expression visitConditional(Conditional node) { | 207 Expression visitConditional(Conditional node) { |
| 214 node.condition = visitExpression(node.condition); | 208 node.condition = visitExpression(node.condition); |
| 215 if (seenImpure) return node; | 209 if (seenImpure) return node; |
| 216 node.thenExpression = visitExpression(node.thenExpression); | 210 node.thenExpression = visitExpression(node.thenExpression); |
| 217 if (seenImpure) return node; | 211 if (seenImpure) return node; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { | 318 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { |
| 325 rewriteList(node.arguments); | 319 rewriteList(node.arguments); |
| 326 return node; | 320 return node; |
| 327 } | 321 } |
| 328 | 322 |
| 329 Expression visitApplyBuiltinOperator(ApplyBuiltinOperator node) { | 323 Expression visitApplyBuiltinOperator(ApplyBuiltinOperator node) { |
| 330 rewriteList(node.arguments); | 324 rewriteList(node.arguments); |
| 331 return node; | 325 return node; |
| 332 } | 326 } |
| 333 } | 327 } |
| OLD | NEW |