Get a wasm function at the actual index in the store, panicking if it's a host function (which should be guaranteed by the validator)
(&self, addr: FuncAddr)
| 150 | |
| 151 | /// Get a wasm function at the actual index in the store, panicking if it's a host function (which should be guaranteed by the validator) |
| 152 | pub(crate) fn get_wasm_func(&self, addr: FuncAddr) -> &WasmFunctionInstance { |
| 153 | match self.funcs.get(addr as usize) { |
| 154 | Some(FunctionInstance::Wasm(wasm_func)) => wasm_func, |
| 155 | _ => { |
| 156 | cold_path(); |
| 157 | unreachable!("function {addr} not found. This should be unreachable") |
| 158 | } |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /// Get the memory at the actual index in the store |
| 163 | pub(crate) fn get_mem(&self, addr: MemAddr) -> &MemoryInstance { |
no test coverage detected