CI: Enable testing AOT multi-module feature (#2621)
And refine some code pieces.
This commit is contained in:
@ -2955,18 +2955,21 @@ create_module(char *error_buf, uint32 error_buf_size)
|
||||
{
|
||||
AOTModule *module =
|
||||
loader_malloc(sizeof(AOTModule), error_buf, error_buf_size);
|
||||
|
||||
bh_list_status ret;
|
||||
|
||||
if (!module) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
module->module_type = Wasm_Module_AoT;
|
||||
|
||||
#if WASM_ENABLE_MULTI_MODULE != 0
|
||||
module->import_module_list = &module->import_module_list_head;
|
||||
ret = bh_list_init(module->import_module_list);
|
||||
bh_assert(ret == BH_LIST_SUCCESS);
|
||||
#endif
|
||||
(void)ret;
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
@ -126,13 +126,11 @@ runtime_malloc(uint64 size, WASMModuleInstanceCommon *module_inst,
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_MULTI_MODULE != 0
|
||||
/*
|
||||
TODO:
|
||||
Let loader_malloc be a general API both for AOT and WASM.
|
||||
*/
|
||||
/* TODO: Let loader_malloc be a general API both for AOT and WASM. */
|
||||
|
||||
#define loader_malloc(size, error_buf, error_buf_size) \
|
||||
runtime_malloc(size, NULL, error_buf, error_buf_size)
|
||||
|
||||
static void
|
||||
set_error_buf_v(const WASMModuleCommon *module, char *error_buf,
|
||||
uint32 error_buf_size, const char *format, ...)
|
||||
|
||||
@ -710,8 +710,8 @@ fd_object_release(wasm_exec_env_t env, struct fd_object *fo)
|
||||
bool
|
||||
fd_table_insert_existing(struct fd_table *ft, __wasi_fd_t in, int out)
|
||||
{
|
||||
__wasi_filetype_t type;
|
||||
__wasi_rights_t rights_base, rights_inheriting;
|
||||
__wasi_filetype_t type = __WASI_FILETYPE_UNKNOWN;
|
||||
__wasi_rights_t rights_base = 0, rights_inheriting = 0;
|
||||
struct fd_object *fo;
|
||||
__wasi_errno_t error;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user