This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/regcharclass.pl: Rmv special case
authorKarl Williamson <khw@cpan.org>
Wed, 11 Nov 2020 23:37:23 +0000 (16:37 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 20 Dec 2020 03:45:42 +0000 (20:45 -0700)
This avoided checking for optimizations.  Whatever its original use, it
doesn't do any good, and the optimizations are actually useful.

regcharclass.h
regen/regcharclass.pl

index f7217b4..dbcf50a 100644 (file)
  * ee0dd174fd5b158d82dfea95d7d822ca0bfcd490182669353dca3ab39a8ee807 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
- * 1c2b06a33a2fd4ea6a2df233f99167cb89e9e4041e1732bd49d5c2f145df38d8 regen/regcharclass.pl
+ * e3e72d7df46550e894d860fec08cc81ca9e1d2205a81fb48733e74b8853281be regen/regcharclass.pl
  * c0a5e4cb2b9ffad78691938e122c1310bbc98aca2364af243e5c6b2ec0f59dc3 regen/regcharclass_multi_char_folds.pl
  * ex: set ro: */
index e9944f1..8d97a79 100755 (executable)
@@ -1077,22 +1077,8 @@ sub _cond_as_str {
     return $self->_combine( $test, @ranges )
       if $combine;
 
-    if ($is_cp_ret) {
-        @ranges= map {
-            ref $_
-            ?   "isRANGE( $test, "
-              . $self->val_fmt($_[0]) . ", "
-              . $self->val_fmt($_[1]) . " )"
-            : $self->val_fmt($_) . " == $test";
-        } @ranges;
-
-        return "( " . join( " || ", @ranges ) . " )";
-    }
-
     # If the input set has certain characteristics, we can optimize tests
-    # for it.  This doesn't apply if returning the code point, as we want
-    # each element of the set individually.  The code above is for this
-    # simpler case.
+    # for it.
 
     return 1 if @$cond == 256;  # If all bytes match, is trivially true