Let the runtime provide the number of imported functions.
This obviates the need to keep a separate running total of the number of functions seen.
This commit is contained in:
@@ -146,6 +146,10 @@ impl WasmRuntime for DummyRuntime {
|
||||
self.imported_funcs.push(ir::FunctionName::new(name));
|
||||
}
|
||||
|
||||
fn get_num_func_imports(&self) -> usize {
|
||||
self.imported_funcs.len()
|
||||
}
|
||||
|
||||
fn declare_func_type(&mut self, sig_index: SignatureIndex) {
|
||||
self.func_types.push(sig_index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user