diff --git a/pp_ctl.c b/pp_ctl.c index 0c5de05fc75b..bf2e288881a6 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1349,7 +1349,18 @@ PP(pp_anywhile) if(UNLIKELY(PL_stack_base + *PL_markstack_ptr > PL_stack_sp)) { /* Ran out of items */ result = (op_type == OP_ANYSTART) ? false : true; - goto leave_with_result; + +leave_with_result: + LEAVE_with_name("grep"); + (void)POPMARK; /* pop src */ + --*PL_markstack_ptr; + (void)POPMARK; /* pop dst */ + SV **base = PL_stack_base + POPMARK; /* pop original mark */ + + rpp_popfree_to_NN(base); + rpp_push_IMM(result ? &PL_sv_yes : &PL_sv_no); + + return NORMAL; } ENTER_with_name("grep_item"); @@ -1370,18 +1381,6 @@ PP(pp_anywhile) DEFSV_set(src); return cLOGOP->op_other; - -leave_with_result: - LEAVE_with_name("grep"); - (void)POPMARK; /* pop src */ - --*PL_markstack_ptr; - (void)POPMARK; /* pop dst */ - SV **base = PL_stack_base + POPMARK; /* pop original mark */ - - rpp_popfree_to_NN(base); - rpp_push_IMM(result ? &PL_sv_yes : &PL_sv_no); - - return NORMAL; } /* Range stuff. */