This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Avoid unnecessary work xlating utf8 to uv
authorKarl Williamson <khw@cpan.org>
Thu, 28 Jun 2018 03:28:15 +0000 (21:28 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 5 Jul 2018 20:47:18 +0000 (14:47 -0600)
This moves the code for the dfa that does the translation of
non-problematic characters to earlier in the function to avoid work that
only needs to be done if the dfa rejects the input.  For example,
calculating how long the sequence is needed to be no longer is done
unless the dfa rejects.

Since the dfa always accepts an invariant if the allowed length is
non-zero, the code that tests for those specifically can be removed.


No differences found