| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library dart2js.cps_ir.path_based_optimizer; | 4 library dart2js.cps_ir.path_based_optimizer; |
| 5 | 5 |
| 6 import '../js_backend/js_backend.dart'; |
| 7 import 'cps_fragment.dart'; |
| 6 import 'cps_ir_nodes.dart'; | 8 import 'cps_ir_nodes.dart'; |
| 7 import 'optimizers.dart'; | 9 import 'optimizers.dart'; |
| 8 import 'cps_fragment.dart'; | |
| 9 import '../js_backend/js_backend.dart'; | |
| 10 import 'type_mask_system.dart'; | 10 import 'type_mask_system.dart'; |
| 11 | 11 |
| 12 /// Optimizations based on intraprocedural forward dataflow analysis, taking | 12 /// Optimizations based on intraprocedural forward dataflow analysis, taking |
| 13 /// into account path information that is not expressed by [Refinement] nodes. | 13 /// into account path information that is not expressed by [Refinement] nodes. |
| 14 /// | 14 /// |
| 15 /// --- | 15 /// --- |
| 16 /// | 16 /// |
| 17 /// Removes branches that branch on the same value as a previously seen branch. | 17 /// Removes branches that branch on the same value as a previously seen branch. |
| 18 /// For example: | 18 /// For example: |
| 19 /// | 19 /// |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 // Replace the extra receiver argument with a dummy value if the | 167 // Replace the extra receiver argument with a dummy value if the |
| 168 // target definitely does not use it. | 168 // target definitely does not use it. |
| 169 if (typeSystem.targetIgnoresReceiverArgument( | 169 if (typeSystem.targetIgnoresReceiverArgument( |
| 170 node.receiver.type, node.selector)) { | 170 node.receiver.type, node.selector)) { |
| 171 node.makeDummyIntercepted(); | 171 node.makeDummyIntercepted(); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 } | 175 } |
| OLD | NEW |