Store import function pointer in module instance (#1130)

Fix the issue reported by #1118 , use this approach since it avoids copying
unnecessary static information into instance and reduces the footprint.
This commit is contained in:
Xu Jun
2022-04-27 20:21:51 +08:00
committed by GitHub
parent f8b4ca2a70
commit 98431225f2
4 changed files with 40 additions and 14 deletions

View File

@ -165,6 +165,9 @@ struct WASMModuleInstance {
uint32 export_tab_count;
#endif
/* Array of function pointers to import functions */
void **import_func_ptrs;
WASMMemoryInstance **memories;
WASMTableInstance **tables;
WASMGlobalInstance *globals;