This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_goto: use cx->blk_oldscopesp
authorDavid Mitchell <davem@iabyn.com>
Thu, 25 Jun 2015 14:08:37 +0000 (15:08 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 08:59:32 +0000 (08:59 +0000)
commit2e25b41bed5be32dce1ec123ade1d426500f05cc
treee67ecc935d6068765189df2c9039b21f884f82ff
parent2c50b7edd16542f4ebaaeeeb1c34aa0bd92bfe2c
pp_goto: use cx->blk_oldscopesp

POPSUB() does:

    LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp - 1])

while pp_goto(), which manually does the relevant actions from POPSUB(),
does:

    LEAVE_SCOPE(PL_scopestack[PL_scopestack_ix - 1])

For consistency, make pp_goto() use cx->blk_oldscopesp instead.  In fact
at that point they should both hold the same value (and I've added an
assert to that effect), since we should have just popped any nested
scopes.
pp_ctl.c