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

Method resolve_global_addr

crates/tinywasm/src/instance.rs:158–166  ·  view source on GitHub ↗
(&self, addr: GlobalAddr)

Source from the content-addressed store, hash-verified

156 /// resolve a global address to the global store address
157 #[inline]
158 pub(crate) fn resolve_global_addr(&self, addr: GlobalAddr) -> GlobalAddr {
159 match self.0.global_addrs.get(addr as usize) {
160 Some(addr) => *addr,
161 None => {
162 cold_path();
163 unreachable!("invalid global address: {addr}")
164 }
165 }
166 }
167
168 #[inline]
169 pub(crate) fn validate_store(&self, store: &Store) -> Result<()> {

Callers 4

exportsMethod · 0.80
exec_global_getMethod · 0.80
exec_global_setMethod · 0.80
exec_global_set_32Method · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected