This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Improve dump ANYOFR patterns
authorKarl Williamson <khw@cpan.org>
Wed, 12 Feb 2020 16:26:22 +0000 (09:26 -0700)
committerSawyer X <xsawyerx@cpan.org>
Wed, 27 May 2020 08:09:54 +0000 (11:09 +0300)
commitda3350397f4030c098c43eb8ce4ea964e886d2eb
treeeffb16b028366c320a2ef90de7c5116da5ccc49a
parent28bfed14e7471c9d91c7ca03b095d6b8899c85ab
regcomp.c: Improve dump ANYOFR patterns

On ASCII platforms, where its easy to calculate, when dumping a pattern,
don't output the lowest first UTF-8 byte when the entire range is ASCII.
The info about this minimum byte is carried in the node, but is ignored
unless the pattern is UTF-8, and in the case of UTF-8 invariant
characters gives no extra help.  The information is quite useful for
large code points, so we can quickly rule out large swaths of potential
matches without having to convert the target UTF-8 string to code point
format.  But for ASCII matches it isn't helpful and dumping it is just
extra noise.
regcomp.c