From: Nicholas Clark Date: Sat, 21 Apr 2007 21:47:34 +0000 (+0000) Subject: Various variables in intrpvar.h and thrdvar.h are considerably larger X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8bbe96d720ac7fdd2c32da6f4dd8032b43985afd;p=p5sagit%2Fp5-mst-13.2.git Various variables in intrpvar.h and thrdvar.h are considerably larger than they need to be. p4raw-id: //depot/perl@31017 --- diff --git a/intrpvar.h b/intrpvar.h index 12a9084..0da8516 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -65,7 +65,7 @@ PERLVAR(Iperldb, U32) /* This value may be set when embedding for full cleanup */ /* 0=none, 1=full, 2=full with checks */ -PERLVARI(Iperl_destruct_level, int, 0) +PERLVARI(Iperl_destruct_level, U8, 0) /* magical thingies */ PERLVAR(Ibasetime, Time_t) /* $^T */ @@ -180,7 +180,7 @@ PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */ PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */ PERLVAR(Ipreambleav, AV *) PERLVARI(Ilaststatval, int, -1) -PERLVARI(Ilaststype, I32, OP_STAT) +PERLVARI(Ilaststype, U16, OP_STAT) PERLVAR(Imess_sv, SV *) /* XXX shouldn't these be per-thread? --GSAR */ @@ -306,7 +306,7 @@ PERLVARI(Iexpect, U8, XSTATE) /* how to interpret ambiguous tokens */ PERLVAR(Imulti_end, I32) /* last line of multi-line string */ -PERLVAR(Ierror_count, I32) /* how many errors so far, max 10 */ +PERLVAR(Ierror_count, U8) /* how many errors so far, max 10 */ PERLVAR(Isubline, I32) /* line this subroutine began on */ PERLVAR(Isubname, SV *) /* name of current subroutine */ @@ -319,7 +319,7 @@ PERLVAR(Ipad_reset_pending, I32) /* reset pad on next attempted alloc */ PERLVAR(Ilast_uni, char *) /* position of last named-unary op */ PERLVAR(Ilast_lop, char *) /* position of last list operator */ PERLVAR(Ilast_lop_op, OPCODE) /* last list operator */ -PERLVAR(Iin_my, I32) /* we're compiling a "my" (or "our") declaration */ +PERLVAR(Iin_my, U16) /* we're compiling a "my" (or "our") declaration */ PERLVAR(Iin_my_stash, HV *) /* declared class of this "my" declaration */ #ifdef FCRYPT PERLVARI(Icryptseen, bool, FALSE) /* has fast crypt() been initialized? */ @@ -379,7 +379,7 @@ PERLVAR(Ilast_swash_hv, HV *) PERLVAR(Ilast_swash_tmps, U8 *) PERLVAR(Ilast_swash_slen, STRLEN) PERLVARI(Iglob_index, int, 0) -PERLVAR(Ilast_swash_klen, U32) +PERLVAR(Ilast_swash_klen, U8) /* Only needs to store 0-10 */ PERLVARA(Ilast_swash_key,10, U8) PERLVAR(Iparser, yy_parser *) /* current parser state */ @@ -451,7 +451,7 @@ PERLVAR(Iutf8locale, bool) /* utf8 locale detected */ PERLVARI(Ihash_seed_set, bool, FALSE) /* Hash initialized? */ PERLVARI(Irehash_seed_set, bool, FALSE) /* 582 hash initialized? */ -PERLVARI(Icv_has_eval, I32, 0) /* PL_compcv includes an entereval or similar */ +PERLVARI(Icv_has_eval, bool, FALSE) /* PL_compcv includes an entereval or similar */ #ifdef PL_OP_SLAB_ALLOC PERLVAR(IOpPtr,I32 **) diff --git a/pad.c b/pad.c index 8560d9a..1e0217c 100644 --- a/pad.c +++ b/pad.c @@ -168,7 +168,7 @@ Perl_pad_new(pTHX_ int flags) SAVEI32(PL_comppad_name_fill); SAVEI32(PL_min_intro_pending); SAVEI32(PL_max_intro_pending); - SAVEI32(PL_cv_has_eval); + SAVEBOOL(PL_cv_has_eval); if (flags & padnew_SAVESUB) { SAVEI32(PL_pad_reset_pending); } diff --git a/thrdvar.h b/thrdvar.h index 02b023f..bf25351 100644 --- a/thrdvar.h +++ b/thrdvar.h @@ -119,8 +119,8 @@ PERLVAR(Tcurstash, HV *) /* symbol table for current package */ PERLVAR(Trestartop, OP *) /* propagating an error from croak? */ PERLVARI(Tcurcop, COP * VOL, &PL_compiling) -PERLVAR(Tlocalizing, int) /* are we processing a local() list? */ -PERLVAR(Tcolorset, int) /* from regcomp.c */ +PERLVAR(Tlocalizing, U8) /* are we processing a local() list? */ +PERLVAR(Tcolorset, bool) /* from regcomp.c */ PERLVAR(Tcurstack, AV *) /* THE STACK */ PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */ @@ -137,7 +137,7 @@ PERLVAR(Thv_fetch_ent_mh, HE*) /* owned by hv_fetch_ent() */ PERLVAR(Tlastgotoprobe, OP*) /* from pp_ctl.c */ -PERLVARI(Tdumpindent, I32, 4) /* # of blanks per dump indentation level */ +PERLVARI(Tdumpindent, U16, 4) /* # of blanks per dump indentation level */ /* sort stuff */ PERLVAR(Tsortcop, OP *) /* user defined sort routine */ @@ -163,7 +163,7 @@ PERLVARI(Tpeepp, peep_t, MEMBER_TO_FPTR(Perl_peep)) /* Pointer to peephole optimizer */ PERLVARI(Tmaxscream, I32, -1) -PERLVARI(Treginterp_cnt,int, 0) /* Whether "Regexp" was interpolated. */ +PERLVARI(Treginterp_cnt,I32, 0) /* Whether "Regexp" was interpolated. */ PERLVARI(Twatchaddr, char **, 0) PERLVAR(Twatchok, char *)