Chromium Code Reviews| Index: lib/compiler/implementation/ssa/nodes.dart |
| =================================================================== |
| --- lib/compiler/implementation/ssa/nodes.dart (revision 10957) |
| +++ lib/compiler/implementation/ssa/nodes.dart (working copy) |
| @@ -1119,6 +1119,13 @@ |
| HType get guaranteedType() => HType.INTEGER; |
| + HType computeDesiredTypeForInput(HInstruction input, HTypeMap types) { |
| + // If the desired type of the input is already a number, we want |
| + // to specialize it to an integer. |
| + if (input.isNumber(types)) return HType.INTEGER; |
|
kasperl
2012/08/21 05:36:00
Maybe rewrite using ?:
ngeoffray
2012/08/21 07:38:41
Done.
|
| + return super.computeDesiredTypeForInput(input, types); |
| + } |
| + |
| accept(HVisitor visitor) => visitor.visitIntegerCheck(this); |
| int typeCode() => 3; |
| bool typeEquals(other) => other is HIntegerCheck; |