cranelift: Implement br_table on the interpreter

This commit is contained in:
Afonso Bordado
2021-07-20 14:04:05 +01:00
committed by Andrew Brown
parent ebbe399725
commit 065190f975
4 changed files with 181 additions and 4 deletions

View File

@@ -217,6 +217,10 @@ impl<'a> State<'a, DataValue> for InterpreterState<'a> {
self.functions
.get_from_func_ref(func_ref, self.frame_stack.last().unwrap().function)
}
fn get_current_function(&self) -> &'a Function {
self.current_frame().function
}
fn push_frame(&mut self, function: &'a Function) {
self.frame_stack.push(Frame::new(function));
}