-#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, with none
- * currently available. If more 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_ONLY_HAS_BITMAP ((U32) -1)
+
+/* Below are the flags for node->flags of ANYOF. These are in short supply,
+ * with none currently available. The ABOVE_BITMAP_ALL bit could be freed up
+ * by resorting to creating a swash containing everything above 255. This
+ * seems likely to introduce a performance penalty (but actual numbers haven't
+ * been done), so its probably better do some of the other possibilities below
+ * in preference to this.
+ *
+ * If just one bit is required, it seems to me (khw) that the best option would
+ * be to turn the ANYOF_LOC_REQ_UTF8 bit into a separate node type: a
+ * specialization of the ANYOFL type, freeing up the currently occupied bit.
+ * When turning a bit into a node type, one has to take into consideration that
+ * a SSC may use that bit -- not just a regular ANYOF[DL]?. In the case of
+ * ANYOF_LOC_REQ_UTF8, the only likely problem is accurately settting the SSC
+ * node-type to the new one, which would likely involve S_ssc_or and S_ssc_and,
+ * and not how the SSC currently gets set to ANYOFL. This bit is a natural
+ * candidate for being a separate node type because it is a specialization of
+ * the current ANYOFL, and because no other ANYOFL-only bits are set when it
+ * is; also most of its uses are actually outside the reginclass() function, so
+ * this could be done with no performance penalty. The other potential bits
+ * seem to me to have a potential issue with a combinatorial explosion of node
+ * types, because of not having that mutual exclusivity, where you may end up
+ * having to have a node type for bitX being set, one for bitY, and one for
+ * both bitXY.
+ *
+ * If you don't want to do this, or two bits are required, one could instead
+ * rename the ANYOF_POSIXL bit to be ANYOFL_LARGE, to mean that the ANYOF node
+ * has an extra 32 bits beyond what a regular one does. That's what it
+ * effectively means now, with the extra space all for the POSIX class bits.
+ * But those classes actually only occupy 30 bits, so the ANYOF_LOC_REQ_BIT (if
+ * an extra node type for it hasn't been created) and/or the ANYOF_LOC_FOLD
+ * bits could be moved there. The downside of this is that ANYOFL nodes with
+ * whichever of the bits get moved would have to have the extra space always
+ * allocated.
+ *
+ * If three bits are required, one could additionally make a node type for
+ * ANYOFL_LARGE, removing that as a bit, and move both the above bits to that
+ * extra word. There isn't an SSC problem as all SSCs are this large anyway,
+ * and the SSC could be set to this node type. REGINCLASS would have to be
+ * modified so that if the node type were this, it would call reginclass().
+ * as the flag bit that does this now would be gone.
+ *
+ * Several flags are not used in synthetic start class (SSC) nodes, so could be
+ * shared should new flags be needed for SSCs, like SSC_MATCHES_EMPTY_STRING
+ * now. */