Skip to content

[Wasm RyuJIT] Precise GC #121854

@kg

Description

@kg

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-wasmWebAssembly architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions