Skip to content

Commit

Permalink
assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jul 15, 2023
1 parent d280653 commit 854381a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ exec_func(struct exec_context *ctx, uint32_t funcidx,
*/
ctx->user_intr_delay = 1;
}
assert(ctx->stack.lsize == 0);
ret = exec_push_vals(ctx, ptype, param);
if (ret != 0) {
goto fail;
Expand Down Expand Up @@ -904,6 +905,7 @@ exec_func(struct exec_context *ctx, uint32_t funcidx,
*trapp = trap;
} else if (ret == 0) {
exec_pop_vals(ctx, rtype, result);
assert(ctx->stack.lsize == 0);
}
fail:
return ret;
Expand Down

0 comments on commit 854381a

Please sign in to comment.