diff options
author | David Mitchell <davem@iabyn.com> | 2015-06-09 10:59:52 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2015-06-19 08:44:18 +0100 |
commit | 31ccb4f524a46aa0f0d2009d0dab57added88402 (patch) | |
tree | af9e6d189f3f5091f44abeae013167e65e8f8f6c /pp_ctl.c | |
parent | 85ecf1471c158cb93666daeb06af5b417d8e0c6e (diff) | |
download | perl-31ccb4f524a46aa0f0d2009d0dab57added88402.tar.gz |
eliminate S_return_lvalues()
After the previous commit, pp_leavesublv was just an empty wrapper
around S_return_lvalues() (which is also called from pp_return).
So just rename S_return_lvalues to pp_leavesublv, and make pp_return
call pp_leavesublv directly.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -2279,12 +2279,16 @@ PP(pp_leaveloop) return NORMAL; } -/* handle most of the activity of returning from an lvalue sub. - * Called by pp_leavesublv and pp_return. + +/* This duplicates most of pp_leavesub, but with additional code to handle + * return args in lvalue context. It was forked from pp_leavesub to + * avoid slowing down that function any further. + * + * Any changes made to this function may need to be copied to pp_leavesub + * and vice-versa. */ -STATIC OP* -S_return_lvalues(pTHX) +PP(pp_leavesublv) { dSP; SV **newsp; @@ -2477,7 +2481,7 @@ PP(pp_return) } /* fall through to a normal sub exit */ return CvLVALUE(cx->blk_sub.cv) - ? S_return_lvalues(aTHX) + ? Perl_pp_leavesublv(aTHX) : Perl_pp_leavesub(aTHX); } @@ -2530,14 +2534,6 @@ PP(pp_return) return retop; } -/* This duplicates parts of pp_leavesub, so that it can share code with - * pp_return */ -PP(pp_leavesublv) -{ - return S_return_lvalues(aTHX); - - -} static I32 S_unwind_loop(pTHX_ const char * const opname) |