diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-02-10 10:35:48 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-11 13:31:33 -0700 |
commit | 24caacbccae7b938deecdcc3f13dd66c9c6a684e (patch) | |
tree | f08e7f10554bc874251d94d9d5b2684b40c6d706 | |
parent | bb0d02ab7b92c63044b4ee5631217dc06cb2e2ca (diff) | |
download | perl-24caacbccae7b938deecdcc3f13dd66c9c6a684e.tar.gz |
regcomp.c: Remove duplicate inversion list
\h and \p{XPosixBlank} contain the same code points, so there is no need
to have both of them.
-rw-r--r-- | charclass_invlists.h | 26 | ||||
-rw-r--r-- | regcomp.c | 9 | ||||
-rw-r--r-- | regen/mk_invlists.pl | 1 | ||||
-rw-r--r-- | sv.c | 2 |
4 files changed, 4 insertions, 34 deletions
diff --git a/charclass_invlists.h b/charclass_invlists.h index 2cfcac6155..5d78219daa 100644 --- a/charclass_invlists.h +++ b/charclass_invlists.h @@ -36,32 +36,6 @@ UV ASCII_invlist[] = { 0 }; -UV HorizSpace_invlist[] = { - 18, /* Number of elements */ - 0, /* Current iteration position */ - 1064334010, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 9, - 10, - 32, - 33, - 160, - 161, - 5760, - 5761, - 6158, - 6159, - 8192, - 8203, - 8239, - 8240, - 8287, - 8288, - 12288, - 12289 -}; - UV VertSpace_invlist[] = { 6, /* Number of elements */ 0, /* Current iteration position */ @@ -4841,8 +4841,6 @@ Perl_re_compile(pTHX_ SV * const pattern, U32 orig_pm_flags) PL_L1PosixAlnum = _new_invlist_C_array(L1PosixAlnum_invlist); PL_PosixAlnum = _new_invlist_C_array(PosixAlnum_invlist); - PL_HorizSpace = _new_invlist_C_array(HorizSpace_invlist); - PL_L1PosixLower = _new_invlist_C_array(L1PosixLower_invlist); PL_PosixLower = _new_invlist_C_array(PosixLower_invlist); @@ -10863,12 +10861,13 @@ parseit: /* For these, we use the nonbitmap, as /d doesn't make a * difference in what these match. There would be problems * if these characters had folds other than themselves, as - * nonbitmap is subject to folding */ - _invlist_union(nonbitmap, PL_HorizSpace, &nonbitmap); + * nonbitmap is subject to folding. It turns out that \h + * is just a synonym for XPosixBlank */ + _invlist_union(nonbitmap, PL_XPosixBlank, &nonbitmap); break; case ANYOF_NHORIZWS: _invlist_union_complement_2nd(nonbitmap, - PL_HorizSpace, &nonbitmap); + PL_XPosixBlank, &nonbitmap); break; case ANYOF_LOWER: case ANYOF_NLOWER: diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl index 46114bcfb1..31c77dee7a 100644 --- a/regen/mk_invlists.pl +++ b/regen/mk_invlists.pl @@ -93,7 +93,6 @@ output_invlist("AboveLatin1", [ 256 ]); for my $prop (qw( ASCII - HorizSpace VertSpace PerlSpace XPerlSpace @@ -13406,8 +13406,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_L1PosixGraph = sv_dup_inc(proto_perl->IL1PosixGraph, param); PL_PosixGraph = sv_dup_inc(proto_perl->IPosixGraph, param); - PL_HorizSpace = sv_dup_inc(proto_perl->IHorizSpace, param); - PL_L1PosixLower = sv_dup_inc(proto_perl->IL1PosixLower, param); PL_PosixLower = sv_dup_inc(proto_perl->IPosixLower, param); |