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:
91c3b9c
)
Perl_gimme_V(): assume caller always provides cxt
author
David Mitchell
<davem@iabyn.com>
Wed, 18 Sep 2019 12:43:12 +0000
(13:43 +0100)
committer
David Mitchell
<davem@iabyn.com>
Thu, 19 Sep 2019 07:42:46 +0000
(08:42 +0100)
So we don't need to check whether (cxstack[cxix].blk_gimme & G_WANT),
just use it. Replace the check with an assertion.
inline.h
patch
|
blob
|
blame
|
history
diff --git
a/inline.h
b/inline.h
index
1755893
..
f52d4e5
100644
(file)
--- a/
inline.h
+++ b/
inline.h
@@
-2069,11
+2069,8
@@
Perl_gimme_V(pTHX)
cxix = PL_curstackinfo->si_cxsubix;
if (cxix < 0)
return G_VOID;
- gimme = (cxstack[cxix].blk_gimme & G_WANT);
- if (gimme)
- return gimme;
- /* use the full sub to report the error */
- return block_gimme();
+ assert(cxstack[cxix].blk_gimme & G_WANT);
+ return (cxstack[cxix].blk_gimme & G_WANT);
}