wasmtime: Add criterion micro benchmarks for traps (#4398)
* wasmtime: Rename host->wasm trampolines As we introduce new types of trampolines, having clear names for our existing trampolines will be helpful. * Fix typo in docs for `VMCOMPONENT_MAGIC` * wasmtime: Add criterion micro benchmarks for traps
This commit is contained in:
@@ -20,7 +20,7 @@ use crate::PtrSize;
|
||||
|
||||
/// Equivalent of `VMCONTEXT_MAGIC` except for components.
|
||||
///
|
||||
/// This is stored at the start of all `VMComponentContext` structures adn
|
||||
/// This is stored at the start of all `VMComponentContext` structures and
|
||||
/// double-checked on `VMComponentContext::from_opaque`.
|
||||
pub const VMCOMPONENT_MAGIC: u32 = u32::from_le_bytes(*b"comp");
|
||||
|
||||
|
||||
@@ -1940,7 +1940,7 @@ macro_rules! impl_into_func {
|
||||
/// It reads the arguments out of the incoming `args` array,
|
||||
/// calls the given function pointer, and then stores the result
|
||||
/// back into the `args` array.
|
||||
unsafe extern "C" fn host_trampoline<$($args,)* R>(
|
||||
unsafe extern "C" fn host_to_wasm_trampoline<$($args,)* R>(
|
||||
callee_vmctx: *mut VMOpaqueContext,
|
||||
caller_vmctx: *mut VMContext,
|
||||
ptr: *const VMFunctionBody,
|
||||
@@ -1977,7 +1977,7 @@ macro_rules! impl_into_func {
|
||||
|
||||
let shared_signature_id = engine.signatures().register(ty.as_wasm_func_type());
|
||||
|
||||
let trampoline = host_trampoline::<$($args,)* R>;
|
||||
let trampoline = host_to_wasm_trampoline::<$($args,)* R>;
|
||||
|
||||
|
||||
let instance = unsafe {
|
||||
|
||||
Reference in New Issue
Block a user