Get the function at the actual index in the store
(&self, addr: FuncAddr)
| 139 | impl State { |
| 140 | /// Get the function at the actual index in the store |
| 141 | pub(crate) fn get_func(&self, addr: FuncAddr) -> &FunctionInstance { |
| 142 | match self.funcs.get(addr as usize) { |
| 143 | Some(func) => func, |
| 144 | None => { |
| 145 | cold_path(); |
| 146 | unreachable!("function {addr} not found. This should be unreachable") |
| 147 | } |
| 148 | } |
| 149 | } |
| 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 { |
no test coverage detected