MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / get_mems_mut

Method get_mems_mut

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

Get the memory at the actual index in the store

(&mut self, addr: MemAddr, addr2: MemAddr)

Source from the content-addressed store, hash-verified

183
184 /// Get the memory at the actual index in the store
185 pub(crate) fn get_mems_mut(&mut self, addr: MemAddr, addr2: MemAddr) -> (&mut MemoryInstance, &mut MemoryInstance) {
186 match self.memories.get_disjoint_mut([addr as usize, addr2 as usize]) {
187 Ok([mem_a, mem_b]) => (mem_a, mem_b),
188 Err(_) => {
189 cold_path();
190 unreachable!("memory {addr} or {addr2} not found. This should be unreachable")
191 }
192 }
193 }
194
195 /// Get the table at the actual index in the store
196 pub(crate) fn get_table(&self, addr: TableAddr) -> &TableInstance {

Callers 1

exec_memory_copyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected