In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8da3792e39c8a8877091f33438f7191493dbefea?hp=d7a08570f1b66c1947fbca76061dfa2f85d0ade0>
- Log ----------------------------------------------------------------- commit 8da3792e39c8a8877091f33438f7191493dbefea Author: Steffen Mueller <[email protected]> Date: Wed Mar 6 18:42:17 2013 +0100 Extremely minor pp_goto optimization Makes use of the fact that the exception case is both rare and okay to be penalized (a tiny bit) instead of the common case doing an extra branch. ----------------------------------------------------------------------- Summary of changes: pp_ctl.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pp_ctl.c b/pp_ctl.c index 616c7c1..c9d833f 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2803,13 +2803,13 @@ PP(pp_goto) SvREFCNT_inc_simple_void(cv); /* avoid premature free during unwind */ FREETMPS; cxix = dopoptosub(cxstack_ix); - if (cxix < 0) - { - SvREFCNT_dec(cv); - DIE(aTHX_ "Can't goto subroutine outside a subroutine"); - } - if (cxix < cxstack_ix) + if (cxix < cxstack_ix) { + if (cxix < 0) { + SvREFCNT_dec(cv); + DIE(aTHX_ "Can't goto subroutine outside a subroutine"); + } dounwind(cxix); + } TOPBLOCK(cx); SPAGAIN; /* ban goto in eval: see <[email protected]> */ -- Perl5 Master Repository
