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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { | 324 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { |
325 rewriteList(node.arguments); | 325 rewriteList(node.arguments); |
326 return node; | 326 return node; |
327 } | 327 } |
328 | 328 |
329 Expression visitApplyBuiltinOperator(ApplyBuiltinOperator node) { | 329 Expression visitApplyBuiltinOperator(ApplyBuiltinOperator node) { |
330 rewriteList(node.arguments); | 330 rewriteList(node.arguments); |
331 return node; | 331 return node; |
332 } | 332 } |
| 333 |
| 334 @override |
| 335 Expression visitForeignExpression(ForeignExpression node) { |
| 336 rewriteList(node.arguments); |
| 337 seenImpure = node.nativeBehavior.sideEffects.hasSideEffects(); |
| 338 return node; |
| 339 } |
333 } | 340 } |
OLD | NEW |