From ba623c7a3a5b450b9b492de50efceea93df96039 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 10 Nov 2025 23:47:10 +0100 Subject: Add if and else operators --- include/nanowasm/private.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/nanowasm/private.h b/include/nanowasm/private.h index 018164e..bd42f1e 100644 --- a/include/nanowasm/private.h +++ b/include/nanowasm/private.h @@ -232,7 +232,7 @@ union nw_i_sm struct nw_i_sm_sb { - void (*next)(struct nw_interp *); + enum nw_state (*next)(struct nw_interp *); struct nw_sm_leb128 leb128; struct nw_sm_io io; } start_block; @@ -283,6 +283,15 @@ union nw_i_sm } value; } store; + struct nw_i_sm_if + { + nw_varint7 sig; + struct nw_i_sm_sb sb; + struct nw_sm_leb128 leb128; + struct nw_sm_io io; + long condition; + } sm_if; + struct nw_i_sm_br { nw_varuint32 relative_depth; -- cgit v1.2.3