summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wasm-smith/src/component.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/wasm-smith/src/component.rs')
-rw-r--r--third_party/rust/wasm-smith/src/component.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/third_party/rust/wasm-smith/src/component.rs b/third_party/rust/wasm-smith/src/component.rs
index 7a85b2bf10..35bf93231b 100644
--- a/third_party/rust/wasm-smith/src/component.rs
+++ b/third_party/rust/wasm-smith/src/component.rs
@@ -952,6 +952,7 @@ impl ComponentBuilder {
Ok(crate::core::GlobalType {
val_type: self.arbitrary_core_valtype(u)?,
mutable: u.arbitrary()?,
+ shared: false,
})
}
@@ -1308,8 +1309,8 @@ impl ComponentBuilder {
6 => Ok(PrimitiveValType::U32),
7 => Ok(PrimitiveValType::S64),
8 => Ok(PrimitiveValType::U64),
- 9 => Ok(PrimitiveValType::Float32),
- 10 => Ok(PrimitiveValType::Float64),
+ 9 => Ok(PrimitiveValType::F32),
+ 10 => Ok(PrimitiveValType::F64),
11 => Ok(PrimitiveValType::Char),
12 => Ok(PrimitiveValType::String),
_ => unreachable!(),
@@ -1773,8 +1774,8 @@ fn canonical_abi_for(func_ty: &FuncType) -> Rc<crate::core::FuncType> {
| PrimitiveValType::S32
| PrimitiveValType::U32 => ValType::I32,
PrimitiveValType::S64 | PrimitiveValType::U64 => ValType::I64,
- PrimitiveValType::Float32 => ValType::F32,
- PrimitiveValType::Float64 => ValType::F64,
+ PrimitiveValType::F32 => ValType::F32,
+ PrimitiveValType::F64 => ValType::F64,
PrimitiveValType::String => {
unimplemented!("non-scalar types are not supported yet")
}
@@ -1819,8 +1820,8 @@ fn inverse_scalar_canonical_abi_for(
ComponentValType::Primitive(PrimitiveValType::U64),
])
.cloned(),
- ValType::F32 => Ok(ComponentValType::Primitive(PrimitiveValType::Float32)),
- ValType::F64 => Ok(ComponentValType::Primitive(PrimitiveValType::Float64)),
+ ValType::F32 => Ok(ComponentValType::Primitive(PrimitiveValType::F32)),
+ ValType::F64 => Ok(ComponentValType::Primitive(PrimitiveValType::F64)),
ValType::V128 | ValType::Ref(_) => {
unreachable!("not used in canonical ABI")
}
@@ -2055,8 +2056,8 @@ fn is_scalar(ty: &ComponentValType) -> bool {
| PrimitiveValType::U32
| PrimitiveValType::S64
| PrimitiveValType::U64
- | PrimitiveValType::Float32
- | PrimitiveValType::Float64
+ | PrimitiveValType::F32
+ | PrimitiveValType::F64
| PrimitiveValType::Char => true,
PrimitiveValType::String => false,
},