From 91fc3d09d68e05e3918377b235d5c3bc9d0b2a16 Mon Sep 17 00:00:00 2001 From: Wanja Zaeske Date: Tue, 20 Aug 2024 13:07:32 +0200 Subject: [PATCH] wip --- src/validation/code.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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) + } +}