Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 22357a7a4da5332341f38a03f4ac90f8b3b673e6..f799e51bd1ae3f3c29ec433b9b4de39bcfd7e265 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -137,14 +137,14 @@ |
// For machine graph testing entry point. |
PipelineData(ZoneStats* zone_stats, CompilationInfo* info, Graph* graph, |
- Schedule* schedule, SourcePositionTable* source_positions) |
+ Schedule* schedule) |
: isolate_(info->isolate()), |
info_(info), |
debug_name_(info_->GetDebugName()), |
zone_stats_(zone_stats), |
graph_zone_scope_(zone_stats_, ZONE_NAME), |
graph_(graph), |
- source_positions_(source_positions), |
+ source_positions_(new (info->zone()) SourcePositionTable(graph_)), |
schedule_(schedule), |
instruction_zone_scope_(zone_stats_, ZONE_NAME), |
instruction_zone_(instruction_zone_scope_.zone()), |
@@ -1641,8 +1641,7 @@ |
// Construct a pipeline for scheduling and code generation. |
ZoneStats zone_stats(isolate->allocator()); |
- SourcePositionTable source_positions(graph); |
- PipelineData data(&zone_stats, &info, graph, schedule, &source_positions); |
+ PipelineData data(&zone_stats, &info, graph, schedule); |
std::unique_ptr<PipelineStatistics> pipeline_statistics; |
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); |
@@ -1690,16 +1689,13 @@ |
} |
// static |
-Handle<Code> Pipeline::GenerateCodeForTesting( |
- CompilationInfo* info, CallDescriptor* call_descriptor, Graph* graph, |
- Schedule* schedule, SourcePositionTable* source_positions) { |
+Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
+ CallDescriptor* call_descriptor, |
+ Graph* graph, |
+ Schedule* schedule) { |
// Construct a pipeline for scheduling and code generation. |
ZoneStats zone_stats(info->isolate()->allocator()); |
- // TODO(wasm): Refactor code generation to check for non-existing source |
- // table, then remove this conditional allocation. |
- if (!source_positions) |
- source_positions = new (info->zone()) SourcePositionTable(graph); |
- PipelineData data(&zone_stats, info, graph, schedule, source_positions); |
+ PipelineData data(&zone_stats, info, graph, schedule); |
std::unique_ptr<PipelineStatistics> pipeline_statistics; |
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
pipeline_statistics.reset(new PipelineStatistics(info, &zone_stats)); |