summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-06-22 08:32:36 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-06-22 12:29:20 -0700
commit0159efd950264331befe3ebead1a80ab559bba20 (patch)
tree6e1b1cfc847406b82bd879c6852facaaaca523f1 /pp_hot.c
parent101c03fac6d3b85ba1a8c5ef6b9e48600e1f429f (diff)
downloadperl-0159efd950264331befe3ebead1a80ab559bba20.tar.gz
Remove the CvLVALUE check from pp_leavesub
As of bb3abb0, this can no longer happen.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 1b1117e05f..e9a34fde2f 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2672,6 +2672,7 @@ PP(pp_leavesublv)
POPBLOCK(cx,newpm);
cxstack_ix++; /* temporarily protect top context */
+ assert(CvLVALUE(cx->blk_sub.cv));
TAINT_NOT;
@@ -2703,17 +2704,6 @@ PP(pp_leavesublv)
}
}
else if (CxLVAL(cx)) { /* Leave it as it is if we can. */
- /* Here we go for robustness, not for speed, so we change all
- * the refcounts so the caller gets a live guy. Cannot set
- * TEMP, so sv_2mortal is out of question. */
- if (!CvLVALUE(cx->blk_sub.cv)) {
- LEAVE;
- cxstack_ix--;
- POPSUB(cx,sv);
- PL_curpm = newpm;
- LEAVESUB(sv);
- DIE(aTHX_ "Can't modify non-lvalue subroutine call");
- }
if (gimme == G_SCALAR) {
MARK = newsp + 1;
EXTEND_MORTAL(1);