Skip to content

Commit

Permalink
Merge pull request #6260 from dearblue/mrb_vm_exec-exception
Browse files Browse the repository at this point in the history
Remove `exc_caught` from `mrb_vm_exec()`
  • Loading branch information
matz committed May 6, 2024
2 parents 1e61a87 + dea5c9e commit f975794
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/vm.c
Expand Up @@ -1432,15 +1432,13 @@ mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc)
};
#endif

volatile mrb_bool exc_caught = FALSE;
RETRY_TRY_BLOCK:

MRB_TRY(&c_jmp) {

if (exc_caught) {
exc_caught = FALSE;
if (mrb->exc) {
mrb_gc_arena_restore(mrb, ai);
if (mrb->exc && mrb->exc->tt == MRB_TT_BREAK)
if (mrb->exc->tt == MRB_TT_BREAK)
goto L_BREAK;
goto L_RAISE;
}
Expand Down Expand Up @@ -3130,7 +3128,6 @@ mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc)
while (ci > mrb->c->cibase && ci->cci == CINFO_DIRECT) {
ci = cipop(mrb);
}
exc_caught = TRUE;
pc = ci->pc;
goto RETRY_TRY_BLOCK;
}
Expand Down

0 comments on commit f975794

Please sign in to comment.