Enable call wasm-c-api native func directly from interpreter (#656)

And update loader error messages for latest spec cases, fix aot compiler build error based on latest LLVM code base.
This commit is contained in:
Wenyong Huang
2021-06-28 11:59:49 +08:00
committed by GitHub
parent c6783ef258
commit cba4c78273
13 changed files with 249 additions and 364 deletions

View File

@ -83,7 +83,7 @@ DEFINE_FUNCTION(log)
return NULL;
}
if (data[length.of.i32]) {
if (data[length.of.i32 - 1]) {
printf("> Error terminated character\n");
return NULL;
}
@ -188,7 +188,11 @@ main(int argc, const char *argv[])
// Load binary.
printf("Loading binary...\n");
#if WASM_ENABLE_AOT != 0 && WASM_ENABLE_INTERP == 0
FILE *file = fopen("callback_chain.aot", "rb");
#else
FILE *file = fopen("callback_chain.wasm", "rb");
#endif
if (!file) {
printf("> Error loading module!\n");
return 1;