Index: lib/compiler/implementation/ssa/optimize.dart |
=================================================================== |
--- lib/compiler/implementation/ssa/optimize.dart (revision 14460) |
+++ lib/compiler/implementation/ssa/optimize.dart (working copy) |
@@ -398,7 +398,7 @@ |
assert(!leftType.isConflicting() && !rightType.isConflicting()); |
// We don't optimize on numbers to preserve the runtime semantics. |
- if (!(left.isNumber(types) && right.isNumber(types)) && |
+ if (!(left.isNumberOrNull(types) && right.isNumberOrNull(types)) && |
leftType.intersection(rightType, compiler).isConflicting()) { |
return graph.addConstantBool(false, constantSystem); |
} |
@@ -620,7 +620,9 @@ |
HInstruction value = node.inputs[1]; |
if (compiler.enableTypeAssertions) { |
HInstruction other = value.convertType( |
- compiler, field, HTypeConversion.CHECKED_MODE_CHECK); |
+ compiler, |
+ field.computeType(compiler), |
+ HTypeConversion.CHECKED_MODE_CHECK); |
if (other != value) { |
node.block.addBefore(node, other); |
value = other; |