| 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 'dart:math' show min; | 7 import 'dart:math' show min; |
| 8 import 'optimizers.dart' show Pass; | 8 |
| 9 import 'cps_ir_nodes.dart'; | 9 import '../common/names.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| 11 import '../common/names.dart'; | |
| 12 import '../types/types.dart' show TypeMask; | 11 import '../types/types.dart' show TypeMask; |
| 13 import '../universe/selector.dart'; | 12 import '../universe/selector.dart'; |
| 13 import 'cps_ir_nodes.dart'; |
| 14 import 'optimizers.dart' show Pass; |
| 14 import 'type_mask_system.dart'; | 15 import 'type_mask_system.dart'; |
| 15 | 16 |
| 16 /// Inserts [Refinement] nodes in the IR to allow for sparse path-sensitive | 17 /// Inserts [Refinement] nodes in the IR to allow for sparse path-sensitive |
| 17 /// type analysis in the [TypePropagator] pass. | 18 /// type analysis in the [TypePropagator] pass. |
| 18 /// | 19 /// |
| 19 /// Refinement nodes are inserted at the arms of a [Branch] node with a | 20 /// Refinement nodes are inserted at the arms of a [Branch] node with a |
| 20 /// condition of form `x is T` or `x == null`. | 21 /// condition of form `x is T` or `x == null`. |
| 21 /// | 22 /// |
| 22 /// Refinement nodes are inserted after a method invocation to refine the | 23 /// Refinement nodes are inserted after a method invocation to refine the |
| 23 /// receiver to the types that can respond to the given selector. | 24 /// receiver to the types that can respond to the given selector. |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 case 'exp': | 416 case 'exp': |
| 416 case 'log': | 417 case 'log': |
| 417 return [types.numType]; | 418 return [types.numType]; |
| 418 case 'pow': | 419 case 'pow': |
| 419 return [types.numType, types.numType]; | 420 return [types.numType, types.numType]; |
| 420 } | 421 } |
| 421 } | 422 } |
| 422 | 423 |
| 423 return null; | 424 return null; |
| 424 } | 425 } |
| OLD | NEW |