+/* 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, so some games
+ * are done to share them, as described below. Already, the ANYOF_LOCALE and
+ * ANYOF_CLASS bits are shared, making a space penalty for all locale nodes.
+ * An option would be to push them into new nodes. E.g. there could be an
+ * ANYOF_LOCALE node that would be in place of the flag of the same name. But
+ * there are better options. The UNICODE_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 by allowing adding a
+ * case statement to regexec.c use the bit map for code points under 256, and
+ * to match everything above. If flags need to be added that are applicable to
+ * the synthetic start class only, with some work, they could be put in the
+ * next-node field, or in an unused bit of the classflags field. This could be
+ * done with the current EOS flag, and a new node type created that is just for
+ * the scc, freeing up that bit */
+
+#define ANYOF_LOCALE 0x01 /* /l modifier */
+
+/* The fold is calculated and stored in the bitmap where possible at compile
+ * time. However there are two cases where it isn't possible. These share
+ * this bit: 1) under locale, where the actual folding varies depending on
+ * what the locale is at the time of execution; and 2) where the folding is
+ * specified in a swash, not the bitmap, such as characters which aren't
+ * specified in the bitmap, or properties that aren't looked at at compile time
+ */
+#define ANYOF_LOC_NONBITMAP_FOLD 0x02
+
+#define ANYOF_INVERT 0x04
+
+/* Set if this is a struct regnode_charclass_class 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. Now shared with ANYOF_LOCALE, forcing all locale nodes to
+ * be large */
+#define ANYOF_CLASS ANYOF_LOCALE
+#define ANYOF_LARGE ANYOF_CLASS /* Same; name retained for back compat */
+
+/* Should this character class warn if matched against a character above
+ * Unicode */
+#define ANYOF_WARN_SUPER 0x08