Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Mark `GcHeap::index[_mut]` methods as `inline(always)` (#14887)

Nick Fitzgeraldc3f66a31a83b
diff --git a/crates/wasmtime/src/runtime/vm/gc/gc_runtime.rs b/crates/wasmtime/src/runtime/vm/gc/gc_runtime.rs
index 34e1dda408..57c02a408b 100644
--- a/crates/wasmtime/src/runtime/vm/gc/gc_runtime.rs
+++ b/crates/wasmtime/src/runtime/vm/gc/gc_runtime.rs
@@ -468,7 +468,7 @@ pub unsafe trait GcHeap: 'static + Send + Sync {
/// # Errors
///
/// Returns an error on out of bounds or if the `gc_ref` is an `i31ref`.
- #[inline]
+ #[inline(always)]
fn index<T>(&self, gc_ref: &TypedGcRef<T>) -> Result<&T>
where
Self: Sized,
@@ -495,7 +495,7 @@ pub unsafe trait GcHeap: 'static + Send + Sync {
/// # Errors
///
/// Returns an error on out of bounds or if the `gc_ref` is an `i31ref`.
- #[inline]
+ #[inline(always)]
fn index_mut<T>(&mut self, gc_ref: &TypedGcRef<T>) -> Result<&mut T>
where
Self: Sized,