Skip to content

Commit

Permalink
Support long form of Element tag
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Jan 17, 2024
1 parent c34c71a commit 4dae220
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,44 +288,44 @@ pub enum ElemKind {

/// A single [element](https://webassembly.github.io/spec/core/binary/modules.html#binary-elem).
#[derive(Wasmbin, WasmbinCountable, Debug, PartialEq, Eq, Hash, Clone, Visit)]
#[repr(u8)]
#[repr(u32)]
pub enum Element {
ActiveWithFuncs {
offset: Expression,
funcs: Vec<FuncId>,
} = 0x00,
} = 0,
PassiveWithFuncs {
kind: ElemKind,
funcs: Vec<FuncId>,
} = 0x01,
} = 1,
ActiveWithTableAndFuncs {
table: TableId,
offset: Expression,
kind: ElemKind,
funcs: Vec<FuncId>,
} = 0x02,
} = 2,
DeclarativeWithFuncs {
kind: ElemKind,
funcs: Vec<FuncId>,
} = 0x03,
} = 3,
ActiveWithExprs {
offset: Expression,
exprs: Vec<Expression>,
} = 0x04,
} = 4,
PassiveWithExprs {
ty: RefType,
exprs: Vec<Expression>,
} = 0x05,
} = 5,
ActiveWithTableAndExprs {
table: TableId,
offset: Expression,
ty: RefType,
exprs: Vec<Expression>,
} = 0x06,
} = 6,
DeclarativeWithExprs {
ty: RefType,
exprs: Vec<Expression>,
} = 0x07,
} = 7,
}

/// Number of repeated consecutive [locals](https://webassembly.github.io/spec/core/binary/modules.html#binary-local) of a single type.
Expand Down

0 comments on commit 4dae220

Please sign in to comment.