Chromium Code Reviews| Index: src/compiler/pipeline.cc |
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
| index f799e51bd1ae3f3c29ec433b9b4de39bcfd7e265..71629373393ed4a16c305c28c988f19f876cd47f 100644 |
| --- a/src/compiler/pipeline.cc |
| +++ b/src/compiler/pipeline.cc |
| @@ -137,14 +137,16 @@ class PipelineData { |
| // For machine graph testing entry point. |
| PipelineData(ZoneStats* zone_stats, CompilationInfo* info, Graph* graph, |
| - Schedule* schedule) |
| + Schedule* schedule, SourcePositionTable* position_table) |
| : isolate_(info->isolate()), |
| info_(info), |
| debug_name_(info_->GetDebugName()), |
| zone_stats_(zone_stats), |
| graph_zone_scope_(zone_stats_, ZONE_NAME), |
| graph_(graph), |
| - source_positions_(new (info->zone()) SourcePositionTable(graph_)), |
| + source_positions_(position_table ? position_table |
|
Michael Starzinger
2016/12/08 11:38:05
nit: Can we move this piece that maybe allocates a
Clemens Hammacher
2016/12/08 12:15:37
Done. I am wondering though if it would not be bet
|
| + : new (info->zone()) |
| + SourcePositionTable(graph_)), |
| schedule_(schedule), |
| instruction_zone_scope_(zone_stats_, ZONE_NAME), |
| instruction_zone_(instruction_zone_scope_.zone()), |
| @@ -1641,7 +1643,7 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, |
| // Construct a pipeline for scheduling and code generation. |
| ZoneStats zone_stats(isolate->allocator()); |
| - PipelineData data(&zone_stats, &info, graph, schedule); |
| + PipelineData data(&zone_stats, &info, graph, schedule, nullptr); |
| std::unique_ptr<PipelineStatistics> pipeline_statistics; |
| if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
| pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); |
| @@ -1689,13 +1691,12 @@ Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
| } |
| // static |
| -Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
| - CallDescriptor* call_descriptor, |
| - Graph* graph, |
| - Schedule* schedule) { |
| +Handle<Code> Pipeline::GenerateCodeForTesting( |
| + CompilationInfo* info, CallDescriptor* call_descriptor, Graph* graph, |
| + Schedule* schedule, SourcePositionTable* source_positions) { |
| // Construct a pipeline for scheduling and code generation. |
| ZoneStats zone_stats(info->isolate()->allocator()); |
| - PipelineData data(&zone_stats, info, graph, schedule); |
| + PipelineData data(&zone_stats, info, graph, schedule, source_positions); |
| std::unique_ptr<PipelineStatistics> pipeline_statistics; |
| if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
| pipeline_statistics.reset(new PipelineStatistics(info, &zone_stats)); |