fitzgen opened issue #8940:
Performing a GC requires
&mutthough, right? So given&StoreOpaquethat's static proof that a GC won't happen?Musing though: because
unchecked_try_gc_refreturns a lifetime bound to&StoreOpaquedoesn't that mean that GC is already statically disallowed while we're working with thegc_ref? If that's the case could theunchecked_prefix be removed? (fine to defer this to a future PR of course)_Originally posted by @alexcrichton in https://github.com/bytecodealliance/wasmtime/pull/8933#discussion_r1674184310_
Note: we can't just remove the
unchecked_prefix, since there are versions of this method already named those things, but they take aAutoAssertNoGcinstead of a `&StoreOpaque. So it isn't clear what naming conventions we want to have here. Or we could make a trait that represents stores/contexts where we can rest assured that GC won't happen while that store/context type exists.Feel free to bikeshed.
alexcrichton closed issue #8940:
Performing a GC requires
&mutthough, right? So given&StoreOpaquethat's static proof that a GC won't happen?Musing though: because
unchecked_try_gc_refreturns a lifetime bound to&StoreOpaquedoesn't that mean that GC is already statically disallowed while we're working with thegc_ref? If that's the case could theunchecked_prefix be removed? (fine to defer this to a future PR of course)_Originally posted by @alexcrichton in https://github.com/bytecodealliance/wasmtime/pull/8933#discussion_r1674184310_
Note: we can't just remove the
unchecked_prefix, since there are versions of this method already named those things, but they take aAutoAssertNoGcinstead of a `&StoreOpaque. So it isn't clear what naming conventions we want to have here. Or we could make a trait that represents stores/contexts where we can rest assured that GC won't happen while that store/context type exists.Feel free to bikeshed.
Last updated: Dec 13 2025 at 21:03 UTC