Remove unused argument in wasm_runtime_lookup_function and refactor WASMModuleInstance (#3218)
Remove the unused parameter `signature` from `wasm_runtime_lookup_function`. Refactor the layout of WASMModuleInstance structure: - move common data members `c_api_func_imports` and `cur_exec_env` from `WASMModuleInstanceExtraCommon` to `WASMModuleInstance` - In `WASMModuleInstance`, enlarge `reserved[3]` to `reserved[5]` in case that we need to add more fields in the future ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/2530 https://github.com/bytecodealliance/wasm-micro-runtime/issues/3202
This commit is contained in:
@ -1187,9 +1187,8 @@ wasm_interp_call_func_native(WASMModuleInstance *module_inst,
|
||||
if (!func_import->call_conv_wasm_c_api) {
|
||||
native_func_pointer = module_inst->import_func_ptrs[cur_func_index];
|
||||
}
|
||||
else if (module_inst->e->common.c_api_func_imports) {
|
||||
c_api_func_import =
|
||||
module_inst->e->common.c_api_func_imports + cur_func_index;
|
||||
else if (module_inst->c_api_func_imports) {
|
||||
c_api_func_import = module_inst->c_api_func_imports + cur_func_index;
|
||||
native_func_pointer = c_api_func_import->func_ptr_linked;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user