| Index: src/compiler/typer.cc
|
| diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
|
| index 5b7a917e7664d9ed471ed30a6d9e0e7e4aed9c68..c4dc3182ef3b86424ade6581e9140b320b932d9f 100644
|
| --- a/src/compiler/typer.cc
|
| +++ b/src/compiler/typer.cc
|
| @@ -54,12 +54,15 @@ Typer::Typer(Isolate* isolate, Graph* graph, Flags flags,
|
|
|
| singleton_false_ = Type::Constant(factory->false_value(), zone);
|
| singleton_true_ = Type::Constant(factory->true_value(), zone);
|
| + singleton_the_hole_ = Type::Constant(factory->the_hole_value(), zone);
|
| signed32ish_ = Type::Union(Type::Signed32(), truncating_to_zero, zone);
|
| unsigned32ish_ = Type::Union(Type::Unsigned32(), truncating_to_zero, zone);
|
| falsish_ = Type::Union(
|
| Type::Undetectable(),
|
| - Type::Union(Type::Union(singleton_false_, cache_.kZeroish, zone),
|
| - Type::NullOrUndefined(), zone),
|
| + Type::Union(
|
| + Type::Union(Type::Union(singleton_false_, cache_.kZeroish, zone),
|
| + Type::NullOrUndefined(), zone),
|
| + singleton_the_hole_, zone),
|
| zone);
|
| truish_ = Type::Union(
|
| singleton_true_,
|
| @@ -697,6 +700,10 @@ Type* Typer::Visitor::JSStrictEqualTyper(Type* lhs, Type* rhs, Typer* t) {
|
| (lhs->Max() < rhs->Min() || lhs->Min() > rhs->Max())) {
|
| return t->singleton_false_;
|
| }
|
| + if ((lhs->Is(t->singleton_the_hole_) || rhs->Is(t->singleton_the_hole_)) &&
|
| + !lhs->Maybe(rhs)) {
|
| + return t->singleton_false_;
|
| + }
|
| if (lhs->IsConstant() && rhs->Is(lhs)) {
|
| // Types are equal and are inhabited only by a single semantic value,
|
| // which is not nan due to the earlier check.
|
|
|