| Index: src/compiler/typer.cc
|
| diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
|
| index 75e628326b16435eb113821bcd4bf64538ce8d3f..82572927bb363855ba081f2aefb9c7b253a840d3 100644
|
| --- a/src/compiler/typer.cc
|
| +++ b/src/compiler/typer.cc
|
| @@ -285,6 +285,7 @@ class Typer::Visitor : public Reducer {
|
| #undef DECLARE_METHOD
|
|
|
| static Type* ObjectIsDetectableCallable(Type*, Typer*);
|
| + static Type* ObjectIsNaN(Type*, Typer*);
|
| static Type* ObjectIsNonCallable(Type*, Typer*);
|
| static Type* ObjectIsNumber(Type*, Typer*);
|
| static Type* ObjectIsReceiver(Type*, Typer*);
|
| @@ -512,6 +513,12 @@ Type* Typer::Visitor::ObjectIsDetectableCallable(Type* type, Typer* t) {
|
| return Type::Boolean();
|
| }
|
|
|
| +Type* Typer::Visitor::ObjectIsNaN(Type* type, Typer* t) {
|
| + if (type->Is(Type::NaN())) return t->singleton_true_;
|
| + if (!type->Maybe(Type::NaN())) return t->singleton_false_;
|
| + return Type::Boolean();
|
| +}
|
| +
|
| Type* Typer::Visitor::ObjectIsNonCallable(Type* type, Typer* t) {
|
| if (type->Is(Type::NonCallable())) return t->singleton_true_;
|
| if (!type->Maybe(Type::NonCallable())) return t->singleton_false_;
|
| @@ -1926,6 +1933,10 @@ Type* Typer::Visitor::TypeObjectIsDetectableCallable(Node* node) {
|
| return TypeUnaryOp(node, ObjectIsDetectableCallable);
|
| }
|
|
|
| +Type* Typer::Visitor::TypeObjectIsNaN(Node* node) {
|
| + return TypeUnaryOp(node, ObjectIsNaN);
|
| +}
|
| +
|
| Type* Typer::Visitor::TypeObjectIsNonCallable(Node* node) {
|
| return TypeUnaryOp(node, ObjectIsNonCallable);
|
| }
|
|
|