diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-09-03 16:59:09 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-09-13 21:14:03 -0600 |
commit | 685289b5657b776e8a3871de68a57785e6ccd797 (patch) | |
tree | effb3627422467ccc329131b12c3de913ff5b8a4 /regen | |
parent | b1af8fefbdf1c044271e0b9d8898e2d808ab7879 (diff) | |
download | perl-685289b5657b776e8a3871de68a57785e6ccd797.tar.gz |
Use macro not swash for utf8 quotemeta
The rules for matching whether an above-Latin1 code point are now saved
in a macro generated from a trie by regen/regcharclass.pl, and these are
now used by pp.c to test these cases. This allows removal of a wrapper
subroutine, and also there is no need for dynamic loading at run-time
into a swash.
This macro is about as big as I'm comfortable compiling in, but it
saves the building of a hash that can grow over time, and removes a
subroutine and interpreter variables. Indeed, performance benchmarks
show that it is about the same speed as a hash, but it does not require
having to load the rules in from disk the first time it is used.
Diffstat (limited to 'regen')
-rwxr-xr-x | regen/regcharclass.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl index 1d4a9217ec..8d18d03340 100755 --- a/regen/regcharclass.pl +++ b/regen/regcharclass.pl @@ -915,3 +915,7 @@ GCB_T: Grapheme_Cluster_Break=T GCB_V: Grapheme_Cluster_Break=V => UTF8 :fast \p{_X_GCB_V} + +QUOTEMETA: Meta-characters that \Q should quote +=> high :fast +\p{_Perl_Quotemeta} |