From: Dave Mitchell Date: Thu, 19 Dec 2002 18:55:43 +0000 (+0000) Subject: remove flag SvPADBUSY X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=235cc2e3b03f7c8478aa5ccdbe27e0aaf735bb46;p=p5sagit%2Fp5-mst-13.2.git remove flag SvPADBUSY Message-ID: <20021219185543.C9530@fdgroup.com> p4raw-id: //depot/perl@18409 --- diff --git a/dump.c b/dump.c index e7f0af3..ddd5ae5 100644 --- a/dump.c +++ b/dump.c @@ -942,7 +942,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo (int)(PL_dumpindent*level), "", (IV)SvREFCNT(sv), (int)(PL_dumpindent*level), ""); - if (flags & SVs_PADBUSY) sv_catpv(d, "PADBUSY,"); if (flags & SVs_PADTMP) sv_catpv(d, "PADTMP,"); if (flags & SVs_PADMY) sv_catpv(d, "PADMY,"); if (flags & SVs_TEMP) sv_catpv(d, "TEMP,"); diff --git a/ext/Devel/Peek/Peek.t b/ext/Devel/Peek/Peek.t index a1ed214..697ac4c 100644 --- a/ext/Devel/Peek/Peek.t +++ b/ext/Devel/Peek/Peek.t @@ -85,7 +85,7 @@ do_test( 5, $c = 456, 'SV = IV\\($ADDR\\) at $ADDR REFCNT = 1 - FLAGS = \\(PADBUSY,PADMY,IOK,pIOK\\) + FLAGS = \\(PADMY,IOK,pIOK\\) IV = 456'); # If perl is built with PERL_PRESERVE_IVUV then maths is done as integers @@ -206,7 +206,7 @@ do_test(13, RV = $ADDR SV = PVCV\\($ADDR\\) at $ADDR REFCNT = 2 - FLAGS = \\(PADBUSY,PADMY,POK,pPOK,ANON,WEAKOUTSIDE\\) + FLAGS = \\(PADMY,POK,pPOK,ANON,WEAKOUTSIDE\\) IV = 0 NV = 0 PROTOTYPE = "" @@ -327,7 +327,7 @@ do_test(18, chr(256).chr(0).chr(512), 'SV = PV\\($ADDR\\) at $ADDR REFCNT = 1 - FLAGS = \\((?:PADBUSY,PADTMP,)?POK,READONLY,pPOK,UTF8\\) + FLAGS = \\((?:PADTMP,)?POK,READONLY,pPOK,UTF8\\) PV = $ADDR "\\\214\\\101\\\0\\\235\\\101"\\\0 \[UTF8 "\\\x\{100\}\\\x\{0\}\\\x\{200\}"\] CUR = 5 LEN = \\d+'); @@ -336,7 +336,7 @@ do_test(18, chr(256).chr(0).chr(512), 'SV = PV\\($ADDR\\) at $ADDR REFCNT = 1 - FLAGS = \\((?:PADBUSY,PADTMP,)?POK,READONLY,pPOK,UTF8\\) + FLAGS = \\((?:PADTMP,)?POK,READONLY,pPOK,UTF8\\) PV = $ADDR "\\\304\\\200\\\0\\\310\\\200"\\\0 \[UTF8 "\\\x\{100\}\\\x\{0\}\\\x\{200\}"\] CUR = 5 LEN = \\d+'); @@ -402,7 +402,7 @@ do_test(20, $x, 'SV = PVMG\\($ADDR\\) at $ADDR REFCNT = 1 - FLAGS = \\(PADBUSY,PADMY,SMG,POK,pPOK\\) + FLAGS = \\(PADMY,SMG,POK,pPOK\\) IV = 0 NV = 0 PV = $ADDR ""\\\0 diff --git a/pad.c b/pad.c index 34efeb0..a36c81f 100644 --- a/pad.c +++ b/pad.c @@ -378,9 +378,7 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype) if (PL_pad_reset_pending) pad_reset(); if (tmptype & SVs_PADMY) { - do { - sv = *av_fetch(PL_comppad, AvFILLp(PL_comppad) + 1, TRUE); - } while (SvPADBUSY(sv)); /* need a fresh one */ + sv = *av_fetch(PL_comppad, AvFILLp(PL_comppad) + 1, TRUE); retval = AvFILLp(PL_comppad); } else { @@ -1344,8 +1342,7 @@ S_cv_clone2(pTHX_ CV *proto, CV *outside) sv = (SV*)newHV(); else sv = NEWSV(0, 0); - if (!SvPADBUSY(sv)) - SvPADMY_on(sv); + SvPADMY_on(sv); PL_curpad[ix] = sv; } } diff --git a/scope.c b/scope.c index 0896bd4..d3a4c36 100644 --- a/scope.c +++ b/scope.c @@ -920,7 +920,7 @@ Perl_leave_scope(pTHX_ I32 base) } } else { /* Someone has a claim on this, so abandon it. */ - U32 padflags = SvFLAGS(sv) & (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP); + U32 padflags = SvFLAGS(sv) & (SVs_PADMY|SVs_PADTMP); switch (SvTYPE(sv)) { /* Console ourselves with a new value */ case SVt_PVAV: *(SV**)ptr = (SV*)newAV(); break; case SVt_PVHV: *(SV**)ptr = (SV*)newHV(); break; diff --git a/sv.h b/sv.h index 393f88f..19d8bb3 100644 --- a/sv.h +++ b/sv.h @@ -148,7 +148,7 @@ perform the upgrade if necessary. See C. #define SvUPGRADE(sv, mt) (SvTYPE(sv) >= mt || sv_upgrade(sv, mt)) -#define SVs_PADBUSY 0x00000100 /* reserved for tmp or my already */ +/* XXX spare */ #define SVs_PADTMP 0x00000200 /* in use as tmp */ #define SVs_PADMY 0x00000400 /* in use a "my" variable */ #define SVs_TEMP 0x00000800 /* string is stealable? */ @@ -637,14 +637,12 @@ and leaves the UTF8 status as it was. #define SvTHINKFIRST(sv) (SvFLAGS(sv) & SVf_THINKFIRST) -#define SvPADBUSY(sv) (SvFLAGS(sv) & SVs_PADBUSY) - #define SvPADTMP(sv) (SvFLAGS(sv) & SVs_PADTMP) -#define SvPADTMP_on(sv) (SvFLAGS(sv) |= SVs_PADTMP|SVs_PADBUSY) +#define SvPADTMP_on(sv) (SvFLAGS(sv) |= SVs_PADTMP) #define SvPADTMP_off(sv) (SvFLAGS(sv) &= ~SVs_PADTMP) #define SvPADMY(sv) (SvFLAGS(sv) & SVs_PADMY) -#define SvPADMY_on(sv) (SvFLAGS(sv) |= SVs_PADMY|SVs_PADBUSY) +#define SvPADMY_on(sv) (SvFLAGS(sv) |= SVs_PADMY) #define SvTEMP(sv) (SvFLAGS(sv) & SVs_TEMP) #define SvTEMP_on(sv) (SvFLAGS(sv) |= SVs_TEMP)