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

Method exec_load_local_value

crates/tinywasm/src/interpreter/executor.rs:1189–1198  ·  view source on GitHub ↗
(
        &self,
        memarg: MemoryArg,
        addr_local: u8,
    )

Source from the content-addressed store, hash-verified

1187 }
1188
1189 fn exec_load_local_value<T: MemValue<N>, const N: usize>(
1190 &self,
1191 memarg: MemoryArg,
1192 addr_local: u8,
1193 ) -> Result<T, Trap> {
1194 let mem = self.store.state.get_mem(self.module.resolve_mem_addr(memarg.mem_addr()));
1195 let addr = u64::from(u32::local_get(&self.store.value_stack, &self.cf, u16::from(addr_local)));
1196 let bytes = mem.load(addr, memarg.offset())?;
1197 Ok(T::from_mem_bytes(bytes))
1198 }
1199
1200 fn exec_load_local_tee<T: InternalValue + MemValue<N>, const N: usize>(
1201 &mut self,

Callers

nothing calls this directly

Calls 5

get_memMethod · 0.80
resolve_mem_addrMethod · 0.80
mem_addrMethod · 0.80
loadMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected