Method
resolve_func_ref
(&self, func_addrs: &[u32], addr: Addr)
Source from the content-addressed store, hash-verified
| 127 | } |
| 128 | |
| 129 | fn resolve_func_ref(&self, func_addrs: &[u32], addr: Addr) -> Addr { |
| 130 | if self.kind.element_type != WasmType::RefFunc { |
| 131 | return addr; |
| 132 | } |
| 133 | |
| 134 | *func_addrs |
| 135 | .get(addr as usize) |
| 136 | .expect("error initializing table: function not found. This should have been caught by the validator") |
| 137 | } |
| 138 | |
| 139 | pub(crate) fn init(&mut self, offset: i64, init: &[TableElement]) -> Result<(), Trap> { |
| 140 | let offset = offset as usize; |
Tested by
no test coverage detected