summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-06-09 10:51:15 +0100
committerDavid Mitchell <davem@iabyn.com>2015-06-19 08:44:17 +0100
commit85ecf1471c158cb93666daeb06af5b417d8e0c6e (patch)
tree252ea1cbf659e13e45dc40879cdec84a4777bfee /pp_ctl.c
parent13929c4c904f664656210671cd0d039f4212f917 (diff)
downloadperl-85ecf1471c158cb93666daeb06af5b417d8e0c6e.tar.gz
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.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 58dc717804..326861c331 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);