summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-29 17:01:51 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-29 17:01:51 +0000
commit52d81aa88ad6014ec0ca7c381776c58dd68e428a (patch)
treeb736c2dbcdd28453c37cad08c4075e004705ffc6 /op.h
parent14f3b9f2b06052c35a95062569fb2799771d1e2b (diff)
downloadperl-52d81aa88ad6014ec0ca7c381776c58dd68e428a.tar.gz
Reorder the external regexp flags to get RXf_PMf_STD_PMMOD into the
lowest 4 bits (which saves a shift), and the "flags indicating special patterns" into contiguous bits. This makes everything a little tidier, and saves 88 bytes (woohoo!) of object file with -Os on x86 FreeBSD. p4raw-id: //depot/perl@32775
Diffstat (limited to 'op.h')
-rw-r--r--op.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/op.h b/op.h
index bab04ca6ba..e48c5be163 100644
--- a/op.h
+++ b/op.h
@@ -347,35 +347,35 @@ struct pmop {
#endif
-#define PMf_RETAINT 0x0001 /* taint $1 etc. if target tainted */
-#define PMf_ONCE 0x0002 /* match successfully only once per
+#define PMf_RETAINT 0x00000040 /* taint $1 etc. if target tainted */
+#define PMf_ONCE 0x00000080 /* match successfully only once per
reset, with related flag RXf_USED
in re->extflags holding state.
This is used only for ?? matches,
and only on OP_MATCH and OP_QR */
-#define PMf_UNUSED 0x0004 /* free for use */
-#define PMf_MAYBE_CONST 0x0008 /* replacement contains variables */
+#define PMf_UNUSED 0x00000100 /* free for use */
+#define PMf_MAYBE_CONST 0x00000200 /* replacement contains variables */
-#define PMf_USED 0x0010 /* PMf_ONCE has matched successfully.
+#define PMf_USED 0x00000400 /* PMf_ONCE has matched successfully.
Not used under threading. */
-#define PMf_CONST 0x0040 /* subst replacement is constant */
-#define PMf_KEEP 0x0080 /* keep 1st runtime pattern forever */
-#define PMf_GLOBAL 0x0100 /* pattern had a g modifier */
-#define PMf_CONTINUE 0x0200 /* don't reset pos() if //g fails */
-#define PMf_EVAL 0x0400 /* evaluating replacement as expr */
+#define PMf_CONST 0x00000800 /* subst replacement is constant */
+#define PMf_KEEP 0x00001000 /* keep 1st runtime pattern forever */
+#define PMf_GLOBAL 0x00002000 /* pattern had a g modifier */
+#define PMf_CONTINUE 0x00004000 /* don't reset pos() if //g fails */
+#define PMf_EVAL 0x00008000 /* evaluating replacement as expr */
/* The following flags have exact equivalents in regcomp.h with the prefix RXf_
* which are stored in the regexp->extflags member. If you change them here,
* you have to change them there, and vice versa.
*/
-#define PMf_LOCALE 0x00800 /* use locale for character types */
-#define PMf_MULTILINE 0x01000 /* assume multiple lines */
-#define PMf_SINGLELINE 0x02000 /* assume single line */
-#define PMf_FOLD 0x04000 /* case insensitivity */
-#define PMf_EXTENDED 0x08000 /* chuck embedded whitespace */
-#define PMf_KEEPCOPY 0x10000 /* copy the string when matching */
+#define PMf_MULTILINE 0x00000001 /* assume multiple lines */
+#define PMf_SINGLELINE 0x00000002 /* assume single line */
+#define PMf_FOLD 0x00000004 /* case insensitivity */
+#define PMf_EXTENDED 0x00000008 /* chuck embedded whitespace */
+#define PMf_KEEPCOPY 0x00000010 /* copy the string when matching */
+#define PMf_LOCALE 0x00000020 /* use locale for character types */
/* mask of bits that need to be transfered to re->extflags */
#define PMf_COMPILETIME (PMf_MULTILINE|PMf_SINGLELINE|PMf_LOCALE|PMf_FOLD|PMf_EXTENDED|PMf_KEEPCOPY)