Skip to content

Commit 2b40974

Browse files
committed
make InstructionPtr defs compile again
1 parent 87ce041 commit 2b40974

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

crates/wasmi/src/engine/executor/instr_ptr.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::ir::Op;
44
#[derive(Debug, Copy, Clone)]
55
pub struct InstructionPtr {
66
/// The pointer to the instruction.
7-
ptr: *const Op,
7+
ptr: *const u8,
88
}
99

1010
/// It is safe to send an [`InstructionPtr`] to another thread.
@@ -20,7 +20,7 @@ unsafe impl Send for InstructionPtr {}
2020
impl InstructionPtr {
2121
/// Creates a new [`InstructionPtr`] for `instr`.
2222
#[inline]
23-
pub fn new(ptr: *const Op) -> Self {
23+
pub fn new(ptr: *const u8) -> Self {
2424
Self { ptr }
2525
}
2626

@@ -56,9 +56,10 @@ impl InstructionPtr {
5656
/// the boundaries of its associated compiled Wasm function.
5757
#[inline(always)]
5858
pub fn get(&self) -> &Op {
59-
// SAFETY: Within Wasm bytecode execution we are guaranteed by
60-
// Wasm validation and Wasmi codegen to never run out
61-
// of valid bounds using this method.
62-
unsafe { &*self.ptr }
59+
// // SAFETY: Within Wasm bytecode execution we are guaranteed by
60+
// // Wasm validation and Wasmi codegen to never run out
61+
// // of valid bounds using this method.
62+
// unsafe { &*self.ptr }
63+
todo!()
6364
}
6465
}

0 commit comments

Comments
 (0)