From 85ecf1471c158cb93666daeb06af5b417d8e0c6e Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Tue, 9 Jun 2015 10:51:15 +0100 Subject: [PATCH] move multicall check to S_return_lvalues Currently pp_leavesublv has a check at the top: if (CxMULTICALL(&cxstack[cxstack_ix])) return 0; Move this instead into S_return_lvalues(), which pp_leavesublv immediately calls. This has no effect on the pp_leavesublv code path, and also has no effect on the pp_return code path, because although pp_return calls S_return_lvalues, it doesn't in the case of MULTICALL, which it has already checked for earlier. So it shouldn't change anything functionally. This will allow us to eliminate S_return_lvalues in the next commit. --- pp_ctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pp_ctl.c b/pp_ctl.c index 58dc7178046f..326861c33181 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2296,6 +2296,9 @@ S_return_lvalues(pTHX) bool ref; const char *what = NULL; + if (CxMULTICALL(&cxstack[cxstack_ix])) + return 0; + POPBLOCK(cx,newpm); cxstack_ix++; /* preserve cx entry on stack for use by POPSUB */ TAINT_NOT; @@ -2531,8 +2534,6 @@ PP(pp_return) * pp_return */ PP(pp_leavesublv) { - if (CxMULTICALL(&cxstack[cxstack_ix])) - return 0; return S_return_lvalues(aTHX);