diff --git a/crates/interpreter/src/exec.rs b/crates/interpreter/src/exec.rs index 84238bc6..eaac31b3 100644 --- a/crates/interpreter/src/exec.rs +++ b/crates/interpreter/src/exec.rs @@ -21,6 +21,7 @@ use crate::module::*; use crate::side_table::SideTableEntry; use crate::syntax::*; use crate::toctou::*; +use crate::util::*; use crate::*; pub const MEMORY_ALIGN: usize = 16; @@ -759,20 +760,13 @@ impl<'m> Thread<'m> { fn step(mut self, store: &mut Store<'m>) -> Result, Error> { use Instr::*; - let saved = self.parser.save(); let inst_id = self.frame().inst_id; let inst = &mut store.insts[inst_id]; match self.parser.parse_instr().into_ok() { Unreachable => return Err(trap()), Nop => (), Block(b) => self.push_label(self.blocktype(inst, &b), LabelKind::Block), - Loop(b) => { - let side_table = self.frame().side_table; - self.push_label( - self.blocktype(inst, &b), - LabelKind::Loop(LoopState { parser_data: saved, side_table }), - ) - } + Loop(b) => self.push_label(self.blocktype(inst, &b), LabelKind::Loop), If(b) => match self.pop_value().unwrap_i32() { 0 => { self.take_jump(0); @@ -988,11 +982,11 @@ impl<'m> Thread<'m> { self.frames.last_mut().unwrap() } - fn labels(&mut self) -> &mut Vec> { + fn labels(&mut self) -> &mut Vec