bytecodealliance/wasmtime
Eagerly cast pointers in aarch64 relocation code to `usize` to avoid `unsafe` blocks in cranelift-jit
已关闭
#7,588 创建于 2023年11月27日
good first issue
仓库指标
- 星标
- (17,002 个星标)
- PR 合并指标
- (平均合并 23小时 31分钟) (30 天内合并 212 个 PR)
描述
When performing relocations in cranelift-jit, there are many introductions of a variable what that's defined as an unsafe pointer offset. These variables are almost always cast to usize or isize before they're used, so perhaps we should instead turn the base pointer into its target numeric type eagerly, to avoid needing the unsafe blocks for calling the offset method on the pointers.