From 5d627e6f3783ad2d56b737d1cc283f67ce835ec0 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sat, 10 Oct 2015 23:41:15 +0100 Subject: [PATCH] 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.) --- pp_ctl.c | 1 - 1 file changed, 1 deletion(-) 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 -- 1.8.3.1