3 ms·
I solved it in case of an interpreter with outer: loop { loop { let res = self.interpreter_loop(…); match res { Continue => {}
by kaba0 4y ago
I solved it in case of an interpreter with
outer: loop {
loop {
let res = self.interpreter_loop(…);
match res {
Continue => {}
Return => { break 'outer; }
Exception => { break; }
}
}
I also made sure that the interpreter_loop call had an inline pragma, but that was otherwise a naive switch-case for the instructions. I didn’t find a way to make a template interpreter with safe Rust.