From 9a2fefd6ac80d3f6deaec2c6314b286ac7bb8e7e Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Thu, 11 Aug 2016 12:07:07 +0100 Subject: leave_scope(): pop args in each branch About 4 years ago I heavily refactored Perl_leave_scope(). One of the things I did was to pop the args for each action once at the top of the loop. This involved a number of nested condtionals. This commit makes each action (i.e. each switch branch) responsible for copying its own args off the save stack, while the top of loop is still responsible for decrementing PL_savestack_ix. The gain is marginal, but it makes the code cleaner and the object code smaller. --- scope.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'scope.h') diff --git a/scope.h b/scope.h index 9a504f1bfd..ad276a94a7 100644 --- a/scope.h +++ b/scope.h @@ -8,7 +8,7 @@ * */ -/* *** these are ordered by number of of auto-popped args */ +/* *** Update arg_counts[] in scope.c if you modify these */ /* zero args */ @@ -17,8 +17,6 @@ #define SAVEt_CLEARSV 2 #define SAVEt_REGCONTEXT 3 -#define SAVEt_ARG0_MAX 3 - /* one arg */ #define SAVEt_TMPSFLOOR 4 @@ -41,8 +39,6 @@ #define SAVEt_READONLY_OFF 21 #define SAVEt_FREEPADNAME 22 -#define SAVEt_ARG1_MAX 22 - /* two args */ #define SAVEt_AV 23 @@ -71,8 +67,6 @@ #define SAVEt_ADELETE 46 #define SAVEt_APTR 47 -#define SAVEt_ARG2_MAX 47 - /* three args */ #define SAVEt_HELEM 48 -- cgit v1.2.1