From 486430a5ae61ba02ab78cb71719b0fac0c47fb52 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sat, 11 Jul 2015 13:58:47 +0100 Subject: 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. --- pp_sort.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pp_sort.c') diff --git a/pp_sort.c b/pp_sort.c index 1e48042a9f..df4c05f1af 100644 --- a/pp_sort.c +++ b/pp_sort.c @@ -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; -- cgit v1.2.1