diff options
Diffstat (limited to 'src/shell-interface.h')
-rw-r--r-- | src/shell-interface.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h index 4fea7f8a6..d1cf3290e 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -42,7 +42,7 @@ struct TrapException {}; // GC memory may be allocated, but hosts have limits.) struct HostLimitException {}; -struct ShellExternalInterface : ModuleInstance::ExternalInterface { +struct ShellExternalInterface : ModuleRunner::ExternalInterface { // The underlying memory can be accessed through unaligned pointers which // isn't well-behaved in C++. WebAssembly nonetheless expects it to behave // properly. Avoid emitting unaligned load/store by checking for alignment @@ -95,16 +95,16 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { } memory; std::unordered_map<Name, std::vector<Literal>> tables; - std::map<Name, std::shared_ptr<ModuleInstance>> linkedInstances; + std::map<Name, std::shared_ptr<ModuleRunner>> linkedInstances; ShellExternalInterface( - std::map<Name, std::shared_ptr<ModuleInstance>> linkedInstances_ = {}) + std::map<Name, std::shared_ptr<ModuleRunner>> linkedInstances_ = {}) : memory() { linkedInstances.swap(linkedInstances_); } virtual ~ShellExternalInterface() = default; - ModuleInstance* getImportInstance(Importable* import) { + ModuleRunner* getImportInstance(Importable* import) { auto it = linkedInstances.find(import->module); if (it == linkedInstances.end()) { Fatal() << "importGlobals: unknown import: " << import->module.str << "." @@ -113,7 +113,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { return it->second.get(); } - void init(Module& wasm, ModuleInstance& instance) override { + void init(Module& wasm, ModuleRunner& instance) override { if (wasm.memory.exists && !wasm.memory.imported()) { memory.resize(wasm.memory.initial * wasm::Memory::kPageSize); } @@ -155,7 +155,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { HeapType sig, Literals& arguments, Type results, - ModuleInstance& instance) override { + ModuleRunner& instance) override { auto it = tables.find(tableName); if (it == tables.end()) { |