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

Method get_mem_mut

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

Get the memory at the actual index in the store

(&mut self, addr: MemAddr)

Source from the content-addressed store, hash-verified

172
173 /// Get the memory at the actual index in the store
174 pub(crate) fn get_mem_mut(&mut self, addr: MemAddr) -> &mut MemoryInstance {
175 match self.memories.get_mut(addr as usize) {
176 Some(mem) => mem,
177 None => {
178 cold_path();
179 unreachable!("memory {addr} not found. This should be unreachable")
180 }
181 }
182 }
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) {

Callers 8

instance_mutMethod · 0.80
exec_fma_storeMethod · 0.80
exec_memory_growMethod · 0.80
exec_memory_copyMethod · 0.80
exec_memory_fill_implMethod · 0.80
exec_mem_store_laneMethod · 0.80
exec_mem_storeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected