-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
See also #121830, #121651, #121831
We eventually want to transition from conservative GC where anything ref-shaped on the stack is pinned, to a mode where GC info is generated during compilation so the GC knows which parts of the linear memory stack contain GC references. The GC info will need to line up with the imaginary instruction pointer that we use for exception handling to identify the active catches and filters.
We may want to also disable pinning, which would require us to un-spill any GC references that are stored in Wasm locals, so that if the GC moved those objects the locals' values will be correct and match linear memory. It's unclear at this point whether we want to do this; NAOT-LLVM doesn't. Unlike most other targets, the stack frequently empties on Wasm because browser apps are obligated to yield control to the event loop on a regular basis.
(incomplete - work in progress)