(&mut self, global_index: u32)
| 1231 | } |
| 1232 | |
| 1233 | fn exec_global_set_32(&mut self, global_index: u32) { |
| 1234 | let global_addr = self.module.resolve_global_addr(global_index); |
| 1235 | let raw = <Value32>::stack_pop(&mut self.store.value_stack); |
| 1236 | let value = match self.store.state.get_global(global_addr).ty.ty { |
| 1237 | WasmType::I32 | WasmType::F32 => TinyWasmValue::Value32(raw), |
| 1238 | WasmType::RefExtern | WasmType::RefFunc => TinyWasmValue::ValueRef(ValueRef::from_raw(raw)), |
| 1239 | WasmType::I64 | WasmType::F64 | WasmType::V128 => unreachable!("invalid global.set.32 target type"), |
| 1240 | }; |
| 1241 | self.store.state.set_global_val(global_addr, value); |
| 1242 | } |
| 1243 | |
| 1244 | fn exec_const<T: InternalValue>(&mut self, val: T) -> Result<(), Trap> { |
| 1245 | self.store.value_stack.push(val) |
no test coverage detected