Add a type parameter to VMOffsets for pointer size (#3020)

* Add a type parameter to `VMOffsets` for pointer size

This commit adds a type parameter to `VMOffsets` representing the
pointer size to improve computations in `wasmtime-runtime` which always
use a constant value of the host's pointer size. The type parameter is
`u8` for `wasmtime-cranelift`'s use case where cross-compilation may be
involved.

* fix lightbeam
This commit is contained in:
Alex Crichton
2021-07-13 09:52:27 -05:00
committed by GitHub
parent 75e5219792
commit 992d85ae8b
7 changed files with 111 additions and 78 deletions

View File

@@ -175,7 +175,7 @@ struct FuncEnvironment<'module_environment> {
module: &'module_environment Module,
/// Offsets to struct fields accessed by JIT code.
offsets: VMOffsets,
offsets: VMOffsets<u8>,
}
impl<'module_environment> FuncEnvironment<'module_environment> {