Skip to content

Commit 95b89f7

Browse files
committed
Simplify end implementation
1 parent 4d343c8 commit 95b89f7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/fizzy/execute.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,8 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, const Value* args,
549549
}
550550
case Instr::end:
551551
{
552-
// End execution if it's a final end instruction.
553-
if (pc == &code.instructions[code.instructions.size()])
554-
goto end;
555-
break;
552+
assert(pc == &code.instructions[code.instructions.size()]);
553+
goto end;
556554
}
557555
case Instr::br:
558556
case Instr::br_if:

0 commit comments

Comments
 (0)