summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-07-09 06:16:36 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-07-09 06:16:36 -0700
commita5ad7a5a06c866e7ce197fe08fcc657fa8089311 (patch)
tree312c4227b72baab5d2bcbc2b19a001eb12255bba /pp_ctl.c
parent939052121c6c8b75252bdfed0ddc88cefd0ed61e (diff)
downloadperl-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 554e47f945..5fd7bf51da 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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;