Skip to content

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

Also mark `VMGcRef::heap_index` as `inline` (#14888)

Nick Fitzgeraldc4996f99c720
diff --git a/crates/wasmtime/src/runtime/vm/gc/gc_ref.rs b/crates/wasmtime/src/runtime/vm/gc/gc_ref.rs
index e1190466ec..ac280adca4 100644
--- a/crates/wasmtime/src/runtime/vm/gc/gc_ref.rs
+++ b/crates/wasmtime/src/runtime/vm/gc/gc_ref.rs
@@ -230,6 +230,7 @@ impl VMGcRef {
/// Get this GC reference as a u32 index into its GC heap.
///
/// Panics when called for `i31ref`s.
+ #[inline]
pub fn heap_index(&self) -> Result<NonZeroU32> {
if self.is_i31() {
bail_bug!("attempted to get heap index of i31")