summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-09-11 22:45:06 -0600
committerKarl Williamson <khw@cpan.org>2014-09-29 11:07:38 -0600
commita3b51d37a1c354a57994f7ada55bd0a05849903d (patch)
treedfed8ee8392fa009d824c5421d74ae2cfbcf81f2
parentba474e876da44d462e1da4f95365622b59a8d402 (diff)
downloadperl-a3b51d37a1c354a57994f7ada55bd0a05849903d.tar.gz
regexp.h: Move regex flag bit positions.
This moves three bits to create a block of unused bits at the beginning. The first bit had to be moved to make space for other uses that are coming in future commits. This breaks binary compatibility, so might as well move the other two bits so that all the unused bits are consolidated at the beginning. This pool of unused bits is the boundary between the bits that are common to op.h and regexp.h (and in op_reg_common.h) and those that are separate. It's best to have all the unused bits there, so when we need to use one, it can be taken from either side, as needed, without us being trapped into having an available bit, but of the wrong kind.
-rw-r--r--regexp.h11
-rw-r--r--regnodes.h12
2 files changed, 12 insertions, 11 deletions
diff --git a/regexp.h b/regexp.h
index 54bae1227d..5468f95095 100644
--- a/regexp.h
+++ b/regexp.h
@@ -355,8 +355,7 @@ and check for NULL.
# error "RXf_SPLIT does not match RXf_PMf_SPLIT"
#endif
-/* Do we have some sort of anchor? */
-#define RXf_IS_ANCHORED (1<<(RXf_BASE_SHIFT+0))
+#define RXf_UNUSED0 (1<<(RXf_BASE_SHIFT+0))
#define RXf_UNUSED1 (1<<(RXf_BASE_SHIFT+1))
#define RXf_UNUSED2 (1<<(RXf_BASE_SHIFT+2))
#define RXf_UNUSED3 (1<<(RXf_BASE_SHIFT+3))
@@ -364,9 +363,8 @@ and check for NULL.
#define RXf_UNUSED5 (1<<(RXf_BASE_SHIFT+5))
/* What we have seen */
-#define RXf_NO_INPLACE_SUBST (1<<(RXf_BASE_SHIFT+6))
-#define RXf_EVAL_SEEN (1<<(RXf_BASE_SHIFT+7))
-#define RXf_UNUSED8 (1<<(RXf_BASE_SHIFT+8))
+#define RXf_NO_INPLACE_SUBST (1<<(RXf_BASE_SHIFT+7))
+#define RXf_EVAL_SEEN (1<<(RXf_BASE_SHIFT+8))
/* Special */
#define RXf_UNBOUNDED_QUANTIFIER_SEEN (1<<(RXf_BASE_SHIFT+9))
@@ -381,6 +379,9 @@ and check for NULL.
#define RXf_INTUIT_TAIL (1<<(RXf_BASE_SHIFT+14))
#define RXf_USE_INTUIT (RXf_USE_INTUIT_NOML|RXf_USE_INTUIT_ML)
+/* Do we have some sort of anchor? */
+#define RXf_IS_ANCHORED (1<<(RXf_BASE_SHIFT+15))
+
/* Copy and tainted info */
#define RXf_COPY_DONE (1<<(RXf_BASE_SHIFT+16))
diff --git a/regnodes.h b/regnodes.h
index 133ad65eb2..79eb829ee4 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -632,7 +632,7 @@ EXTCONST char * const PL_reg_name[] = {
EXTCONST char * PL_reg_extflags_name[];
#else
EXTCONST char * const PL_reg_extflags_name[] = {
- /* Bits in extflags defined: 11111110111111111111111111111111 */
+ /* Bits in extflags defined: 11111111111111110111111111111111 */
"MULTILINE", /* 0x00000001 */
"SINGLELINE", /* 0x00000002 */
"FOLD", /* 0x00000004 */
@@ -642,22 +642,22 @@ EXTCONST char * const PL_reg_extflags_name[] = {
"CHARSET1", /* 0x00000040 : "CHARSET" - 0x000000e0 */
"CHARSET2", /* 0x00000080 : "CHARSET" - 0x000000e0 */
"SPLIT", /* 0x00000100 */
- "IS_ANCHORED", /* 0x00000200 */
+ "UNUSED0", /* 0x00000200 */
"UNUSED1", /* 0x00000400 */
"UNUSED2", /* 0x00000800 */
"UNUSED3", /* 0x00001000 */
"UNUSED4", /* 0x00002000 */
"UNUSED5", /* 0x00004000 */
- "NO_INPLACE_SUBST", /* 0x00008000 */
- "EVAL_SEEN", /* 0x00010000 */
- "UNUSED8", /* 0x00020000 */
+ "UNUSED_BIT_15", /* 0x00008000 */
+ "NO_INPLACE_SUBST", /* 0x00010000 */
+ "EVAL_SEEN", /* 0x00020000 */
"UNBOUNDED_QUANTIFIER_SEEN",/* 0x00040000 */
"CHECK_ALL", /* 0x00080000 */
"MATCH_UTF8", /* 0x00100000 */
"USE_INTUIT_NOML", /* 0x00200000 */
"USE_INTUIT_ML", /* 0x00400000 */
"INTUIT_TAIL", /* 0x00800000 */
- "UNUSED_BIT_24", /* 0x01000000 */
+ "IS_ANCHORED", /* 0x01000000 */
"COPY_DONE", /* 0x02000000 */
"TAINTED_SEEN", /* 0x04000000 */
"TAINTED", /* 0x08000000 */