From: Nicholas Clark Date: Wed, 9 Jun 2010 18:53:20 +0000 (+0100) Subject: Reorder CVf_* flags to be numerically contiguous again. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2485e0c886f5e7d6fd27b65f085b0ba231ca557;p=p5sagit%2Fp5-mst-13.2.git Reorder CVf_* flags to be numerically contiguous again. The removal of CVf_ASSERTION in 584420f022db5722 and CVf_LOCKED in e95ab0c0d2aa1b35 left two gaps in the sequence of bits in use. --- diff --git a/cv.h b/cv.h index 182415e..64eb02a 100644 --- a/cv.h +++ b/cv.h @@ -63,7 +63,9 @@ 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_LVALUE 0x0004 /* CV return value can be used as lvalue */ +#define CVf_LVALUE 0x0002 /* CV return value can be used as lvalue */ +#define CVf_CONST 0x0004 /* inlinable sub */ +#define CVf_ISXSUB 0x0008 /* CV is an XSUB, not pure perl. */ #define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */ #define CVf_CLONE 0x0020 /* anon CV uses external lexicals */ @@ -73,8 +75,6 @@ Returns the stash of the CV. * require, eval). */ #define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV (esp. useful for special XSUBs) */ -#define CVf_CONST 0x0400 /* inlinable sub */ -#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_LVALUE) diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index e4ccbf5..699afd6 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -56,10 +56,11 @@ sub do_test { # legitimate regexp, it still isn't true. Seems easier and clearer # things that look like comments. + my $version_condition = qr/\$] [<>]=? 5\.\d\d\d/; # Could do this is in a s///mge but seems clearer like this: $pattern = join '', map { # If we identify the version condition, take *it* out whatever - s/\s*# (\$] [<>]=? 5\.\d\d\d)$// + s/\s*# ($version_condition(?: && $version_condition)?)$// ? (eval $1 ? $_ : '') : $_ # Didn't match, so this line is in } split /^/, $pattern; @@ -311,6 +312,7 @@ do_test(14, \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$todo" \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$repeat_todo" \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$pattern" + \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$version_condition" \\d+\\. $ADDR<\\d+> FAKE "\\$DEBUG" # $] < 5.009 \\d+\\. $ADDR<\\d+> FAKE "\\$DEBUG" flags=0x0 index=0 # $] >= 5.009 \\d+\\. $ADDR<\\d+> \\(\\d+,\\d+\\) "\\$dump" @@ -591,7 +593,8 @@ do_test(23, MUTEXP = $ADDR OWNER = $ADDR)? FLAGS = 0x200 # $] < 5.009 - FLAGS = 0xc00 # $] >= 5.009 + FLAGS = 0xc00 # $] >= 5.009 && $] < 5.013 + FLAGS = 0xc # $] >= 5.013 OUTSIDE_SEQ = 0 PADLIST = 0x0 OUTSIDE = 0x0 \\(null\\)');