bytecodealliance / bytecodealliance/wasmtime
Investigate storing trap codes in instructions rather than a side table
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
https://github.com/bytecodealliance/wasmtime/issues/3340, specifically this:
> Note that UDF has an immediate parameter, which could be used to address the second point to an extent, e.g. UDF #0xBAD could signify Cranelift-generated code.
got me wondering if we can store the `.wasmtime.traps` section directly in the text section instead of in a separate section of the executable. As a separate section this is somewhat hefty and would probably be much smaller if we simply stored the trap code in the instruction itself (like `#0xBAD` above).
I'm not sure if this is possible on all platforms though or whether it's even going to net us all that many savings. Not having to manage a side table of traps though would indeed simplify a number of pieces related to trap handling in Wasmtime.
Contributor guide
Assessment
This issue has not been assessed yet.