summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-01-04 09:16:52 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:19:21 +0000
commit1c23e2bdad29ff1daf6392412fffae9341795834 (patch)
tree2870d0000ec000d13e363c8a74ed81f224e261fa /pp_sys.c
parent263e0548e81a5558c883eb43d9a72c5f20f67741 (diff)
downloadperl-1c23e2bdad29ff1daf6392412fffae9341795834.tar.gz
make gimme consistently U8
The value of gimme stored in the context stack is U8. Make all other uses in the main core consistent with this. My primary motivation on this was that the new function cx_pushblock(), which I gave a 'U8 gimme' parameter, was generating warnings where callers were passing I32 gimme vars to it. Rather than play whack-a-mole, it seemed simpler to just uniformly use U8 everywhere. Porting/bench.pl shows a consistent reduction of about 2 instructions on the loop and sub benchmarks, so this change isn't harming performance.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_sys.c b/pp_sys.c
index dd14baccb8..33cba461ee 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -297,7 +297,7 @@ PP(pp_backtick)
dSP; dTARGET;
PerlIO *fp;
const char * const tmps = POPpconstx;
- const I32 gimme = GIMME_V;
+ const U8 gimme = GIMME_V;
const char *mode = "r";
TAINT_PROPER("``");
@@ -1345,7 +1345,7 @@ PP(pp_getc)
if (io) {
const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
if (mg) {
- const U32 gimme = GIMME_V;
+ const U8 gimme = GIMME_V;
Perl_tied_method(aTHX_ SV_CONST(GETC), SP, MUTABLE_SV(io), mg, gimme, 0);
if (gimme == G_SCALAR) {
SPAGAIN;
@@ -1382,7 +1382,7 @@ STATIC OP *
S_doform(pTHX_ CV *cv, GV *gv, OP *retop)
{
PERL_CONTEXT *cx;
- const I32 gimme = GIMME_V;
+ const U8 gimme = GIMME_V;
PERL_ARGS_ASSERT_DOFORM;
@@ -2870,7 +2870,7 @@ PP(pp_stat)
dSP;
GV *gv = NULL;
IO *io = NULL;
- I32 gimme;
+ U8 gimme;
I32 max = 13;
SV* sv;
@@ -4026,7 +4026,7 @@ PP(pp_readdir)
dSP;
SV *sv;
- const I32 gimme = GIMME_V;
+ const U8 gimme = GIMME_V;
GV * const gv = MUTABLE_GV(POPs);
const Direntry_t *dp;
IO * const io = GvIOn(gv);