This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
harmonise die_unwind, doeval_compile, leaveeval
authorDavid Mitchell <davem@iabyn.com>
Tue, 28 Jun 2016 16:14:41 +0000 (17:14 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 1 Jul 2016 08:35:14 +0000 (09:35 +0100)
commit7d140242f905c25687570b43289e06f0643d55f3
tree246344d7fab466cf85332381f6142e70e47189e1
parent03e81cd36058f8d91a1a7b9dbe588f71ee37b274
harmonise die_unwind, doeval_compile, leaveeval

There is some similar code in each of these functions. Reorganise each of
those blocks to make them more similar. In particular, move some of the
EVAL context field preserving to earlier; i.e. change

    CX_LEAVE_SCOPE(cx);
    cx_popeval(cx);
    cx_popblock(cx);
    saved_foo = cx->blk_eval.foo;

to

    saved_foo = cx->blk_eval.foo;
    CX_LEAVE_SCOPE(cx);
    cx_popeval(cx);
    cx_popblock(cx);

and always examine the context entry to determine whether the EVAL is a
require, rather than using any other method (but assert they're the same);

and for leaveeval, move the CvDEPTH(evalcv)=0 setting earlier.
pp_ctl.c