commit 262c1e1d06b048aebacfd6902d7afad408c72665
parent 68d297bd5cb8c2d01d604918ac2ac34c53299564
Author: William Casarin <jb55@jb55.com>
Date: Sat, 24 Jul 2021 08:26:27 -0700
i_ref_null is a single-tag op
This is needed for initializing global null refs
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/wasm.c b/src/wasm.c
@@ -3887,10 +3887,6 @@ static int parse_instr(struct expr_parser *p, u8 tag, struct instr *op)
case i_if:
return parse_block(p, &op->block, i_if, i_end);
- case i_else:
- case i_end:
- return 1;
-
case i_call:
case i_local_get:
case i_local_set:
@@ -3959,6 +3955,9 @@ static int parse_instr(struct expr_parser *p, u8 tag, struct instr *op)
// single-tag ops
+ case i_else:
+ case i_end:
+ case i_ref_null:
case i_unreachable:
case i_nop:
case i_return: