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

Method get_mem

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

Get the memory at the actual index in the store

(&self, addr: MemAddr)

Source from the content-addressed store, hash-verified

161
162 /// Get the memory at the actual index in the store
163 pub(crate) fn get_mem(&self, addr: MemAddr) -> &MemoryInstance {
164 match self.memories.get(addr as usize) {
165 Some(mem) => mem,
166 None => {
167 cold_path();
168 unreachable!("memory {addr} not found. This should be unreachable")
169 }
170 }
171 }
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 {

Callers 7

instanceMethod · 0.80
linkMethod · 0.80
exec_load_local_valueMethod · 0.80
exec_memory_sizeMethod · 0.80
exec_memory_fill_implMethod · 0.80
exec_mem_load_laneMethod · 0.80
exec_mem_loadMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected