This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
leave_scope(): pop args in each branch
authorDavid Mitchell <davem@iabyn.com>
Thu, 11 Aug 2016 11:07:07 +0000 (12:07 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 11 Aug 2016 11:28:24 +0000 (12:28 +0100)
commit9a2fefd6ac80d3f6deaec2c6314b286ac7bb8e7e
treeda3b27558afb2eedf19523fcc51c5dd07090af38
parent403e0607fe50a0d1535b6f4223c24f97643cedbb
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.c
scope.h