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:
@ -753,7 +753,18 @@ wasm_interp_call_func_native(WASMModuleInstance *module_inst,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!func_import->call_conv_raw) {
|
||||
if (func_import->call_conv_wasm_c_api) {
|
||||
ret = wasm_runtime_invoke_c_api_native(
|
||||
(WASMModuleInstanceCommon *)module_inst,
|
||||
func_import->func_ptr_linked, func_import->func_type,
|
||||
cur_func->param_cell_num, frame->lp,
|
||||
func_import->wasm_c_api_with_env, func_import->attachment);
|
||||
if (ret) {
|
||||
argv_ret[0] = frame->lp[0];
|
||||
argv_ret[1] = frame->lp[1];
|
||||
}
|
||||
}
|
||||
else if (!func_import->call_conv_raw) {
|
||||
ret = wasm_runtime_invoke_native(exec_env, func_import->func_ptr_linked,
|
||||
func_import->func_type, func_import->signature,
|
||||
func_import->attachment,
|
||||
|
||||
Reference in New Issue
Block a user