| Index: lib/compiler/implementation/ssa/nodes.dart
|
| diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
|
| index 03d2fb560490aa5ae50a7dcf06f92913bdcaa408..0ce41919a7a9e36b3abb1f8805cbbf3ce5fd4b7f 100644
|
| --- a/lib/compiler/implementation/ssa/nodes.dart
|
| +++ b/lib/compiler/implementation/ssa/nodes.dart
|
| @@ -1843,7 +1843,12 @@ class HEquals extends HRelational {
|
| accept(HVisitor visitor) => visitor.visitEquals(this);
|
|
|
| bool get builtin() {
|
| - return (left.isNumber() && right.isNumber()) || left is HConstant;
|
| + if (left.isNumber() && right.isNumber()) return true;
|
| + if (left is !HConstant) return false;
|
| + HConstant leftConstant = left;
|
| + // TODO(floitsch): we can do better if we know that the constant does not
|
| + // have the equality operator overridden.
|
| + return !leftConstant.constant.isConstructedObject();
|
| }
|
|
|
| HType computeType() => HType.BOOLEAN;
|
|
|