| 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 import 'optimization.dart' show Pass; | 5 import 'optimization.dart' show Pass; |
| 6 import '../tree_ir_nodes.dart'; | 6 import '../tree_ir_nodes.dart'; |
| 7 | 7 |
| 8 /// Pulls assignment expressions to the top of the function body so they can be | 8 /// Pulls assignment expressions to the top of the function body so they can be |
| 9 /// translated into declaration-site variable initializaters. | 9 /// translated into declaration-site variable initializaters. |
| 10 /// | 10 /// |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 } | 268 } |
| 269 | 269 |
| 270 Expression visitSetField(SetField node) { | 270 Expression visitSetField(SetField node) { |
| 271 node.object = visitExpression(node.object); | 271 node.object = visitExpression(node.object); |
| 272 if (seenImpure) return node; | 272 if (seenImpure) return node; |
| 273 node.value = visitExpression(node.value); | 273 node.value = visitExpression(node.value); |
| 274 seenImpure = true; | 274 seenImpure = true; |
| 275 return node; | 275 return node; |
| 276 } | 276 } |
| 277 | 277 |
| 278 Expression visitGetStatic(GetStatic node) { |
| 279 seenImpure = true; |
| 280 return node; |
| 281 } |
| 282 |
| 283 Expression visitSetStatic(SetStatic node) { |
| 284 node.value = visitExpression(node.value); |
| 285 seenImpure = true; |
| 286 return node; |
| 287 } |
| 288 |
| 278 Expression visitCreateBox(CreateBox node) { | 289 Expression visitCreateBox(CreateBox node) { |
| 279 return node; | 290 return node; |
| 280 } | 291 } |
| 281 | 292 |
| 282 Expression visitCreateInstance(CreateInstance node) { | 293 Expression visitCreateInstance(CreateInstance node) { |
| 283 rewriteList(node.arguments); | 294 rewriteList(node.arguments); |
| 284 return node; | 295 return node; |
| 285 } | 296 } |
| 286 | 297 |
| 287 Expression visitReifyRuntimeType(ReifyRuntimeType node) { | 298 Expression visitReifyRuntimeType(ReifyRuntimeType node) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 313 | 324 |
| 314 Expression visitVariableUse(VariableUse node) { | 325 Expression visitVariableUse(VariableUse node) { |
| 315 return node; | 326 return node; |
| 316 } | 327 } |
| 317 | 328 |
| 318 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { | 329 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { |
| 319 rewriteList(node.arguments); | 330 rewriteList(node.arguments); |
| 320 return node; | 331 return node; |
| 321 } | 332 } |
| 322 } | 333 } |
| OLD | NEW |