From 6b5e21d80e8b2c8542a690541a31911337281882 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 31 Aug 2021 08:37:19 -0700 Subject: [PATCH] Inline some trivial store accessors These were showing up in some profiles, but they're trivial functions, so `#[inline]` them. --- crates/wasmtime/src/store.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/wasmtime/src/store.rs b/crates/wasmtime/src/store.rs index 31bdc48fb2..ca1fb4dd27 100644 --- a/crates/wasmtime/src/store.rs +++ b/crates/wasmtime/src/store.rs @@ -726,6 +726,7 @@ impl StoreInnermost { Ok(()) } + #[inline] pub fn async_support(&self) -> bool { cfg!(feature = "async") && self.engine().config().async_support @@ -736,10 +737,12 @@ impl StoreInnermost { &self.engine } + #[inline] pub fn store_data(&self) -> &StoreData { &self.store_data } + #[inline] pub fn store_data_mut(&mut self) -> &mut StoreData { &mut self.store_data }