Chromium Code Reviews| Index: lib/compiler/implementation/ssa/codegen.dart |
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart |
| index db2c5005505abe97003b41478f0f41ecaa7b6768..d77dcf61a3686247c4d082912cbc1b73b107f3ad 100644 |
| --- a/lib/compiler/implementation/ssa/codegen.dart |
| +++ b/lib/compiler/implementation/ssa/codegen.dart |
| @@ -1800,10 +1800,10 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| push(new js.Binary("!==", pop(), new js.LiteralBool(true)), input); |
| } else if (isBuiltinRelational(input) && |
| isGenerateAtUseSite(input) && |
| - types[input.inputs[0]].isUseful() && |
| - !input.inputs[0].isDouble(types) && |
| types[input.inputs[1]].isUseful() && |
|
floitsch
2012/10/04 11:35:26
I really think we should make this input.left, inp
|
| - !input.inputs[1].isDouble(types)) { |
| + !input.inputs[1].isDouble(types) && |
| + types[input.inputs[2]].isUseful() && |
| + !input.inputs[2].isDouble(types)) { |
| // This optimization doesn't work for NaN, so we only do it if the |
| // type is known to be non-Double. |
| Map<String, String> inverseOperator = const <String, String>{ |
| @@ -1817,9 +1817,8 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| ">=" : "<" |
| }; |
| HRelational relational = input; |
| - |
| - visitInvokeBinary(input, |
| - inverseOperator[relational.operation.name.stringValue]); |
| + BinaryOperation operation = relational.operation(backend.constantSystem); |
| + visitInvokeBinary(input, inverseOperator[operation.name.stringValue]); |
| } else { |
| use(input); |
| push(new js.Prefix("!", pop())); |