Add parameter module inst for native wrapper functions (#117)

And add asm code of em64/arm/mips version to call native wrapper functions;
Fix some issues of calling wrapper functions;
This commit is contained in:
wenyongh
2019-09-10 10:23:46 +08:00
committed by GitHub
parent 2294f52e3a
commit 26149021ff
58 changed files with 1287 additions and 494 deletions

View File

@ -45,7 +45,9 @@ static WGLNativeFuncDef btn_native_func_defs[] = {
};
/*************** Native Interface to Wasm App ***********/
void wasm_btn_native_call(int32 func_id, uint32 argv_offset, uint32 argc)
void
wasm_btn_native_call(wasm_module_inst_t module_inst,
int32 func_id, uint32 argv_offset, uint32 argc)
{
uint32 size = sizeof(btn_native_func_defs) / sizeof(WGLNativeFuncDef);

View File

@ -61,7 +61,9 @@ static WGLNativeFuncDef cb_native_func_defs[] = {
};
/*************** Native Interface to Wasm App ***********/
void wasm_cb_native_call(int32 func_id, uint32 argv_offset, uint32 argc)
void
wasm_cb_native_call(wasm_module_inst_t module_inst,
int32 func_id, uint32 argv_offset, uint32 argc)
{
uint32 size = sizeof(cb_native_func_defs) / sizeof(WGLNativeFuncDef);

View File

@ -60,7 +60,9 @@ static WGLNativeFuncDef label_native_func_defs[] = {
};
/*************** Native Interface to Wasm App ***********/
void wasm_label_native_call(int32 func_id, uint32 argv_offset, uint32 argc)
void
wasm_label_native_call(wasm_module_inst_t module_inst,
int32 func_id, uint32 argv_offset, uint32 argc)
{
uint32 size = sizeof(label_native_func_defs) / sizeof(WGLNativeFuncDef);

View File

@ -51,7 +51,9 @@ static WGLNativeFuncDef list_native_func_defs[] = {
};
/*************** Native Interface to Wasm App ***********/
void wasm_list_native_call(int32 func_id, uint32 argv_offset, uint32 argc)
void
wasm_list_native_call(wasm_module_inst_t module_inst,
int32 func_id, uint32 argv_offset, uint32 argc)
{
uint32 size = sizeof(list_native_func_defs) / sizeof(WGLNativeFuncDef);

View File

@ -341,7 +341,9 @@ static WGLNativeFuncDef obj_native_func_defs[] = {
};
/*************** Native Interface to Wasm App ***********/
void wasm_obj_native_call(int32 func_id, uint32 argv_offset, uint32 argc)
void
wasm_obj_native_call(wasm_module_inst_t module_inst,
int32 func_id, uint32 argv_offset, uint32 argc)
{
uint32 size = sizeof(obj_native_func_defs) / sizeof(WGLNativeFuncDef);