This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_die_unwind(): remove unneeded assert
authorDavid Mitchell <davem@iabyn.com>
Fri, 16 Oct 2015 10:25:42 +0000 (11:25 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 08:59:45 +0000 (08:59 +0000)
Now that the order of things has changed, PL_curcop will always have just
been restored at this point. So there's no longer any needs to assert that
its the correct value.

pp_ctl.c

index 9438116..1a2b0f7 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1666,9 +1666,6 @@ Perl_die_unwind(pTHX_ SV *msv)
            PERL_CONTEXT *cx;
            SV **newsp;
             I32 gimme;
-#ifdef DEBUGGING
-           COP *oldcop;
-#endif
            JMPENV *restartjmpenv;
            OP *restartop;
 
@@ -1696,13 +1693,10 @@ Perl_die_unwind(pTHX_ SV *msv)
             CX_LEAVE_SCOPE(cx);
            POPEVAL(cx);
            POPBLOCK(cx);
-#ifdef DEBUGGING
-           oldcop = cx->blk_oldcop;
-#endif
+
            restartjmpenv = cx->blk_eval.cur_top_env;
            restartop = cx->blk_eval.retop;
             if (CxOLD_OP_TYPE(cx) == OP_REQUIRE) {
-                assert (PL_curcop == oldcop);
                 S_undo_inc_then_croak(aTHX_ cx, exceptsv, FALSE);
                 NOT_REACHED; /* NOTREACHED */
             }