regalloc2
regalloc2 copied to clipboard
refactor: use `&'static [PReg]` instead of `Vec<PReg>`
This PR makes MachineEnv use &'static [PReg] instead of Vec<PReg> to make it possible to place MachineEnv into statics as part of https://github.com/bytecodealliance/wasmtime/pull/8489.
Edit: as it turns out serialization makes this not quite as trivial, serde can't deserialize into slices (had forgotten that) so I introduced a new SerializableMachineEnv type in the spirit of SerializableFunction to let consumers still serialize a machine env if required.
related: #177.
Hmm seems libfuzz doesn't like Vec::leak?
Hmm seems libfuzz doesn't like
Vec::leak?
interestingly I locally can't replicate the CI fail