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
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.