Get the global at the actual index in the store
(&self, addr: GlobalAddr)
| 275 | |
| 276 | /// Get the global at the actual index in the store |
| 277 | pub(crate) fn get_global_val(&self, addr: GlobalAddr) -> TinyWasmValue { |
| 278 | match self.globals.get(addr as usize) { |
| 279 | Some(global) => global.value.get(), |
| 280 | None => { |
| 281 | cold_path(); |
| 282 | unreachable!("global {addr} not found. This should be unreachable") |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | /// Set the global at the actual index in the store |
| 288 | pub(crate) fn set_global_val(&mut self, addr: GlobalAddr, value: TinyWasmValue) { |