Skip to content

Commit ffd630c

Browse files
authored
wasmparser/validator & wasmprinter operators.rs: update comments (#1642)
1 parent bee5a7c commit ffd630c

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

crates/wasmparser/src/validator/operators.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ where
966966
Ok(())
967967
}
968968

969-
/// Checks the validity of a common conversion operator.
969+
/// Checks the validity of a common float conversion operator.
970970
fn check_fconversion_op(&mut self, into: ValType, from: ValType) -> Result<()> {
971971
debug_assert!(matches!(into, ValType::F32 | ValType::F64));
972972
self.check_floats_enabled()?;
@@ -1044,14 +1044,14 @@ where
10441044
self.check_v128_binary_op()
10451045
}
10461046

1047-
/// Checks a [`V128`] binary operator.
1047+
/// Checks a [`V128`] unary operator.
10481048
fn check_v128_unary_op(&mut self) -> Result<()> {
10491049
self.pop_operand(Some(ValType::V128))?;
10501050
self.push_operand(ValType::V128)?;
10511051
Ok(())
10521052
}
10531053

1054-
/// Checks a [`V128`] binary operator.
1054+
/// Checks a [`V128`] unary float operator.
10551055
fn check_v128_funary_op(&mut self) -> Result<()> {
10561056
self.check_floats_enabled()?;
10571057
self.check_v128_unary_op()
@@ -1066,14 +1066,14 @@ where
10661066
Ok(())
10671067
}
10681068

1069-
/// Checks a [`V128`] relaxed ternary operator.
1069+
/// Checks a [`V128`] test operator.
10701070
fn check_v128_bitmask_op(&mut self) -> Result<()> {
10711071
self.pop_operand(Some(ValType::V128))?;
10721072
self.push_operand(ValType::I32)?;
10731073
Ok(())
10741074
}
10751075

1076-
/// Checks a [`V128`] relaxed ternary operator.
1076+
/// Checks a [`V128`] shift operator.
10771077
fn check_v128_shift_op(&mut self) -> Result<()> {
10781078
self.pop_operand(Some(ValType::I32))?;
10791079
self.pop_operand(Some(ValType::V128))?;

crates/wasmprinter/src/operator.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ macro_rules! define_visit {
405405
//
406406
// * Print the name of the insruction as defined in this macro
407407
// * Print any payload, as necessary
408-
// * Return the `OpKind`, as defined by this macro
409408
($(@$proposal:ident $op:ident $({ $($arg:ident: $argty:ty),* })? => $visit:ident )*) => ($(
410409
fn $visit(&mut self $( , $($arg: $argty),* )?) -> Self::Output {
411410
define_visit!(before_op self $op);

0 commit comments

Comments
 (0)