From 230159efa76fb09d103e79649e53412540b8146e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 31 Aug 2021 08:36:27 -0700 Subject: [PATCH] Inline some type conversions for `()` The `()` type accidentally wasn't getting its trivial type conversions inlined because it doesn't actually have any type parameters. This commit adds `#[inline]` to the relevant functions to ensure that these get inlined across crates. --- crates/wasmtime/src/func/typed.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/wasmtime/src/func/typed.rs b/crates/wasmtime/src/func/typed.rs index 119351e323..7085b84eab 100644 --- a/crates/wasmtime/src/func/typed.rs +++ b/crates/wasmtime/src/func/typed.rs @@ -368,6 +368,7 @@ macro_rules! impl_wasm_params { } } + #[inline] fn into_abi(self, _store: &mut StoreOpaque) -> Option { let ($($t,)*) = self; $( @@ -446,6 +447,7 @@ macro_rules! impl_wasm_results { { type ResultAbi = ($($t::Abi,)*); + #[inline] unsafe fn from_abi(store: &mut StoreOpaque, abi: Self::ResultAbi) -> Self { let ($($t,)*) = abi; ($($t::from_abi($t, store),)*)