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:
@@ -27,7 +27,7 @@ use wasmtime_environ::wasm::{
|
||||
DataIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, ElemIndex, EntityIndex,
|
||||
FuncIndex, GlobalIndex, MemoryIndex, TableElementType, TableIndex, WasmType,
|
||||
};
|
||||
use wasmtime_environ::{ir, Module, VMOffsets};
|
||||
use wasmtime_environ::{ir, HostPtr, Module, VMOffsets};
|
||||
|
||||
mod allocator;
|
||||
|
||||
@@ -119,7 +119,7 @@ pub(crate) struct Instance {
|
||||
module: Arc<Module>,
|
||||
|
||||
/// Offsets in the `vmctx` region, precomputed from the `module` above.
|
||||
offsets: VMOffsets,
|
||||
offsets: VMOffsets<HostPtr>,
|
||||
|
||||
/// WebAssembly linear memory data.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user