From: David Mitchell Date: Sat, 10 Oct 2015 22:41:15 +0000 (+0100) Subject: eliminate weird gimme calc in pp_leave() X-Git-Tag: v5.23.8~154^2~122 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/5d627e6f3783ad2d56b737d1cc283f67ce835ec0 eliminate weird gimme calc in pp_leave() Some code in pp_leave that's been around in one form or another since 5.000, calculates the value of gimme in a complicated way, rather than just using the saved value in the current context, like all the other pp_leave* functions do. I think this code is redundant; running the test suite with an assert that the extra calculation doesn't change anything, doesn't produce any failures. So out it goes. (In particular. cxstack_ix can never be < 0 here.) --- diff --git a/pp_ctl.c b/pp_ctl.c index 796ee4c..ebc5c71 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2091,7 +2091,6 @@ PP(pp_leave) assert(CxTYPE(cx) == CXt_BLOCK); newsp = PL_stack_base + cx->blk_oldsp; gimme = cx->blk_gimme; - gimme = OP_GIMME(PL_op, (cxstack_ix >= 0) ? gimme : G_SCALAR); SP = (gimme == G_VOID) ? newsp