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

@@ -19,6 +19,8 @@ use thiserror::Error;
pub trait State<'a, V> {
/// Retrieve a reference to a [Function].
fn get_function(&self, func_ref: FuncRef) -> Option<&'a Function>;
/// Retrieve a reference to the currently executing [Function].
fn get_current_function(&self) -> &'a Function;
/// Record that an interpreter has called into a new [Function].
fn push_frame(&mut self, function: &'a Function);
/// Record that an interpreter has returned from a called [Function].
@@ -92,6 +94,10 @@ where
None
}
fn get_current_function(&self) -> &'a Function {
unimplemented!()
}
fn push_frame(&mut self, _function: &'a Function) {
unimplemented!()
}