| Index: src/compiler/typer.cc
|
| diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
|
| index 5fb20da9a5df17e8f6edf4cb87e1666dfa8aaa75..b670f52fbbec1003cbbd1db1cc51aaceb9b96f8e 100644
|
| --- a/src/compiler/typer.cc
|
| +++ b/src/compiler/typer.cc
|
| @@ -291,6 +291,7 @@ class Typer::Visitor : public Reducer {
|
| static Type* ObjectIsSmi(Type*, Typer*);
|
| static Type* ObjectIsString(Type*, Typer*);
|
| static Type* ObjectIsUndetectable(Type*, Typer*);
|
| + static Type* TypeOfIsFunction(Type*, Typer*);
|
|
|
| static ComparisonOutcome JSCompareTyper(Type*, Type*, Typer*);
|
|
|
| @@ -546,6 +547,11 @@ Type* Typer::Visitor::ObjectIsUndetectable(Type* type, Typer* t) {
|
| return Type::Boolean();
|
| }
|
|
|
| +Type* Typer::Visitor::TypeOfIsFunction(Type* type, Typer* t) {
|
| + if (type->Is(Type::Function())) return t->singleton_true_;
|
| + if (!type->Maybe(Type::Function())) return t->singleton_false_;
|
| + return Type::Boolean();
|
| +}
|
|
|
| // -----------------------------------------------------------------------------
|
|
|
| @@ -1926,6 +1932,10 @@ Type* Typer::Visitor::TypeObjectIsUndetectable(Node* node) {
|
| return TypeUnaryOp(node, ObjectIsUndetectable);
|
| }
|
|
|
| +Type* Typer::Visitor::TypeTypeOfIsFunction(Node* node) {
|
| + return TypeUnaryOp(node, TypeOfIsFunction);
|
| +}
|
| +
|
| Type* Typer::Visitor::TypeNewUnmappedArgumentsElements(Node* node) {
|
| return Type::OtherInternal();
|
| }
|
|
|