Skip to content

Commit

Permalink
Update initialization of WABT store field to work with top-of-tree (#…
Browse files Browse the repository at this point in the history
…6649)

The copy and move assignment operators for Store are going away; initialize ours in the
  • Loading branch information
steven-johnson authored Mar 15, 2022
1 parent 07dddb7 commit b608583
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/WasmExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2285,17 +2285,23 @@ struct WasmModuleContents {
~WasmModuleContents() = default;
};

// clang-format off
WasmModuleContents::WasmModuleContents(
const Module &halide_module,
const std::vector<Argument> &arguments,
const std::string &fn_name,
const std::map<std::string, Halide::JITExtern> &jit_externs,
const std::vector<JITModule> &extern_deps)
: target(halide_module.target()),
arguments(arguments),
jit_externs(jit_externs),
extern_deps(extern_deps),
trampolines(JITModule::make_trampolines_module(get_host_target(), jit_externs, kTrampolineSuffix, extern_deps)) {
: target(halide_module.target())
, arguments(arguments)
, jit_externs(jit_externs)
, extern_deps(extern_deps)
, trampolines(JITModule::make_trampolines_module(get_host_target(), jit_externs, kTrampolineSuffix, extern_deps))
#if WITH_WABT
, store(wabt::interp::Store(calc_features(halide_module.target())))
#endif
// clang-format on
{

#if WITH_WABT || WITH_V8
wdebug(1) << "Compiling wasm function " << fn_name << "\n";
Expand All @@ -2307,8 +2313,6 @@ WasmModuleContents::WasmModuleContents(
// Compile halide into wasm bytecode.
std::vector<char> final_wasm = compile_to_wasm(halide_module, fn_name);

store = wabt::interp::Store(calc_features(halide_module.target()));

// Create a wabt Module for it.
wabt::MemoryStream log_stream;
constexpr bool kReadDebugNames = true;
Expand Down

0 comments on commit b608583

Please sign in to comment.