MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / resolve_func_ref

Method resolve_func_ref

crates/tinywasm/src/store/table.rs:129–137  ·  view source on GitHub ↗
(&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;

Callers 1

fillMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected