MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / exec_table_get

Method exec_table_get

crates/tinywasm/src/interpreter/executor.rs:1475–1480  ·  view source on GitHub ↗
(&mut self, table_index: u32)

Source from the content-addressed store, hash-verified

1473 }
1474
1475 fn exec_table_get(&mut self, table_index: u32) -> Result<(), Trap> {
1476 let idx: i32 = <i32>::stack_pop(&mut self.store.value_stack);
1477 let table = self.store.state.get_table(self.module.resolve_table_addr(table_index));
1478 let v = table.get_wasm_val(idx as u32)?;
1479 self.store.value_stack.push_dyn(v.into())
1480 }
1481
1482 fn exec_table_set(&mut self, table_index: u32) -> Result<(), Trap> {
1483 let val = <ValueRef>::stack_pop(&mut self.store.value_stack);

Callers 1

execMethod · 0.80

Calls 4

get_tableMethod · 0.80
resolve_table_addrMethod · 0.80
get_wasm_valMethod · 0.80
push_dynMethod · 0.80

Tested by

no test coverage detected