alexcrichton opened issue #13862:
Spawned from this comment, this is something we may want to push more on in the future. In an initial attempt to do this I was stymied pretty quickly:
gc_host_alloc_typeswould be difficult to move because this field is currently accessed before aGcStoreis allocated. Callers would have to switch toensure_gc_storeandasyncto make this work.pending_exceptionis difficult because right now barriers require the entireGcStore, so the preexisting barrier functions can't be used if this field is stored witin theGcStoreitself.gc_rootsis difficult because during timming liveness flags forOwnedRootedthat takes a simultaneous borrow onGcStoreand theRootSet. If these lived in the same object it's more difficult to handle them in tandem.However
gc_roots_listandsubtype_check_cacheare likely easy to move. Given the difficulty in moving the prior ones though I didn't want to do a halfway migration so I'm going to leave this for a future refactoring.
alexcrichton added the wasm-proposal:gc label to Issue #13862.
Last updated: Jul 29 2026 at 05:03 UTC