| Index: test/cctest/wasm/wasm-run-utils.h
|
| diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
|
| index ea3e8ba2d4f381a9e96a3c6d13b1650eac65e904..db1144e1bc51b98bda9f4e322beed341a83acaaa 100644
|
| --- a/test/cctest/wasm/wasm-run-utils.h
|
| +++ b/test/cctest/wasm/wasm-run-utils.h
|
| @@ -242,9 +242,10 @@ class TestingModule : public ModuleEnv {
|
| };
|
|
|
| inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, ModuleEnv* module,
|
| - FunctionSig* sig, const byte* start,
|
| - const byte* end) {
|
| - compiler::WasmGraphBuilder builder(zone, jsgraph, sig);
|
| + FunctionSig* sig,
|
| + SourcePositionTable* source_position_table,
|
| + const byte* start, const byte* end) {
|
| + compiler::WasmGraphBuilder builder(zone, jsgraph, sig, source_position_table);
|
| TreeResult result =
|
| BuildTFGraph(zone->allocator(), &builder, module, sig, start, end);
|
| if (result.failed()) {
|
| @@ -418,7 +419,8 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
|
| sig(sig),
|
| descriptor_(nullptr),
|
| testing_module_(module),
|
| - debug_name_(debug_name) {
|
| + debug_name_(debug_name),
|
| + source_position_table_(this->graph()) {
|
| if (module) {
|
| // Get a new function from the testing module.
|
| function_ = nullptr;
|
| @@ -444,6 +446,7 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
|
| WasmFunction* function_;
|
| int function_index_;
|
| LocalDeclEncoder local_decls;
|
| + SourcePositionTable source_position_table_;
|
|
|
| Isolate* isolate() { return main_isolate(); }
|
| Graph* graph() const { return main_graph_; }
|
| @@ -460,7 +463,8 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
|
| void Build(const byte* start, const byte* end) {
|
| // Build the TurboFan graph.
|
| local_decls.Prepend(&start, &end);
|
| - TestBuildingGraph(main_zone(), &jsgraph, testing_module_, sig, start, end);
|
| + TestBuildingGraph(main_zone(), &jsgraph, testing_module_, sig,
|
| + &source_position_table_, start, end);
|
| delete[] start;
|
| }
|
|
|
| @@ -479,8 +483,8 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
|
| }
|
| CompilationInfo info(debug_name_, this->isolate(), this->zone(),
|
| Code::ComputeFlags(Code::WASM_FUNCTION));
|
| - Handle<Code> result =
|
| - Pipeline::GenerateCodeForTesting(&info, desc, this->graph());
|
| + Handle<Code> result = Pipeline::GenerateWASMCode(&info, desc, this->graph(),
|
| + &source_position_table_);
|
| #ifdef ENABLE_DISASSEMBLER
|
| if (!result.is_null() && FLAG_print_opt_code) {
|
| OFStream os(stdout);
|
|
|