diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc index 1e8d64af0e..4d57144809 100644 --- a/src/compiler/typer.cc +++ b/src/compiler/typer.cc @@ -31,12 +31,11 @@ class Typer::Decorator final : public GraphDecorator { }; Typer::Typer(Isolate* isolate, Graph* graph, Flags flags, - CompilationDependencies* dependencies, FunctionType* function_type) + CompilationDependencies* dependencies) : isolate_(isolate), graph_(graph), flags_(flags), dependencies_(dependencies), - function_type_(function_type), decorator_(nullptr), cache_(TypeCache::Get()), operation_typer_(isolate, zone()) { @@ -625,17 +624,7 @@ Type* Typer::Visitor::TypeIfException(Node* node) { return Type::Any(); } // Common operators. - -Type* Typer::Visitor::TypeParameter(Node* node) { - if (FunctionType* function_type = typer_->function_type()) { - int const index = ParameterIndexOf(node->op()); - if (index >= 0 && index < function_type->Arity()) { - return function_type->Parameter(index); - } - } - return Type::Any(); -} - +Type* Typer::Visitor::TypeParameter(Node* node) { return Type::Any(); } Type* Typer::Visitor::TypeOsrValue(Node* node) { return Type::Any(); } diff --git a/src/compiler/typer.h b/src/compiler/typer.h index b6c5cb333c..056318755e 100644 --- a/src/compiler/typer.h +++ b/src/compiler/typer.h @@ -31,8 +31,7 @@ class Typer { typedef base::Flags Flags; Typer(Isolate* isolate, Graph* graph, Flags flags = kNoFlags, - CompilationDependencies* dependencies = nullptr, - FunctionType* function_type = nullptr); + CompilationDependencies* dependencies = nullptr); ~Typer(); void Run(); @@ -48,14 +47,12 @@ class Typer { Isolate* isolate() const { return isolate_; } Flags flags() const { return flags_; } CompilationDependencies* dependencies() const { return dependencies_; } - FunctionType* function_type() const { return function_type_; } OperationTyper* operation_typer() { return &operation_typer_; } Isolate* const isolate_; Graph* const graph_; Flags const flags_; CompilationDependencies* const dependencies_; - FunctionType* function_type_; Decorator* decorator_; TypeCache const& cache_; OperationTyper operation_typer_;