State representation.

This commit is contained in:
losfair
2019-06-09 21:21:18 +08:00
parent bea3ebd2f3
commit 082b8376ae
5 changed files with 87 additions and 34 deletions

View File

@ -4,6 +4,7 @@ use crate::{
typed_func::Wasm,
types::{LocalFuncIndex, SigIndex},
vm,
state::FunctionStateMap,
};
use crate::{
@ -84,6 +85,11 @@ pub trait RunnableModule: Send + Sync {
local_func_index: LocalFuncIndex,
) -> Option<NonNull<vm::Func>>;
fn get_func_statemap(
&self,
_local_func_index: LocalFuncIndex,
) -> Option<FunctionStateMap> { None }
/// A wasm trampoline contains the necesarry data to dynamically call an exported wasm function.
/// Given a particular signature index, we are returned a trampoline that is matched with that
/// signature and an invoke function that can call the trampoline.