Added basic identity function benchmark

This commit is contained in:
Syrus Akbary
2018-10-16 13:27:26 +02:00
parent daefac46bb
commit 2cc93ddc38
4 changed files with 56 additions and 5 deletions

View File

@ -401,6 +401,10 @@ impl Instance {
pub fn memories(&self) -> Arc<Vec<LinearMemory>> {
self.memories.clone()
}
pub fn get_function_pointer(&self, func_index: FuncIndex) -> *const u8 {
let func_pointer = &self.functions[func_index.index()];
func_pointer.as_ptr()
}
/// Invoke a WebAssembly function given a FuncIndex and the
/// arguments that the function should be called with