diff options
author | David Mitchell <davem@iabyn.com> | 2015-07-11 13:58:47 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 08:59:36 +0000 |
commit | 486430a5ae61ba02ab78cb71719b0fac0c47fb52 (patch) | |
tree | 1ddc6d631caa0370ededf12809129a65e8f15480 /pp_sort.c | |
parent | 80774f050c0c69194a7d501e38566ff35690833b (diff) | |
download | perl-486430a5ae61ba02ab78cb71719b0fac0c47fb52.tar.gz |
pp_sort: move SAVETMPS later
Move the SAVETMPS to just after the PUSHSUB. This should make no
functional difference, because nothing should have affected the TMPS stack
between the old and the new code positions.
For the OPf_SPECIAL/ CXt_NULL case, which doesn't do a PUSHSUB,
do another SAVETMPS there too.
Diffstat (limited to 'pp_sort.c')
-rw-r--r-- | pp_sort.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1643,7 +1643,6 @@ PP(pp_sort) SV** newsp; const bool oldcatch = CATCH_GET; - SAVETMPS; SAVEOP(); CATCH_SET(TRUE); @@ -1673,6 +1672,7 @@ PP(pp_sort) if (!(flags & OPf_SPECIAL)) { cx->cx_type = CXt_SUB; PUSHSUB(cx); + SAVETMPS; if (!is_xsub) { PADLIST * const padlist = CvPADLIST(cv); @@ -1692,6 +1692,9 @@ PP(pp_sort) } } + else + SAVETMPS; + cx->cx_type |= CXp_MULTICALL; start = p1 - max; |