From 225275acd1a537e8a8e99c1860e40a0c066ea03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 20 Oct 2020 19:25:59 +0200 Subject: [PATCH] Simplify end implementation --- lib/fizzy/execute.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/fizzy/execute.cpp b/lib/fizzy/execute.cpp index 089013ca38..c162dc436f 100644 --- a/lib/fizzy/execute.cpp +++ b/lib/fizzy/execute.cpp @@ -549,10 +549,8 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, const Value* args, } case Instr::end: { - // End execution if it's a final end instruction. - if (pc == &code.instructions[code.instructions.size()]) - goto end; - break; + assert(pc == &code.instructions[code.instructions.size()]); + goto end; } case Instr::br: case Instr::br_if: