Move Webassembly objects to Store and remove Context

Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
This commit is contained in:
Syrus Akbary
2022-07-08 15:33:29 -07:00
committed by Manos Pitsidianakis
parent b5ae6399ce
commit a419ccdf52
214 changed files with 5800 additions and 5759 deletions

View File

@ -143,15 +143,6 @@ WASM_DECLARE_OWN(store)
WASM_API_EXTERN own wasm_store_t* wasm_store_new(wasm_engine_t*);
// Context
WASM_DECLARE_OWN(context)
WASM_DECLARE_OWN(context_ref_mut)
WASM_API_EXTERN own void wasm_store_context_set(own wasm_store_t*, own wasm_context_t*);
WASM_API_EXTERN own void wasm_store_data_set(own wasm_store_t*, own void*);
WASM_API_EXTERN own void* wasm_store_data_get(own wasm_store_t*);
///////////////////////////////////////////////////////////////////////////////
// Type Representations
@ -422,10 +413,15 @@ WASM_API_EXTERN own wasm_module_t* wasm_module_deserialize(wasm_store_t*, const
WASM_DECLARE_REF(func)
typedef own wasm_trap_t* (*wasm_func_callback_t)(
wasm_context_ref_mut_t*, const wasm_val_vec_t* args, own wasm_val_vec_t* results);
const wasm_val_vec_t* args, own wasm_val_vec_t* results);
typedef own wasm_trap_t* (*wasm_func_callback_with_env_t)(
void* env, const wasm_val_vec_t* args, wasm_val_vec_t* results);
WASM_API_EXTERN own wasm_func_t* wasm_func_new(
wasm_store_t*, const wasm_functype_t*, wasm_func_callback_t);
WASM_API_EXTERN own wasm_func_t* wasm_func_new_with_env(
wasm_store_t*, const wasm_functype_t* type, wasm_func_callback_with_env_t,
void* env, void (*finalizer)(void*));
WASM_API_EXTERN own wasm_functype_t* wasm_func_type(const wasm_func_t*);
WASM_API_EXTERN size_t wasm_func_param_arity(const wasm_func_t*);