Skip to content

Commit

Permalink
move multicall check to S_return_lvalues
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
iabyn committed Jun 19, 2015
1 parent 13929c4 commit 85ecf14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pp_ctl.c
Expand Up @@ -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;
Expand Down Expand Up @@ -2531,8 +2534,6 @@ PP(pp_return)
* pp_return */
PP(pp_leavesublv)
{
if (CxMULTICALL(&cxstack[cxstack_ix]))
return 0;
return S_return_lvalues(aTHX);


Expand Down

0 comments on commit 85ecf14

Please sign in to comment.