projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9390521
)
S_return_lvalues: microöptimisation
author
Father Chrysostomos
<sprout@cpan.org>
Sat, 9 Jul 2011 13:16:36 +0000
(06:16 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Sat, 9 Jul 2011 13:16:36 +0000
(06:16 -0700)
This jumps over an if() condition when we know it’s going to be true.
pp_ctl.c
patch
|
blob
|
history
diff --git
a/pp_ctl.c
b/pp_ctl.c
index
554e47f
..
5fd7bf5
100644
(file)
--- 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;