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:
113ebcf
)
pp_break(): don't use TOPBLOCK
author
David Mitchell
<davem@iabyn.com>
Mon, 21 Dec 2015 16:33:57 +0000
(16:33 +0000)
committer
David Mitchell
<davem@iabyn.com>
Wed, 3 Feb 2016 09:18:36 +0000
(09:18 +0000)
It appears to be using TOPBLOCK purely for its effect of resetting
PL_stack_sp. Since the next op will be pp_leavegiven which will do a
POPBLOCK, the other actions of TOPBLOCK are redundant. So just set
PL_stack_sp directly.
pp_ctl.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_ctl.c
b/pp_ctl.c
index
3643ec5
..
10e258b
100644
(file)
--- a/
pp_ctl.c
+++ b/
pp_ctl.c
@@
-5022,7
+5022,7
@@
PP(pp_break)
/* Restore the sp at the time we entered the given block */
cx = CX_CUR();
-
TOPBLOCK(cx)
;
+
PL_stack_sp = PL_stack_base + cx->blk_oldsp
;
return cx->blk_givwhen.leave_op;
}