diff --git a/src/validation/code.rs b/src/validation/code.rs index 03a1ff75..5dc0efe8 100644 --- a/src/validation/code.rs +++ b/src/validation/code.rs @@ -351,3 +351,24 @@ where } Ok(()) } + +/// Type signature of a block +pub enum BlockType { + Empty, + Primitive(ValType), + TyIndex(usize), +} + +/// +pub enum ValidationStackEntry { + ValType(ValType), + Block(BlockType), + Loop(BlockType), + If(BlockType), +} + +impl From for ValidationStackEntry { + fn from(val_ty: ValType) -> Self { + Self::ValType(val_ty) + } +}