diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-07-09 06:16:36 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-09 06:16:36 -0700 |
commit | a5ad7a5a06c866e7ce197fe08fcc657fa8089311 (patch) | |
tree | 312c4227b72baab5d2bcbc2b19a001eb12255bba /pp_ctl.c | |
parent | 939052121c6c8b75252bdfed0ddc88cefd0ed61e (diff) | |
download | perl-a5ad7a5a06c866e7ce197fe08fcc657fa8089311.tar.gz |
S_return_lvalues: microöptimisation
This jumps over an if() condition when we know it’s going to be true.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2313,6 +2313,7 @@ S_return_lvalues(pTHX_ SV **mark, SV **sp, SV **newsp, I32 gimme, SvREADONLY(TOPs) ? (TOPs == &PL_sv_undef) ? "undef" : "a readonly value" : "a temporary"); } + goto copy_sv; } else { /* sub:lvalue{} will take us here. */ @@ -2328,6 +2329,7 @@ S_return_lvalues(pTHX_ SV **mark, SV **sp, SV **newsp, I32 gimme, } } if (MARK < SP) { + copy_sv: if (cx->blk_sub.cv && CvDEPTH(cx->blk_sub.cv) > 1) { *++newsp = SvREFCNT_inc(*SP); FREETMPS; |