From 8a2e3e5eed6c0348f0c1c07ed9a1b9e3f37e9af4 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Sat, 13 Nov 2021 00:20:02 -0800 Subject: [PATCH] WIP. --- src/ir.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ir.rs b/src/ir.rs index 556b0e0..75329de 100644 --- a/src/ir.rs +++ b/src/ir.rs @@ -4,6 +4,8 @@ use wasmparser::{FuncType, Type}; pub type SignatureId = usize; pub type FuncId = usize; +pub type BlockId = usize; +pub type InstId = usize; #[derive(Clone, Debug)] pub struct Module { @@ -14,12 +16,11 @@ pub struct Module { #[derive(Clone, Debug)] pub enum FuncDecl { Import(SignatureId), - Body(SignatureId, Function), + Body(SignatureId, FunctionBody), } #[derive(Clone, Debug)] -pub struct Function { - pub id: FuncId, - pub signature: SignatureId, +pub struct FunctionBody { pub locals: Vec, + pub blocks: Vec, }