Update dependencies.

This commit is contained in:
Dan Gohman
2019-10-02 11:00:28 -07:00
parent 8d52e389f8
commit 8c524815c3
2 changed files with 11 additions and 7 deletions

View File

@@ -13,10 +13,10 @@ edition = "2018"
smallvec = "0.6"
dynasm = "0.3"
dynasmrt = "0.3"
wasmparser = "0.32"
memoffset = "0.2"
wasmparser = "0.39.1"
memoffset = "0.5.1"
itertools = "0.8"
capstone = "0.5.0"
capstone = "0.6.0"
failure = "0.1.3"
failure_derive = "0.1.3"
cranelift-codegen = "0.44"
@@ -24,9 +24,11 @@ multi_mut = "0.1"
either = "1.5"
wabt = "0.9.2"
lazy_static = "1.2"
quickcheck = "0.7"
typemap = "0.3"
[dev-dependencies]
quickcheck = "0.9.0"
[badges]
maintenance = { status = "experimental" }

View File

@@ -217,19 +217,21 @@ impl<T> Drop for BoxSlice<T> {
}
}
type BoxByteSlice = BoxSlice<u8>;
pub struct VmCtx {
mem: BoxSlice<u8>,
mem: BoxByteSlice,
}
impl VmCtx {
pub fn offset_of_memory_ptr() -> u32 {
offset_of!(VmCtx, mem.ptr)
(offset_of!(VmCtx, mem) + offset_of!(BoxByteSlice, ptr))
.try_into()
.expect("Offset exceeded size of u32")
}
pub fn offset_of_memory_len() -> u32 {
offset_of!(VmCtx, mem.len)
(offset_of!(VmCtx, mem) + offset_of!(BoxByteSlice, len))
.try_into()
.expect("Offset exceeded size of u32")
}