| 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 '../tree_ir_nodes.dart'; |
| 7 import 'optimization.dart' show Pass; | 8 import 'optimization.dart' show Pass; |
| 8 import '../tree_ir_nodes.dart'; | |
| 9 | 9 |
| 10 /// Where a variable has been assigned. | 10 /// Where a variable has been assigned. |
| 11 enum AssignArea { | 11 enum AssignArea { |
| 12 /// The variable is only assigned in the initializer block. | 12 /// The variable is only assigned in the initializer block. |
| 13 Initializer, | 13 Initializer, |
| 14 | 14 |
| 15 // The variable has at least one assignment outside the initializer block. | 15 // The variable has at least one assignment outside the initializer block. |
| 16 Anywhere, | 16 Anywhere, |
| 17 } | 17 } |
| 18 | 18 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 @override | 370 @override |
| 371 Expression visitForeignExpression(ForeignExpression node) { | 371 Expression visitForeignExpression(ForeignExpression node) { |
| 372 rewriteList(node.arguments); | 372 rewriteList(node.arguments); |
| 373 if (node.nativeBehavior.sideEffects.hasSideEffects()) { | 373 if (node.nativeBehavior.sideEffects.hasSideEffects()) { |
| 374 ++impureCounter; | 374 ++impureCounter; |
| 375 } | 375 } |
| 376 return node; | 376 return node; |
| 377 } | 377 } |
| 378 } | 378 } |
| OLD | NEW |