From f738f5c838476da230bd5a4dc75e56c4b7be9ba3 Mon Sep 17 00:00:00 2001 From: Abbas Mashayekh Date: Fri, 16 Apr 2021 19:38:35 +0430 Subject: Very simple module linking in wasm-shell (#3792) This is a rewrite of the wasm-shell tool, with the goal of improved compatibility with the reference interpreter and the spec test suite. To facilitate that, module instances are provided with a list of linked instances, and imported objects are looked up in the correct instance. The new shell can: - register and link modules using the (register ...) command. - parse binary modules with the syntax (module binary ...). - provide the "spectest" module defined in the reference interpreter - assert instantiation traps with assert_trap - better check linkability by looking up the linked instances in - assert_unlinkable It cannot call external function references that are not direct imports. That would require bigger changes. --- src/binaryen-c.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/binaryen-c.cpp') diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 161dcf9e3..c91c15422 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -3907,7 +3907,7 @@ BinaryenModuleRef BinaryenModuleRead(char* input, size_t inputSize) { void BinaryenModuleInterpret(BinaryenModuleRef module) { ShellExternalInterface interface; - ModuleInstance instance(*(Module*)module, &interface); + ModuleInstance instance(*(Module*)module, &interface, {}); } BinaryenIndex BinaryenModuleAddDebugInfoFileName(BinaryenModuleRef module, -- cgit v1.2.3