diff options
| author | Mica White <botahamec@outlook.com> | 2026-10-31 11:26:16 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-10-31 11:26:16 -0400 |
| commit | ce42e619e1c64eaefeb382a4ef439a2bbc9ebc65 (patch) | |
| tree | abce186cdf899d17c86fde76e27d232f32038e91 /crates/parser/src | |
| parent | 9e4ac695d9a0888a7a987c86c1c1ebaa663b8939 (diff) | |
Fix match
Diffstat (limited to 'crates/parser/src')
| -rw-r--r-- | crates/parser/src/conversion.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 36455ee..255dffe 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -1,7 +1,7 @@ use crate::validation::{FuncValidator, FuncValidatorAllocations, ValidatorResources}; #[cfg(feature = "validate")] use crate::visit::process_operators_and_validate; -use crate::{ParserOptions, Result, module::FunctionCode, visit::process_operators}; +use crate::{module::FunctionCode, visit::process_operators, ParserOptions, Result}; use alloc::{boxed::Box, format, vec::Vec}; use tinywasm_types::*; use wasmparser::{CompositeInnerType, OperatorsReader, OperatorsReaderAllocations, UnpackedIndex}; @@ -369,8 +369,8 @@ pub(crate) fn process_const_operators( wasmparser::Operator::F64Const { value } => ConstInstruction::F64Const(f64::from_bits(value.bits())), wasmparser::Operator::V128Const { value } => ConstInstruction::V128Const(*value.bytes()), wasmparser::Operator::GlobalGet { global_index } => match global_types.get(global_index as usize) { - Some(WasmType::I32 | WasmType::F32) => ConstInstruction::GlobalGet32(global_index), - Some(WasmType::I64 | WasmType::F64) => ConstInstruction::GlobalGet64(global_index), + Some(WasmType::U32 | WasmType::I32 | WasmType::F32) => ConstInstruction::GlobalGet32(global_index), + Some(WasmType::U64 | WasmType::I64 | WasmType::F64) => ConstInstruction::GlobalGet64(global_index), Some(WasmType::V128) => ConstInstruction::GlobalGet128(global_index), Some(WasmType::Ref(_)) => ConstInstruction::GlobalGetRef(global_index), None => return Err(crate::ParseError::Other(format!("global index out of bounds: {global_index}"))), |
