[RyuJit/WASM] Longer-term TODOs
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
A list of things that will need to be fixed before the work can be considered functional:
- [ ] 1) `genPoisonFrame` implementation.
- [ ] 2) Stack alignment in `lvaAlignFrame`.
- [x] 4) Fix untracked debug scopes in `siOpenScopesForNonTrackedVars`.
- https://github.com/dotnet/runtime/pull/122483
- [x] 5) Remove `#ifdef TARGET_WASM` from the JMC insertion path since once we have proper WASM CG2 collections and/or call emit support.
- https://github.com/dotnet/runtime/pull/122483
- [x] 6) Fix the single-IG restriction of the prolog so that we don't need to worry about methods with a large number of non-enregistered arguments overflowing it. Ref: #123270.
- [x] 7) Set maxUncheckedOffset and related entries to zero; fix issues where the jit is relying on null checks for small offsets (see discussion [here](https://github.com/dotnet/runtime/pull/123053#discussion_r2696160206) -- part of #123053
- [ ] 8) There are many places in the JIT where we assume that constants must either be type `I4` or type `I` and that's not the case for Wasm 32 bit. Figure out a way to systematically fix this.
- [ ] 9) Consider getting rid of `GT_CNS_LONG` so there is just one way to represent constant ints regardless of bitness.
- [ ] 10) Find all places that avoid creating bitcasts for `!TARGET_64BIT` and switch them to `!LOWER_DECOMPOSE_LONGS` instead.
- [ ] 11) Decide if we want to use a stack cookie to guard the shadow stack
- [x] 12) Special calling convention for write barriers: https://github.com/dotnet/runtime/pull/124846.
- [ ] Implicit tails calls (some discussion in #129134)
- [ ] 13) Don't spill quite so many call args (but do consider implications of SP being the first argument vis-a-vis `LCLHEAP` in the arguments), similar to x86 stack args: https://github.com/dotnet/runtime/pull/125187.
- [ ] Stack overflow checking modes (like emscripten has, perhaps)
- [ ] Look for missing GTF_IND_INVARIANT (leads to unneeded null checks, see #129429)
- [ ] Debug emission (use virtual IPs, how to refer to wasm locals, etc)
Part of https://github.com/dotnet/runtime/issues/121208.
Contributor guide
Assessment
This issue has not been assessed yet.