| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index bd99944149ec4adab18c97b2f9f3f85242888131..c523093e19b7f5a00ce07893cdc9283d6a085875 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -83,7 +83,8 @@ static inline bool VerifyGraphs() {
|
| }
|
|
|
|
|
| -void Pipeline::VerifyAndPrintGraph(Graph* graph, const char* phase) {
|
| +void Pipeline::VerifyAndPrintGraph(
|
| + Graph* graph, const char* phase, Verifier::Typing typing) {
|
| if (FLAG_trace_turbo) {
|
| char buffer[256];
|
| Vector<char> filename(buffer, sizeof(buffer));
|
| @@ -105,7 +106,9 @@ void Pipeline::VerifyAndPrintGraph(Graph* graph, const char* phase) {
|
| os << "-- " << phase << " graph printed to file " << filename.start()
|
| << "\n";
|
| }
|
| - if (VerifyGraphs()) Verifier::Run(graph);
|
| + if (VerifyGraphs()) {
|
| + Verifier::Run(graph, FLAG_turbo_types ? typing : Verifier::UNTYPED);
|
| + }
|
| }
|
|
|
|
|
| @@ -157,12 +160,9 @@ Handle<Code> Pipeline::GenerateCode() {
|
| Graph graph(zone());
|
| SourcePositionTable source_positions(&graph);
|
| source_positions.AddDecorator();
|
| - // TODO(turbofan): there is no need to type anything during initial graph
|
| - // construction. This is currently only needed for the node cache, which the
|
| - // typer could sweep over later.
|
| - Typer typer(zone());
|
| + Typer typer(&graph, info()->context());
|
| CommonOperatorBuilder common(zone());
|
| - JSGraph jsgraph(&graph, &common, &typer);
|
| + JSGraph jsgraph(&graph, &common);
|
| Node* context_node;
|
| {
|
| PhaseStats graph_builder_stats(info(), PhaseStats::CREATE_GRAPH,
|
| @@ -184,7 +184,7 @@ Handle<Code> Pipeline::GenerateCode() {
|
| graph_reducer.ReduceGraph();
|
| }
|
|
|
| - VerifyAndPrintGraph(&graph, "Initial untyped");
|
| + VerifyAndPrintGraph(&graph, "Initial untyped", Verifier::UNTYPED);
|
|
|
| if (context_specialization_) {
|
| SourcePositionTable::Scope pos(&source_positions,
|
| @@ -192,7 +192,7 @@ Handle<Code> Pipeline::GenerateCode() {
|
| // Specialize the code to the context as aggressively as possible.
|
| JSContextSpecializer spec(info(), &jsgraph, context_node);
|
| spec.SpecializeToContext();
|
| - VerifyAndPrintGraph(&graph, "Context specialized");
|
| + VerifyAndPrintGraph(&graph, "Context specialized", Verifier::UNTYPED);
|
| }
|
|
|
| if (FLAG_turbo_inlining) {
|
| @@ -200,7 +200,7 @@ Handle<Code> Pipeline::GenerateCode() {
|
| SourcePosition::Unknown());
|
| JSInliner inliner(info(), &jsgraph);
|
| inliner.Inline();
|
| - VerifyAndPrintGraph(&graph, "Inlined");
|
| + VerifyAndPrintGraph(&graph, "Inlined", Verifier::UNTYPED);
|
| }
|
|
|
| // Print a replay of the initial graph.
|
| @@ -212,10 +212,8 @@ Handle<Code> Pipeline::GenerateCode() {
|
| {
|
| // Type the graph.
|
| PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer");
|
| - typer.Run(&graph, info()->context());
|
| + typer.Run();
|
| }
|
| - // All new nodes must be typed.
|
| - typer.DecorateGraph(&graph);
|
| {
|
| // Lower JSOperators where we can determine types.
|
| PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
|
|
|