diff options
author | Karl Williamson <khw@cpan.org> | 2015-01-15 18:52:35 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-01-16 13:17:23 -0700 |
commit | 92811740b3931484900a149574c1babaa3cbca16 (patch) | |
tree | 3fc80ee7b6bae684e7bcbb55eadfaae6c969dc10 /cpan/Module-Load-Conditional/lib/Module/Load | |
parent | db5a595d4367084062eac3c7e0dab9e0a1c1d51d (diff) | |
download | perl-92811740b3931484900a149574c1babaa3cbca16.tar.gz |
regcomp.c: Improve generated code for some [:posix:] classes
For regexes compiled not under /l, [:posix:] classes in general require
special handling, as
1) under /d they can match two different sets of code points,
depending on whether or not the target string is in UTF-8.
2) under /a, the matches above the ASCII range need to be filtered
out.
But note that nothing special is needed for /u, and under [:ascii:],
there is nothing to be filtered out, and the UTF-8ness of the target
doesn't matter either. And since [:digit:] and [:xdigit:] don't have
matches in the upper Latin1 range, under /d the UTF-8ness doesn't matter
for them either.
This commit skips the special handling for the above conditions. This
leads to less work during pattern compilation, and can mean faster
run-time code, as well, skipping function calls that otherwise would be
done.
Diffstat (limited to 'cpan/Module-Load-Conditional/lib/Module/Load')
0 files changed, 0 insertions, 0 deletions