Refine wasm/aot function instance lookup (#3865)
Sort the module instance's export functions with the function name, and use binary search to lookup the wasm/aot function.
This commit is contained in:
@ -3391,8 +3391,7 @@ wasm_func_call(const wasm_func_t *func, const wasm_val_vec_t *params,
|
||||
if (export->kind == EXPORT_KIND_FUNC) {
|
||||
if (export->index == func->func_idx_rt) {
|
||||
func_comm_rt =
|
||||
(AOTFunctionInstance *)inst_aot->export_functions
|
||||
+ export_func_j;
|
||||
aot_lookup_function(inst_aot, export->name);
|
||||
((wasm_func_t *)func)->func_comm_rt = func_comm_rt;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user