diff options
author | David Mitchell <davem@iabyn.com> | 2016-08-11 12:07:07 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-08-11 12:28:24 +0100 |
commit | 9a2fefd6ac80d3f6deaec2c6314b286ac7bb8e7e (patch) | |
tree | da3b27558afb2eedf19523fcc51c5dd07090af38 /scope.h | |
parent | 403e0607fe50a0d1535b6f4223c24f97643cedbb (diff) | |
download | perl-9a2fefd6ac80d3f6deaec2c6314b286ac7bb8e7e.tar.gz |
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.
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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 |