| 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 cps_ir.optimization.insert_refinements; | 5 library cps_ir.optimization.insert_refinements; |
| 6 | 6 |
| 7 import 'optimizers.dart' show Pass; | 7 import '../common/names.dart'; |
| 8 import 'shrinking_reductions.dart' show ParentVisitor; | 8 import '../types/types.dart' show |
| 9 TypeMask; |
| 10 |
| 9 import 'cps_ir_nodes.dart'; | 11 import 'cps_ir_nodes.dart'; |
| 10 import '../types/constants.dart'; | 12 import 'optimizers.dart' show |
| 11 import '../constants/values.dart'; | 13 Pass; |
| 12 import '../common/names.dart'; | 14 import 'shrinking_reductions.dart' show |
| 13 import '../universe/universe.dart'; | 15 ParentVisitor; |
| 14 import '../elements/elements.dart'; | |
| 15 import '../types/types.dart' show TypeMask; | |
| 16 import 'type_mask_system.dart'; | 16 import 'type_mask_system.dart'; |
| 17 | 17 |
| 18 /// Inserts [Refinement] nodes in the IR to allow for sparse path-sensitive | 18 /// Inserts [Refinement] nodes in the IR to allow for sparse path-sensitive |
| 19 /// type analysis in the [TypePropagator] pass. | 19 /// type analysis in the [TypePropagator] pass. |
| 20 /// | 20 /// |
| 21 /// Refinement nodes are inserted at the arms of a [Branch] node with a | 21 /// Refinement nodes are inserted at the arms of a [Branch] node with a |
| 22 /// condition of form `x is T` or `x == null`. | 22 /// condition of form `x is T` or `x == null`. |
| 23 /// | 23 /// |
| 24 /// Refinement nodes are inserted after a method invocation to refine the | 24 /// Refinement nodes are inserted after a method invocation to refine the |
| 25 /// receiver to the types that can respond to the given selector. | 25 /// receiver to the types that can respond to the given selector. |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 cont.firstRef.parent is Branch)) { | 215 cont.firstRef.parent is Branch)) { |
| 216 // Do not push the continuation here. | 216 // Do not push the continuation here. |
| 217 // visitInvokeMethod and visitBranch will do that. | 217 // visitInvokeMethod and visitBranch will do that. |
| 218 } else { | 218 } else { |
| 219 push(cont); | 219 push(cont); |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 return node.body; | 222 return node.body; |
| 223 } | 223 } |
| 224 } | 224 } |
| OLD | NEW |