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:
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user