This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123874] fix argument underflow for pack()
[perl5.git] / regcomp.h
index 049ac43..c17bf62 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -232,7 +232,7 @@ struct regnode_charclass_class {
  * extra SV*, used only during its construction and which is not used by
  * regexec.c.  Note that the 'next_off' field is unused, as the SSC stands
  * alone, so there is never a next node.  Also, there is no alignment issue,
- * becase these are declared or allocated as a complete unit so the compiler
+ * because these are declared or allocated as a complete unit so the compiler
  * takes care of alignment.  This is unlike the other regnodes which are
  * allocated in terms of multiples of a single-argument regnode.  SSC nodes can
  * have a pointer field because there is no alignment issue, and because it is
@@ -243,7 +243,7 @@ struct regnode_ssc {
     U16 next_off;
     U32 arg1;
     char bitmap[ANYOF_BITMAP_SIZE];    /* both compile-time ... */
-    U32 classflags;                    /* and run-time */
+    U32 classflags;                    /* ... and run-time */
 
     /* Auxiliary, only used during construction; NULL afterwards: list of code
      * points matched */
@@ -389,7 +389,15 @@ struct regnode_ssc {
  * probably better than that commit anyway.  But it could be reinstated if we
  * need a bit.  The LOC flags are only for /l nodes; the reverted commit was
  * only for /d, so there are no combinatorial issues.  The LOC flag to use is
- * probably the POSIXL one.
+ * probably the POSIXL one.  Now that there is an ANYOFL (locale) node, another
+ * option would be to make all of those include the POSIXL data structure,
+ * which would get rid of needing a separate POSIXL flag.  But it would
+ * increase the size of all such nodes, so it's probably not as atractive as
+ * having an ANYOF_POSIXL node type.  But if we did do it, note that not all 32
+ * bits of that extra space are used, one bit of that could be set aside for
+ * the LOC_FOLD flag, yielding yet another bit.  This would require extra code
+ * for masking, so again not the most attractive solution.
+ *
  * 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. */