MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / init_tables

Method init_tables

crates/tinywasm/src/store/mod.rs:341–345  ·  view source on GitHub ↗

Add tables to the store, returning their addresses in the store

(&mut self, tables: &[TableType])

Source from the content-addressed store, hash-verified

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> {
342 let start = self.state.tables.len() as TableAddr;
343 self.state.tables.extend(tables.iter().map(|table| TableInstance::new(table.clone())));
344 start..start + tables.len() as TableAddr
345 }
346
347 /// Add memories to the store, returning their addresses in the store
348 pub(crate) fn init_memories(&mut self, memories: &[MemoryType]) -> Result<impl ExactSizeIterator<Item = MemAddr>> {

Callers 1

instantiate_no_startMethod · 0.80

Calls 2

mapMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected