summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-12-05 16:35:17 -0700
committerKarl Williamson <khw@cpan.org>2020-12-06 13:04:47 -0700
commit88086fd8ed3eb3b690514588f5d6da7c429a5a8e (patch)
tree95aec2c0c62c0920864e84cdcdb5e76121ee71f4 /regen
parent92a0bb2462f53210b5f8af1332fc91806d507595 (diff)
downloadperl-88086fd8ed3eb3b690514588f5d6da7c429a5a8e.tar.gz
regen/regcharclass.pl: Use smaller inRANGE version
The previous commit split inRANGE up so that code that was known to have valid inputs to it could use a component that didn't have all the compile-time checks (often duplicates) that otherwise are made. This commit changes to use that component. The reason the compile-time checks are unnecessary here, is this is machine-generated code known to meet the inRANGE input requirements. All those compile-time checks added up to being too large for some compilers to handle.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/regcharclass.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index d0d80d86d0..e9944f1016 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -1183,7 +1183,7 @@ sub _cond_as_str {
# bounds. But inRANGE() allows us to have a single conditional,
# so the only cost of making sure it's a legal UTF-8 continuation
# byte is an extra subtraction instruction, a trivial expense.
- $ranges[$i] = "inRANGE($test, "
+ $ranges[$i] = "inRANGE_helper_(U8, $test, "
. $self->val_fmt($ranges[$i]->[0]) .", "
. $self->val_fmt($ranges[$i]->[1]) . ")";
}
@@ -1216,7 +1216,7 @@ sub _combine {
$cstr= "$test <= " . $self->val_fmt($item->[1]);
}
else {
- $cstr = "inRANGE($test, "
+ $cstr = "inRANGE_helper_(UV, $test, "
. $self->val_fmt($item->[0]) . ", "
. $self->val_fmt($item->[1]) . ")";
}