This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
04e686b
)
remove redundant croak code in pp_leavesublv
author
David Mitchell
<davem@iabyn.com>
Thu, 15 Oct 2015 15:03:34 +0000
(16:03 +0100)
committer
David Mitchell
<davem@iabyn.com>
Wed, 3 Feb 2016 08:59:44 +0000
(08:59 +0000)
Just before a code path that croaks, it does a POPSUB etc.
Since this will be done by the unwind following the croak anyway, it's
redundant.
pp_ctl.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_ctl.c
b/pp_ctl.c
index
13205fe
..
23f6cce
100644
(file)
--- a/
pp_ctl.c
+++ b/
pp_ctl.c
@@
-2336,10
+2336,6
@@
PP(pp_leavesublv)
what = "undef";
}
croak:
what = "undef";
}
croak:
- CX_LEAVE_SCOPE(cx);
- POPSUB(cx);
- cxstack_ix--;
- PL_curpm = cx->blk_oldpm;
Perl_croak(aTHX_
"Can't return %s from lvalue subroutine", what
);
Perl_croak(aTHX_
"Can't return %s from lvalue subroutine", what
);