Update dependencies.
This commit is contained in:
@@ -13,10 +13,10 @@ edition = "2018"
|
|||||||
smallvec = "0.6"
|
smallvec = "0.6"
|
||||||
dynasm = "0.3"
|
dynasm = "0.3"
|
||||||
dynasmrt = "0.3"
|
dynasmrt = "0.3"
|
||||||
wasmparser = "0.32"
|
wasmparser = "0.39.1"
|
||||||
memoffset = "0.2"
|
memoffset = "0.5.1"
|
||||||
itertools = "0.8"
|
itertools = "0.8"
|
||||||
capstone = "0.5.0"
|
capstone = "0.6.0"
|
||||||
failure = "0.1.3"
|
failure = "0.1.3"
|
||||||
failure_derive = "0.1.3"
|
failure_derive = "0.1.3"
|
||||||
cranelift-codegen = "0.44"
|
cranelift-codegen = "0.44"
|
||||||
@@ -24,9 +24,11 @@ multi_mut = "0.1"
|
|||||||
either = "1.5"
|
either = "1.5"
|
||||||
wabt = "0.9.2"
|
wabt = "0.9.2"
|
||||||
lazy_static = "1.2"
|
lazy_static = "1.2"
|
||||||
quickcheck = "0.7"
|
|
||||||
typemap = "0.3"
|
typemap = "0.3"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
quickcheck = "0.9.0"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
maintenance = { status = "experimental" }
|
maintenance = { status = "experimental" }
|
||||||
|
|
||||||
|
|||||||
@@ -217,19 +217,21 @@ impl<T> Drop for BoxSlice<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type BoxByteSlice = BoxSlice<u8>;
|
||||||
|
|
||||||
pub struct VmCtx {
|
pub struct VmCtx {
|
||||||
mem: BoxSlice<u8>,
|
mem: BoxByteSlice,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl VmCtx {
|
impl VmCtx {
|
||||||
pub fn offset_of_memory_ptr() -> u32 {
|
pub fn offset_of_memory_ptr() -> u32 {
|
||||||
offset_of!(VmCtx, mem.ptr)
|
(offset_of!(VmCtx, mem) + offset_of!(BoxByteSlice, ptr))
|
||||||
.try_into()
|
.try_into()
|
||||||
.expect("Offset exceeded size of u32")
|
.expect("Offset exceeded size of u32")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn offset_of_memory_len() -> u32 {
|
pub fn offset_of_memory_len() -> u32 {
|
||||||
offset_of!(VmCtx, mem.len)
|
(offset_of!(VmCtx, mem) + offset_of!(BoxByteSlice, len))
|
||||||
.try_into()
|
.try_into()
|
||||||
.expect("Offset exceeded size of u32")
|
.expect("Offset exceeded size of u32")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user