You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Helper macro for defining instructions without having to have tons of// exhaustive `match` statements to updatemacro_rules! def_instruction {(
$( #[$enum_attr:meta])*pubenumInstruction<'a> {
$(
$( #[$attr:meta])*
$variant:ident $({
$($field:ident : $field_ty:ty $(,)*)*})?
:[$num_popped:expr] => [$num_pushed:expr],)*}) => {$( #[$enum_attr])*pubenumInstruction<'a> {$($( #[$attr])*$variant$({
$($field:$field_ty,)*})? ,)*}implInstruction<'_> {/// How many operands does this instruction pop from the stack?
#[allow(unused_variables)]pubfnoperands_len(&self)->usize{matchself{$(Self::$variant$({$($field,)*})? =>$num_popped,)*}}/// How many results does this instruction push onto the stack?
#[allow(unused_variables)]pubfnresults_len(&self)->usize{matchself{$(Self::$variant$({$($field,)*})? =>$num_pushed,)*}}}};}
The text was updated successfully, but these errors were encountered:
What happened?
Source
https://github.com/WebAssembly/WASI/blob/01bb90d8b66cbc1d50349aaaab9ac5b143c9c98c/legacy/tools/witx/src/abi.rs#L64-L120
Screenshot
Code Snippet
The text was updated successfully, but these errors were encountered: