Implement register/call native API with raw (unextracted) arguments (#222)

This commit is contained in:
wenyongh
2020-04-01 12:52:08 +08:00
committed by GitHub
parent d9890d2ccb
commit c1a0e6d877
17 changed files with 344 additions and 41 deletions

View File

@ -19,6 +19,7 @@ typedef struct NativeSymbolsNode {
const char *module_name;
NativeSymbol *native_symbols;
uint32 n_native_symbols;
bool call_conv_raw;
} NativeSymbolsNode, *NativeSymbolsList;
/**
@ -50,13 +51,19 @@ wasm_native_lookup_libc_builtin_global(const char *module_name,
*/
void*
wasm_native_resolve_symbol(const char *module_name, const char *field_name,
const WASMType *func_type, const char **p_signature);
const WASMType *func_type, const char **p_signature,
void **p_attachment, bool *p_call_conv_raw);
bool
wasm_native_register_natives(const char *module_name,
NativeSymbol *native_symbols,
uint32 n_native_symbols);
bool
wasm_native_register_natives_raw(const char *module_name,
NativeSymbol *native_symbols,
uint32 n_native_symbols);
bool
wasm_native_init();