diff options
author | Abbas Mashayekh <martianboy2005@gmail.com> | 2021-04-16 19:38:35 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 08:08:35 -0700 |
commit | f738f5c838476da230bd5a4dc75e56c4b7be9ba3 (patch) | |
tree | 0d5add88387f42ba2ad0e75f1d2c2c2046f2ba4c /src/binaryen-c.cpp | |
parent | bd2e8661a31aa02f701e31110108a5f5c194afed (diff) | |
download | binaryen-f738f5c838476da230bd5a4dc75e56c4b7be9ba3.tar.gz binaryen-f738f5c838476da230bd5a4dc75e56c4b7be9ba3.tar.bz2 binaryen-f738f5c838476da230bd5a4dc75e56c4b7be9ba3.zip |
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.
Diffstat (limited to 'src/binaryen-c.cpp')
-rw-r--r-- | src/binaryen-c.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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, |