| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index 81a0ec55737e8c88a9b72d00d753679fbf0e1ace..3ae4be69c9dbe665b7cb9f1fc48ad2e1ac9b21a6 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -105,7 +105,8 @@ void Pipeline::OpenTurboCfgFile(std::ofstream* stream) {
|
| }
|
|
|
|
|
| -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));
|
| @@ -143,7 +144,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);
|
| + }
|
| }
|
|
|
|
|
| @@ -231,11 +234,11 @@ Handle<Code> Pipeline::GenerateCode() {
|
| // 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());
|
| MachineOperatorBuilder machine;
|
| CommonOperatorBuilder common(zone());
|
| JSOperatorBuilder javascript(zone());
|
| - JSGraph jsgraph(&graph, &common, &javascript, &typer, &machine);
|
| + JSGraph jsgraph(&graph, &common, &javascript, &machine);
|
| Node* context_node;
|
| {
|
| PhaseStats graph_builder_stats(info(), PhaseStats::CREATE_GRAPH,
|
| @@ -257,7 +260,7 @@ Handle<Code> Pipeline::GenerateCode() {
|
| graph_reducer.ReduceGraph();
|
| }
|
|
|
| - VerifyAndPrintGraph(&graph, "Initial untyped");
|
| + VerifyAndPrintGraph(&graph, "Initial untyped", Verifier::UNTYPED);
|
|
|
| if (info()->is_context_specializing()) {
|
| SourcePositionTable::Scope pos(&source_positions,
|
| @@ -265,7 +268,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 (info()->is_inlining_enabled()) {
|
| @@ -273,7 +276,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.
|
| @@ -288,11 +291,9 @@ Handle<Code> Pipeline::GenerateCode() {
|
| {
|
| // Type the graph.
|
| PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer");
|
| - typer.Run(&graph, info()->context());
|
| + typer.Run();
|
| VerifyAndPrintGraph(&graph, "Typed");
|
| }
|
| - // All new nodes must be typed.
|
| - typer.DecorateGraph(&graph);
|
| {
|
| // Lower JSOperators where we can determine types.
|
| PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
|
| @@ -336,7 +337,8 @@ Handle<Code> Pipeline::GenerateCode() {
|
| graph_reducer.AddReducer(&mach_reducer);
|
| graph_reducer.ReduceGraph();
|
|
|
| - VerifyAndPrintGraph(&graph, "Lowered changes");
|
| + // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
|
| + VerifyAndPrintGraph(&graph, "Lowered changes", Verifier::UNTYPED);
|
| }
|
| }
|
|
|
| @@ -351,7 +353,8 @@ Handle<Code> Pipeline::GenerateCode() {
|
| graph_reducer.AddReducer(&lowering);
|
| graph_reducer.ReduceGraph();
|
|
|
| - VerifyAndPrintGraph(&graph, "Lowered generic");
|
| + // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
|
| + VerifyAndPrintGraph(&graph, "Lowered generic", Verifier::UNTYPED);
|
| }
|
|
|
| source_positions.RemoveDecorator();
|
| @@ -396,7 +399,7 @@ Handle<Code> Pipeline::GenerateCodeForMachineGraph(Linkage* linkage,
|
| Schedule* schedule) {
|
| CHECK(SupportedBackend());
|
| if (schedule == NULL) {
|
| - VerifyAndPrintGraph(graph, "Machine");
|
| + VerifyAndPrintGraph(graph, "Machine", Verifier::UNTYPED);
|
| schedule = ComputeSchedule(graph);
|
| }
|
| TraceSchedule(schedule);
|
|
|