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

Method get_global_mut

crates/tinywasm/src/store/mod.rs:266–274  ·  view source on GitHub ↗

Get the global at the actual index in the store

(&mut self, addr: GlobalAddr)

Source from the content-addressed store, hash-verified

264
265 /// Get the global at the actual index in the store
266 pub(crate) fn get_global_mut(&mut self, addr: GlobalAddr) -> &mut GlobalInstance {
267 match self.globals.get_mut(addr as usize) {
268 Some(global) => global,
269 None => {
270 cold_path();
271 unreachable!("global {addr} not found. This should be unreachable")
272 }
273 }
274 }
275
276 /// Get the global at the actual index in the store
277 pub(crate) fn get_global_val(&self, addr: GlobalAddr) -> TinyWasmValue {

Callers 1

instance_mutMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected