Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart (revision 21808) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart (working copy) |
| @@ -186,7 +186,10 @@ |
| // Update the pending optimizations map based on the potentially |
| // new types of the operands. If the operand types no longer allow |
| // us to optimize, we remove the pending optimization. |
| - if (instruction.specializer is BinaryArithmeticSpecializer) { |
| + InvokeDynamicSpecializer specializer = instruction.specializer; |
| + if (specializer is BinaryArithmeticSpecializer |
|
kasperl
2013/04/23 06:12:43
Add a method on the specializer?
ngeoffray
2013/04/23 08:06:04
Done.
|
| + || (specializer is RelationalSpecializer |
| + && specializer is !EqualsSpecializer)) { |
| HInstruction left = instruction.inputs[1]; |
| HInstruction right = instruction.inputs[2]; |
| if (left.isNumber() && !right.isNumber()) { |
| @@ -315,7 +318,7 @@ |
| } |
| HType computeDesiredType(HInstruction instruction) { |
| - HType desiredType = HType.UNKNOWN; |
| + HType desiredType = instruction.instructionType; |
| for (final user in instruction.usedBy) { |
| HType userDesiredType = desiredTypeVisitor.computeDesiredTypeForInput( |
| user, instruction); |