From: Nicholas Clark Date: Mon, 13 Apr 2009 08:00:51 +0000 (+0100) Subject: Remove CVf_LOCKED and CvLOCKED*(), now that nothing sets that flag bit. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e95ab0c0d2aa1b35;p=p5sagit%2Fp5-mst-13.2.git Remove CVf_LOCKED and CvLOCKED*(), now that nothing sets that flag bit. --- diff --git a/cv.h b/cv.h index bd504fd..2c21ec6 100644 --- a/cv.h +++ b/cv.h @@ -69,7 +69,6 @@ Returns the stash of the CV. #define CvOUTSIDE_SEQ(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside_seq #define CVf_METHOD 0x0001 /* CV is explicitly marked as a method */ -#define CVf_LOCKED 0x0002 /* CV locks itself or first arg on entry */ #define CVf_LVALUE 0x0004 /* CV return value can be used as lvalue */ #define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */ @@ -84,7 +83,7 @@ Returns the stash of the CV. #define CVf_ISXSUB 0x0800 /* CV is an XSUB, not pure perl. */ /* This symbol for optimised communication between toke.c and op.c: */ -#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LOCKED|CVf_LVALUE) +#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LVALUE) #define CvCLONE(cv) (CvFLAGS(cv) & CVf_CLONE) #define CvCLONE_on(cv) (CvFLAGS(cv) |= CVf_CLONE) @@ -110,10 +109,6 @@ Returns the stash of the CV. #define CvMETHOD_on(cv) (CvFLAGS(cv) |= CVf_METHOD) #define CvMETHOD_off(cv) (CvFLAGS(cv) &= ~CVf_METHOD) -#define CvLOCKED(cv) (CvFLAGS(cv) & CVf_LOCKED) -#define CvLOCKED_on(cv) (CvFLAGS(cv) |= CVf_LOCKED) -#define CvLOCKED_off(cv) (CvFLAGS(cv) &= ~CVf_LOCKED) - #define CvLVALUE(cv) (CvFLAGS(cv) & CVf_LVALUE) #define CvLVALUE_on(cv) (CvFLAGS(cv) |= CVf_LVALUE) #define CvLVALUE_off(cv) (CvFLAGS(cv) &= ~CVf_LVALUE) diff --git a/dump.c b/dump.c index edcfc46..4d6e6d4 100644 --- a/dump.c +++ b/dump.c @@ -1477,7 +1477,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo if (SvCOMPILED(sv)) sv_catpv(d, "COMPILED,"); if (CvLVALUE(sv)) sv_catpv(d, "LVALUE,"); if (CvMETHOD(sv)) sv_catpv(d, "METHOD,"); - if (CvLOCKED(sv)) sv_catpv(d, "LOCKED,"); if (CvWEAKOUTSIDE(sv)) sv_catpv(d, "WEAKOUTSIDE,"); break; case SVt_PVHV: diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 1ee4480..8509057 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -17,7 +17,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring OPpCONST_ARYBASE OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER OPpSORT_REVERSE OPpSORT_INPLACE OPpSORT_DESCEND OPpITER_REVERSED SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR SVf_FAKE SVs_RMG SVs_SMG - CVf_METHOD CVf_LOCKED CVf_LVALUE + CVf_METHOD CVf_LVALUE PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED), ($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE'); @@ -865,10 +865,9 @@ Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL"); if ($cv->FLAGS & SVf_POK) { $proto = "(". $cv->PV . ") "; } - if ($cv->CvFLAGS & (CVf_METHOD|CVf_LOCKED|CVf_LVALUE)) { + if ($cv->CvFLAGS & (CVf_METHOD|CVf_LVALUE)) { $proto .= ": "; $proto .= "lvalue " if $cv->CvFLAGS & CVf_LVALUE; - $proto .= "locked " if $cv->CvFLAGS & CVf_LOCKED; $proto .= "method " if $cv->CvFLAGS & CVf_METHOD; } diff --git a/ext/B/defsubs_h.PL b/ext/B/defsubs_h.PL index f92a26e..fa8aff0 100644 --- a/ext/B/defsubs_h.PL +++ b/ext/B/defsubs_h.PL @@ -20,7 +20,6 @@ foreach my $const (qw( CVf_CLONE CVf_CLONED CVf_CONST - CVf_LOCKED CVf_LVALUE CVf_METHOD CVf_NODEBUG diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t index 264c9cf..3c51f82 100644 --- a/ext/B/t/concise-xs.t +++ b/ext/B/t/concise-xs.t @@ -159,7 +159,7 @@ my $testpkgs = { XS => [qw( svref_2object perlstring opnumber main_start main_root main_cv )], - constant => [qw/ ASSIGN CVf_LOCKED CVf_LVALUE + constant => [qw/ ASSIGN CVf_LVALUE CVf_METHOD LIST_CONTEXT OP_CONST OP_LIST OP_RV2SV OP_STRINGIFY OPf_KIDS OPf_MOD OPf_REF OPf_SPECIAL OPf_STACKED OPf_WANT OPf_WANT_LIST OPf_WANT_SCALAR diff --git a/ext/attributes/attributes.xs b/ext/attributes/attributes.xs index f7eb6e0..78eaabe 100644 --- a/ext/attributes/attributes.xs +++ b/ext/attributes/attributes.xs @@ -125,8 +125,6 @@ usage: switch (SvTYPE(sv)) { case SVt_PVCV: cvflags = CvFLAGS((const CV *)sv); - if (cvflags & CVf_LOCKED) - XPUSHs(newSVpvs_flags("locked", SVs_TEMP)); if (cvflags & CVf_LVALUE) XPUSHs(newSVpvs_flags("lvalue", SVs_TEMP)); if (cvflags & CVf_METHOD)