From d92598eb4cd4be8b23f5abe5d0d859e26babb5e6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 8 Jan 2025 10:59:42 -0800 Subject: [PATCH] Fix renamings in wave --- crates/wasmtime/src/runtime/wave/component.rs | 20 +++++++++---------- crates/wasmtime/src/runtime/wave/core.rs | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/crates/wasmtime/src/runtime/wave/component.rs b/crates/wasmtime/src/runtime/wave/component.rs index b770b6bf4109..238512012f1c 100644 --- a/crates/wasmtime/src/runtime/wave/component.rs +++ b/crates/wasmtime/src/runtime/wave/component.rs @@ -28,8 +28,8 @@ impl WasmType for component::Type { Self::U32 => WasmTypeKind::U32, Self::S64 => WasmTypeKind::S64, Self::U64 => WasmTypeKind::U64, - Self::Float32 => WasmTypeKind::Float32, - Self::Float64 => WasmTypeKind::Float64, + Self::Float32 => WasmTypeKind::F32, + Self::Float64 => WasmTypeKind::F64, Self::Char => WasmTypeKind::Char, Self::String => WasmTypeKind::String, Self::List(_) => WasmTypeKind::List, @@ -122,8 +122,8 @@ impl WasmValue for component::Val { Self::U32(_) => WasmTypeKind::U32, Self::S64(_) => WasmTypeKind::S64, Self::U64(_) => WasmTypeKind::U64, - Self::Float32(_) => WasmTypeKind::Float32, - Self::Float64(_) => WasmTypeKind::Float64, + Self::Float32(_) => WasmTypeKind::F32, + Self::Float64(_) => WasmTypeKind::F64, Self::Char(_) => WasmTypeKind::Char, Self::String(_) => WasmTypeKind::String, Self::List(_) => WasmTypeKind::List, @@ -152,11 +152,11 @@ impl WasmValue for component::Val { (Char, char, make_char, unwrap_char) ); - fn make_float32(val: f32) -> Self { + fn make_f32(val: f32) -> Self { let val = canonicalize_nan32(val); Self::Float32(val) } - fn make_float64(val: f64) -> Self { + fn make_f64(val: f64) -> Self { let val = canonicalize_nan64(val); Self::Float64(val) } @@ -238,12 +238,12 @@ impl WasmValue for component::Val { Ok(val) } - fn unwrap_float32(&self) -> f32 { - let val = *unwrap_val!(self, Self::Float32, "float32"); + fn unwrap_f32(&self) -> f32 { + let val = *unwrap_val!(self, Self::Float32, "f32"); canonicalize_nan32(val) } - fn unwrap_float64(&self) -> f64 { - let val = *unwrap_val!(self, Self::Float64, "float64"); + fn unwrap_f64(&self) -> f64 { + let val = *unwrap_val!(self, Self::Float64, "f64"); canonicalize_nan64(val) } fn unwrap_string(&self) -> Cow { diff --git a/crates/wasmtime/src/runtime/wave/core.rs b/crates/wasmtime/src/runtime/wave/core.rs index 38f55bc741ce..15bd3c23dab5 100644 --- a/crates/wasmtime/src/runtime/wave/core.rs +++ b/crates/wasmtime/src/runtime/wave/core.rs @@ -9,8 +9,8 @@ impl WasmType for crate::ValType { match self { Self::I32 => WasmTypeKind::S32, Self::I64 => WasmTypeKind::S64, - Self::F32 => WasmTypeKind::Float32, - Self::F64 => WasmTypeKind::Float64, + Self::F32 => WasmTypeKind::F32, + Self::F64 => WasmTypeKind::F64, Self::V128 => WasmTypeKind::Tuple, Self::Ref(_) => WasmTypeKind::Unsupported, @@ -33,8 +33,8 @@ impl WasmValue for crate::Val { match self { Self::I32(_) => WasmTypeKind::S32, Self::I64(_) => WasmTypeKind::S64, - Self::F32(_) => WasmTypeKind::Float32, - Self::F64(_) => WasmTypeKind::Float64, + Self::F32(_) => WasmTypeKind::F32, + Self::F64(_) => WasmTypeKind::F64, Self::V128(_) => WasmTypeKind::Tuple, Self::FuncRef(_) => WasmTypeKind::Unsupported, Self::ExternRef(_) => WasmTypeKind::Unsupported, @@ -48,11 +48,11 @@ impl WasmValue for crate::Val { fn make_s64(val: i64) -> Self { Self::I64(val) } - fn make_float32(val: f32) -> Self { + fn make_f32(val: f32) -> Self { let val = canonicalize_nan32(val); Self::F32(val.to_bits()) } - fn make_float64(val: f64) -> Self { + fn make_f64(val: f64) -> Self { let val = canonicalize_nan64(val); Self::F64(val.to_bits()) } @@ -88,13 +88,13 @@ impl WasmValue for crate::Val { *unwrap_val!(self, Self::I64, "s64") } - fn unwrap_float32(&self) -> f32 { - let val = f32::from_bits(*unwrap_val!(self, Self::F32, "float32")); + fn unwrap_f32(&self) -> f32 { + let val = f32::from_bits(*unwrap_val!(self, Self::F32, "f32")); canonicalize_nan32(val) } - fn unwrap_float64(&self) -> f64 { - let val = f64::from_bits(*unwrap_val!(self, Self::F64, "float64")); + fn unwrap_f64(&self) -> f64 { + let val = f64::from_bits(*unwrap_val!(self, Self::F64, "f64")); canonicalize_nan64(val) }