Get the memory at the actual index in the store
(&mut self, addr: MemAddr, addr2: MemAddr)
| 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 { |