+#define SIZE_ONLY (RExC_emit == (regnode *) & RExC_emit_dummy)
+#define PASS1 SIZE_ONLY
+#define PASS2 (! SIZE_ONLY)
+
+/* If the bitmap doesn't fully represent what this ANYOF node can match, the
+ * ARG is set to this special value (since 0, 1, ... are legal, but will never
+ * reach this high). */
+#define ANYOF_NONBITMAP_EMPTY ((U32) -1)
+
+/* The information used to be stored as as combination of the ANYOF_UTF8 and
+ * ANYOF_NONBITMAP_NON_UTF8 bits in the flags field, but was moved out of there
+ * to free up a bit for other uses. This tries to hide the change from
+ * existing code as much as possible. Now, the data structure that goes in ARG
+ * is not allocated unless it is needed, and that is what is used to determine
+ * if there is something outside the bitmap. The code now assumes that if
+ * that structure exists, that any UTF-8 encoded string should be tried against
+ * it, but a non-UTF8-encoded string will be tried only if the
+ * ANYOF_NONBITMAP_NON_UTF8 bit is also set. */
+#define ANYOF_NONBITMAP(node) (ARG(node) != ANYOF_NONBITMAP_EMPTY)
+
+/* Flags for node->flags of ANYOF. These are in short supply, but there is one
+ * currently available. If more than this are needed, the ANYOF_LOCALE and
+ * ANYOF_POSIXL bits could be shared, making a space penalty for all locale
+ * nodes. Also, the ABOVE_LATIN1_ALL bit could be freed up by resorting to
+ * creating a swash containing everything above 255. This introduces a
+ * performance penalty. Better would be to split it off into a separate node,
+ * which actually would improve performance a bit by allowing regexec.c to test
+ * for a UTF-8 character being above 255 without having to call a function nor
+ * calculate its code point value. However, this solution might need to have a
+ * second node type, ANYOF_SYNTHETIC_ABOVE_LATIN1_ALL. Several flags are not
+ * used in synthetic start class (SSC) nodes, so could be shared should new
+ * flags be needed for SSCs. */
+
+#define ANYOF_LOCALE 0x01 /* /l modifier */
+
+/* The fold is calculated and stored in the bitmap where possible at compile
+ * time. However under locale, the actual folding varies depending on
+ * what the locale is at the time of execution, so it has to be deferred until
+ * then */
+#define ANYOF_LOC_FOLD 0x02
+
+#define ANYOF_INVERT 0x04
+
+/* For the SSC node only, which cannot be inverted, so is shared with that bit.
+ * This means "Does this SSC match an empty string?" This is used only during
+ * regex compilation. */
+#define ANYOF_EMPTY_STRING ANYOF_INVERT
+
+/* Set if this is a regnode_charclass_posixl vs a regnode_charclass. This
+ * is used for runtime \d, \w, [:posix:], ..., which are used only in locale
+ * and the optimizer's synthetic start class. Non-locale \d, etc are resolved
+ * at compile-time. Could be shared with ANYOF_LOCALE, forcing all locale
+ * nodes to be large */
+#define ANYOF_POSIXL 0x08
+#define ANYOF_CLASS ANYOF_POSIXL
+#define ANYOF_LARGE ANYOF_POSIXL
+
+/* Unused: 0x10. When using, be sure to change ANYOF_FLAGS_ALL below */
+
+/* Can match something outside the bitmap that isn't in utf8 */
+#define ANYOF_NONBITMAP_NON_UTF8 0x20
+
+/* Matches every code point 0x100 and above*/
+#define ANYOF_ABOVE_LATIN1_ALL 0x40
+#define ANYOF_UNICODE_ALL ANYOF_ABOVE_LATIN1_ALL
+
+/* Match all Latin1 characters that aren't ASCII when the target string is not
+ * in utf8. */
+#define ANYOF_NON_UTF8_LATIN1_ALL 0x80
+
+#define ANYOF_FLAGS_ALL (0xff & ~0x10)
+
+#define ANYOF_LOCALE_FLAGS (ANYOF_LOCALE \
+ |ANYOF_LOC_FOLD \
+ |ANYOF_POSIXL)