Add functions to the store, returning their addresses in the store
(
&mut self,
funcs: &[Arc<WasmFunction>],
idx: ModuleInstanceAddr,
)
| 328 | impl Store { |
| 329 | /// Add functions to the store, returning their addresses in the store |
| 330 | pub(crate) fn init_funcs( |
| 331 | &mut self, |
| 332 | funcs: &[Arc<WasmFunction>], |
| 333 | idx: ModuleInstanceAddr, |
| 334 | ) -> impl ExactSizeIterator<Item = FuncAddr> { |
| 335 | let start = self.state.funcs.len() as FuncAddr; |
| 336 | self.state.funcs.extend(funcs.iter().map(|func| FunctionInstance::new_wasm(func.clone(), idx))); |
| 337 | start..start + funcs.len() as FuncAddr |
| 338 | } |
| 339 | |
| 340 | /// Add tables to the store, returning their addresses in the store |
| 341 | pub(crate) fn init_tables(&mut self, tables: &[TableType]) -> impl ExactSizeIterator<Item = TableAddr> { |
no test coverage detected