This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
call LEAVE_SCOPE() before POPEVAL()
authorDavid Mitchell <davem@iabyn.com>
Sat, 10 Oct 2015 21:38:54 +0000 (22:38 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 08:59:40 +0000 (08:59 +0000)
commit4f12ed775aa7c8b54741e95d625731c300491d8c
tree6f7ecea0dfca310dc594452d15ff1674054c541a
parentf7d0774bf175c0069a732fe3cb11e2aa9d9f6956
call LEAVE_SCOPE() before POPEVAL()

All the other POPFOO() types have

    LEAVE_SCOPE(cx->cx_u.cx_blk.blku_old_savestack_ix);

as their first action.

POPEVAL doesn't include this. Instead, each place that does POPEVAL()
currently does a LEAVE_SCOPE() sometime shortly afterwards.
This commit moves all those LEAVE_SCOPE()s to just before each POPEVAL()
to make the behaviour like all the other context types.

This is the logically correct order: process all the savestack items
accumulated during the eval before popping the eval itself.
pp_ctl.c