| OLD | NEW |
| 1 library dart2js.cps_ir.update_refinements; | 1 library dart2js.cps_ir.update_refinements; |
| 2 | 2 |
| 3 import '../world.dart'; |
| 3 import 'cps_ir_nodes.dart'; | 4 import 'cps_ir_nodes.dart'; |
| 4 import 'optimizers.dart' show Pass; | 5 import 'optimizers.dart' show Pass; |
| 5 import 'type_mask_system.dart'; | 6 import 'type_mask_system.dart'; |
| 6 import '../world.dart'; | |
| 7 | 7 |
| 8 /// Updates all references to use the most refined version in scope. | 8 /// Updates all references to use the most refined version in scope. |
| 9 /// | 9 /// |
| 10 /// [GVN] and [RedundantJoinElimination], and possibly other passes, can create | 10 /// [GVN] and [RedundantJoinElimination], and possibly other passes, can create |
| 11 /// references that don't use the best refinement in scope. This pass improves | 11 /// references that don't use the best refinement in scope. This pass improves |
| 12 /// the refinement information. | 12 /// the refinement information. |
| 13 /// | 13 /// |
| 14 // | 14 // |
| 15 // TODO(asgerf): Could be done during GVN for another adjacent pass. | 15 // TODO(asgerf): Could be done during GVN for another adjacent pass. |
| 16 // It is easier to measure performance and rearrange passes when it has its | 16 // It is easier to measure performance and rearrange passes when it has its |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 if (def is Primitive) { | 91 if (def is Primitive) { |
| 92 Primitive refinement = refinementFor[def.effectiveDefinition]; | 92 Primitive refinement = refinementFor[def.effectiveDefinition]; |
| 93 if (refinement != null && refinement != ref.definition) { | 93 if (refinement != null && refinement != ref.definition) { |
| 94 ref.changeTo(refinement); | 94 ref.changeTo(refinement); |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 return false; | 98 return false; |
| 99 } | 99 } |
| 100 } | 100 } |
| OLD | NEW |