diff options
author | David Mitchell <davem@iabyn.com> | 2015-10-12 12:02:05 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 08:59:42 +0000 |
commit | c7764d57491b2cc21ae721b2de1e960a792ccc93 (patch) | |
tree | 808be3ad92f54ccbab89b82b6b092eb6f90233f6 /cop.h | |
parent | 0663a8f8f913bf74e0120db791841537f2f81956 (diff) | |
download | perl-c7764d57491b2cc21ae721b2de1e960a792ccc93.tar.gz |
make PL_tmps_floor restore consistent
On scope exit this is done:
PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor;
This is mostly contained within the POPFOO macros; for those,
make it consistently the last entry in the macro. POPEVAL
didn't include this line; move it into the macro and out of the
various places where it's done explicitly.
This will allow us to move it into a revamped POPBLOCK macro shortly.
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -678,11 +678,11 @@ struct block_format { } \ } \ } \ - PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor; \ PL_comppad = cx->blk_sub.prevcomppad; \ PL_curpad = LIKELY(PL_comppad) ? AvARRAY(PL_comppad) : NULL; \ CvDEPTH((const CV*)cx->blk_sub.cv) = cx->blk_sub.olddepth; \ SvREFCNT_dec_NN(cx->blk_sub.cv); \ + PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor; \ } STMT_END #define POPFORMAT(cx) \ @@ -692,7 +692,6 @@ struct block_format { CV * const cv = cx->blk_format.cv; \ GV * const dfuot = cx->blk_format.dfoutgv; \ cx->blk_u16 |= CxPOPSUB_DONE; \ - PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor; \ setdefout(dfuot); \ PL_comppad = cx->blk_format.prevcomppad; \ PL_curpad = LIKELY(PL_comppad) ? AvARRAY(PL_comppad) : NULL; \ @@ -700,6 +699,7 @@ struct block_format { SvREFCNT_dec_NN(cx->blk_format.cv); \ SvREFCNT_dec_NN(dfuot); \ } \ + PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor; \ } STMT_END /* eval context */ @@ -745,6 +745,7 @@ struct block_eval { SvREFCNT_dec_NN(cx->blk_eval.cur_text); \ if (cx->blk_eval.old_namesv) \ sv_2mortal(cx->blk_eval.old_namesv); \ + PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor; \ } STMT_END /* loop context */ |