Merge pull request #6260 from dearblue/mrb_vm_exec-exception

Remove `exc_caught` from `mrb_vm_exec()`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-05-06 22:55:07 +09:00
committed by GitHub
+2 -5
View File
@@ -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;
}
@@ -3130,7 +3128,6 @@ RETRY_TRY_BLOCK:
while (ci > mrb->c->cibase && ci->cci == CINFO_DIRECT) {
ci = cipop(mrb);
}
exc_caught = TRUE;
pc = ci->pc;
goto RETRY_TRY_BLOCK;
}