Skip to content

Commit 9fa6dfa

Browse files
committed
fix: update for wasmparser 0.245.1 API changes
- ComponentDefinedType::FixedSizeList renamed to FixedLengthList - VariantCase::refines field was removed from wasmparser Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent da0b89d commit 9fa6dfa

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

src/hyperlight_component_util/src/elaborate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ impl<'p, 'a> Ctx<'p, 'a> {
402402
Ok(VariantCase {
403403
name: Name { name: vc.name },
404404
ty: vc.ty.as_ref().map(|ty| self.elab_value(ty)).transpose()?,
405-
refines: vc.refines,
406405
})
407406
})
408407
.collect::<Result<Vec<_>, Error<'a>>>()?;
@@ -433,7 +432,7 @@ impl<'p, 'a> Ctx<'p, 'a> {
433432
Defined::Handleable(h) => Ok(Value::Borrow(h.clone())),
434433
_ => Err(Error::HandleToNonResource),
435434
},
436-
ComponentDefinedType::FixedSizeList(vt, size) => {
435+
ComponentDefinedType::FixedLengthList(vt, size) => {
437436
Ok(Value::FixList(Box::new(self.elab_value(vt)?), *size))
438437
}
439438
ComponentDefinedType::Future(_) | ComponentDefinedType::Stream(_) => {

src/hyperlight_component_util/src/etypes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ pub struct RecordField<'a> {
7070
pub struct VariantCase<'a> {
7171
pub name: Name<'a>,
7272
pub ty: Option<Value<'a>>,
73-
pub refines: Option<u32>,
7473
}
7574

7675
/// valtype_e in the specification

src/hyperlight_component_util/src/substitute.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ where
7777
Ok(VariantCase {
7878
name: vc.name,
7979
ty: self.value_option(&vc.ty)?,
80-
refines: vc.refines,
8180
})
8281
})
8382
.collect()

src/hyperlight_component_util/src/wf.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,6 @@ pub enum Error<'a> {
117117
DuplicateRecordField(Name<'a>),
118118
/// A variant has multiple cases with the same name
119119
DuplicateVariantField(Name<'a>),
120-
/// A variant case is marked as refining another case, but that
121-
/// case does not exist
122-
NonexistentVariantRefinement(u32),
123-
/// A variant case is marked as refining another case, but its
124-
/// associated value is not a subtype of the value of the refined
125-
/// case
126-
IncompatibleVariantRefinement(subtype::Error<'a>),
127120
/// A flags has multiple flags with the same name
128121
DuplicateFlagsName(Name<'a>),
129122
/// An enum has multiple cases with the same name
@@ -181,15 +174,6 @@ impl<'p, 'a> Ctx<'p, 'a> {
181174
|&vc| vc.name.name,
182175
|vc| Error::DuplicateVariantField(vc.name),
183176
)?;
184-
for vc in vcs {
185-
if let Some(ri) = vc.refines {
186-
let rvc = vcs
187-
.get(ri as usize)
188-
.ok_or(Error::NonexistentVariantRefinement(ri))?;
189-
self.subtype_value_option(&vc.ty, &rvc.ty)
190-
.map_err(Error::IncompatibleVariantRefinement)?;
191-
}
192-
}
193177
Ok(())
194178
}
195179
fn wf_value<'r>(&'r self, p: ValueTypePosition, vt: &'r Value<'a>) -> Result<(), Error<'a>> {

0 commit comments

Comments
 (0)