[turbofan] Remove unused function_type_ from Typer.

This is never passed to the Typer, and actually wouldn't work
anyways, since we cannot derive any meaningful types for
Parameters in JavaScript.

R=mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2171723002
Cr-Commit-Position: refs/heads/master@{#37944}
This commit is contained in:
bmeurer 2016-07-21 04:39:49 -07:00 committed by Commit bot
parent 24d432cb82
commit 1b004d3f9d
2 changed files with 3 additions and 17 deletions

View File

@ -31,12 +31,11 @@ class Typer::Decorator final : public GraphDecorator {
}; };
Typer::Typer(Isolate* isolate, Graph* graph, Flags flags, Typer::Typer(Isolate* isolate, Graph* graph, Flags flags,
CompilationDependencies* dependencies, FunctionType* function_type) CompilationDependencies* dependencies)
: isolate_(isolate), : isolate_(isolate),
graph_(graph), graph_(graph),
flags_(flags), flags_(flags),
dependencies_(dependencies), dependencies_(dependencies),
function_type_(function_type),
decorator_(nullptr), decorator_(nullptr),
cache_(TypeCache::Get()), cache_(TypeCache::Get()),
operation_typer_(isolate, zone()) { operation_typer_(isolate, zone()) {
@ -625,17 +624,7 @@ Type* Typer::Visitor::TypeIfException(Node* node) { return Type::Any(); }
// Common operators. // Common operators.
Type* Typer::Visitor::TypeParameter(Node* node) { return Type::Any(); }
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::TypeOsrValue(Node* node) { return Type::Any(); } Type* Typer::Visitor::TypeOsrValue(Node* node) { return Type::Any(); }

View File

@ -31,8 +31,7 @@ class Typer {
typedef base::Flags<Flag> Flags; typedef base::Flags<Flag> Flags;
Typer(Isolate* isolate, Graph* graph, Flags flags = kNoFlags, Typer(Isolate* isolate, Graph* graph, Flags flags = kNoFlags,
CompilationDependencies* dependencies = nullptr, CompilationDependencies* dependencies = nullptr);
FunctionType* function_type = nullptr);
~Typer(); ~Typer();
void Run(); void Run();
@ -48,14 +47,12 @@ class Typer {
Isolate* isolate() const { return isolate_; } Isolate* isolate() const { return isolate_; }
Flags flags() const { return flags_; } Flags flags() const { return flags_; }
CompilationDependencies* dependencies() const { return dependencies_; } CompilationDependencies* dependencies() const { return dependencies_; }
FunctionType* function_type() const { return function_type_; }
OperationTyper* operation_typer() { return &operation_typer_; } OperationTyper* operation_typer() { return &operation_typer_; }
Isolate* const isolate_; Isolate* const isolate_;
Graph* const graph_; Graph* const graph_;
Flags const flags_; Flags const flags_;
CompilationDependencies* const dependencies_; CompilationDependencies* const dependencies_;
FunctionType* function_type_;
Decorator* decorator_; Decorator* decorator_;
TypeCache const& cache_; TypeCache const& cache_;
OperationTyper operation_typer_; OperationTyper operation_typer_;