@@ -128,27 +128,17 @@ struct CodePointTables {
128
128
struct UnicodeData {
129
129
UniqueStringStorage unique_strings;
130
130
131
- u32 code_points_with_non_zero_combining_class { 0 };
132
-
133
131
u32 code_points_with_decomposition_mapping { 0 };
134
132
Vector<u32 > decomposition_mappings;
135
133
Vector<DeprecatedString> compatibility_tags;
136
134
137
- u32 simple_uppercase_mapping_size { 0 };
138
- u32 simple_lowercase_mapping_size { 0 };
139
- u32 simple_titlecase_mapping_size { 0 };
140
-
141
135
Vector<SpecialCasing> special_casing;
142
- u32 code_points_with_special_casing { 0 };
143
136
u32 largest_special_casing_mapping_size { 0 };
144
- u32 largest_special_casing_size { 0 };
145
137
Vector<DeprecatedString> conditions;
146
138
Vector<DeprecatedString> locales;
147
139
148
140
Vector<CaseFolding> case_folding;
149
- u32 code_points_with_case_folding { 0 };
150
141
u32 largest_case_folding_mapping_size { 0 };
151
- u32 largest_case_folding_size { 0 };
152
142
Vector<StringView> statuses;
153
143
154
144
Vector<CodePointData> code_point_data;
@@ -746,34 +736,18 @@ static ErrorOr<void> parse_unicode_data(Core::InputBufferedFile& file, UnicodeDa
746
736
}
747
737
}
748
738
749
- bool has_special_casing { false };
750
739
for (auto const & casing : unicode_data.special_casing ) {
751
- if (casing.code_point == data.code_point ) {
740
+ if (casing.code_point == data.code_point )
752
741
data.casing .special_casing_indices .append (casing.index );
753
- has_special_casing = true ;
754
- }
755
742
}
756
743
757
- bool has_case_folding { false };
758
744
for (size_t i = 0 ; i < unicode_data.case_folding .size (); ++i) {
759
- if (auto const & folding = unicode_data.case_folding [i]; folding.code_point == data.code_point ) {
745
+ if (auto const & folding = unicode_data.case_folding [i]; folding.code_point == data.code_point )
760
746
data.casing .case_folding_indices .append (i);
761
- has_case_folding = true ;
762
- }
763
747
}
764
748
765
- unicode_data.code_points_with_non_zero_combining_class += data.casing .canonical_combining_class != 0 ;
766
- unicode_data.simple_uppercase_mapping_size += data.casing .simple_uppercase_mapping .has_value ();
767
- unicode_data.simple_lowercase_mapping_size += data.casing .simple_lowercase_mapping .has_value ();
768
- unicode_data.simple_titlecase_mapping_size += data.casing .simple_titlecase_mapping .has_value ();
769
749
unicode_data.code_points_with_decomposition_mapping += data.decomposition_mapping .has_value ();
770
750
771
- unicode_data.code_points_with_special_casing += has_special_casing;
772
- unicode_data.largest_special_casing_size = max (unicode_data.largest_special_casing_size , data.casing .special_casing_indices .size ());
773
-
774
- unicode_data.code_points_with_case_folding += has_case_folding;
775
- unicode_data.largest_case_folding_size = max (unicode_data.largest_case_folding_size , data.casing .case_folding_indices .size ());
776
-
777
751
previous_code_point = data.code_point ;
778
752
unicode_data.code_point_data .append (move (data));
779
753
}
@@ -901,9 +875,7 @@ static ErrorOr<void> generate_unicode_data_implementation(Core::InputBufferedFil
901
875
SourceGenerator generator { builder };
902
876
903
877
generator.set (" string_index_type" sv, unicode_data.unique_strings .type_that_fits ());
904
- generator.set (" largest_special_casing_size" , DeprecatedString::number (unicode_data.largest_special_casing_size ));
905
878
generator.set (" special_casing_size" , DeprecatedString::number (unicode_data.special_casing .size ()));
906
- generator.set (" largest_case_folding_size" , DeprecatedString::number (unicode_data.largest_case_folding_size ));
907
879
generator.set (" case_folding_size" , DeprecatedString::number (unicode_data.case_folding .size ()));
908
880
909
881
TRY (generator.set (" CODE_POINT_TABLES_LSB_COUNT" , TRY (String::number (CODE_POINT_TABLES_LSB_COUNT))));
0 commit comments