mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-11-27 10:00:59 +00:00
fix compile error, making it work with AOT
This commit is contained in:
parent
52bc83d8df
commit
83c87df638
|
|
@ -85,6 +85,28 @@ static korp_mutex loading_module_list_lock;
|
|||
static bh_list registered_module_list_head;
|
||||
static bh_list *const registered_module_list = ®istered_module_list_head;
|
||||
static korp_mutex registered_module_list_lock;
|
||||
|
||||
void
|
||||
wasm_runtime_propagate_exception_from_import(
|
||||
WASMModuleInstanceCommon *parent, WASMModuleInstanceCommon *sub_module)
|
||||
{
|
||||
static const char exception_prefix[] = "Exception: ";
|
||||
const char *message = NULL;
|
||||
|
||||
if (!parent || !sub_module)
|
||||
return;
|
||||
|
||||
message = wasm_get_exception(sub_module);
|
||||
if (message && message[0] != '\0') {
|
||||
if (!strncmp(message, exception_prefix, sizeof(exception_prefix) - 1)) {
|
||||
message += sizeof(exception_prefix) - 1;
|
||||
}
|
||||
|
||||
wasm_set_exception(parent, message);
|
||||
wasm_set_exception(sub_module, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
wasm_runtime_destroy_registered_module_list(void);
|
||||
#endif /* WASM_ENABLE_MULTI_MODULE */
|
||||
|
|
|
|||
|
|
@ -578,6 +578,10 @@ typedef struct WASMRegisteredModule {
|
|||
uint8 *orig_file_buf;
|
||||
uint32 orig_file_buf_size;
|
||||
} WASMRegisteredModule;
|
||||
|
||||
void
|
||||
wasm_runtime_propagate_exception_from_import(
|
||||
WASMModuleInstanceCommon *parent, WASMModuleInstanceCommon *sub_module);
|
||||
#endif
|
||||
|
||||
typedef package_type_t PackageType;
|
||||
|
|
|
|||
|
|
@ -103,29 +103,6 @@ wasm_resolve_symbols(WASMModule *module)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_MULTI_MODULE != 0
|
||||
void
|
||||
wasm_runtime_propagate_exception_from_import(WASMModuleInstance *parent,
|
||||
WASMModuleInstance *sub_module)
|
||||
{
|
||||
static const char exception_prefix[] = "Exception: ";
|
||||
const char *message = NULL;
|
||||
|
||||
if (!parent || !sub_module)
|
||||
return;
|
||||
|
||||
message = wasm_get_exception(sub_module);
|
||||
if (message && message[0] != '\0') {
|
||||
if (!strncmp(message, exception_prefix, sizeof(exception_prefix) - 1)) {
|
||||
message += sizeof(exception_prefix) - 1;
|
||||
}
|
||||
|
||||
wasm_set_exception(parent, message);
|
||||
wasm_set_exception(sub_module, NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_MULTI_MODULE != 0
|
||||
static WASMFunction *
|
||||
wasm_resolve_function(const char *module_name, const char *function_name,
|
||||
|
|
|
|||
|
|
@ -593,10 +593,6 @@ wasm_lookup_tag(const WASMModuleInstance *module_inst, const char *name,
|
|||
const char *signature);
|
||||
#endif
|
||||
|
||||
void
|
||||
wasm_runtime_propagate_exception_from_import(WASMModuleInstance *parent,
|
||||
WASMModuleInstance *sub_module);
|
||||
|
||||
#endif
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user