Lines Matching refs:ce32
56 ce32(0), defaultCE32(Collation::NO_CE32), builtCE32(Collation::NO_CE32),
60 ce32(ce), defaultCE32(Collation::NO_CE32), builtCE32(Collation::NO_CE32),
77 uint32_t ce32;
157 virtual uint32_t getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode) override;
199 uint32_t ce32 = utrie2_get32(builder.trie, c);
201 if(ce32 == Collation::FALLBACK_CE32) {
203 ce32 = builder.base->getCE32(c);
207 appendCEsFromCE32(d, c, ce32, /*forward=*/ true, errorCode);
269 DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode) {
271 U_ASSERT(Collation::hasCE32Tag(ce32, Collation::BUILDER_DATA_TAG));
272 if((ce32 & CollationDataBuilder::IS_BUILDER_JAMO_CE32) != 0) {
273 UChar32 jamo = Collation::indexFromCE32(ce32);
276 ConditionalCE32 *cond = builder.getConditionalCE32ForCE32(ce32);
423 CollationDataBuilder::getCE32FromOffsetCE32(UBool fromBase, UChar32 c, uint32_t ce32) const {
424 int32_t i = Collation::indexFromCE32(ce32);
442 uint32_t ce32 = utrie2_get32(trie, c);
443 if(Collation::isLongPrimaryCE32(ce32)) {
444 return Collation::primaryFromLongPrimaryCE32(ce32);
455 uint32_t ce32 = utrie2_get32(trie, c);
456 if(ce32 == Collation::FALLBACK_CE32) {
458 ce32 = base->getCE32(c);
460 while(Collation::isSpecialCE32(ce32)) {
461 switch(Collation::tagFromCE32(ce32)) {
475 return Collation::ceFromLongPrimaryCE32(ce32);
477 return Collation::ceFromLongSecondaryCE32(ce32);
479 if(Collation::lengthFromCE32(ce32) == 1) {
480 int32_t i = Collation::indexFromCE32(ce32);
481 ce32 = fromBase ? base->ce32s[i] : ce32s.elementAti(i);
488 if(Collation::lengthFromCE32(ce32) == 1) {
489 int32_t i = Collation::indexFromCE32(ce32);
498 ce32 = ce32s.elementAti(Collation::indexFromCE32(ce32));
502 // Fetch the normal ce32 for U+0000 and continue.
503 ce32 = fromBase ? base->ce32s[0] : ce32s.elementAti(0);
506 ce32 = getCE32FromOffsetCE32(fromBase, c, ce32);
512 return Collation::ceFromSimpleCE32(ce32);
526 CollationDataBuilder::addCE32(uint32_t ce32, UErrorCode &errorCode) {
529 if(ce32 == (uint32_t)ce32s.elementAti(i)) { return i; }
531 ce32s.addElement((int32_t)ce32, errorCode);
536 CollationDataBuilder::addConditionalCE32(const UnicodeString &context, uint32_t ce32,
545 LocalPointer<ConditionalCE32> cond(new ConditionalCE32(context, ce32), errorCode);
557 uint32_t ce32 = encodeCEs(ces, cesLength, errorCode);
558 addCE32(prefix, s, ce32, errorCode);
563 uint32_t ce32, UErrorCode &errorCode) {
684 utrie2_set32(trie, c, ce32, &errorCode);
688 cond->ce32 = ce32;
714 int32_t index = addConditionalCE32(context, ce32, errorCode);
723 int32_t index = addConditionalCE32(context, ce32, errorCode);
729 // Same context as before, overwrite its ce32.
730 nextCond->ce32 = ce32;
761 uint32_t ce32 = encodeOneCEAsCE32(ce);
762 if(ce32 != Collation::NO_CE32) { return ce32; }
816 uint32_t ce32 = encodeOneCEAsCE32(ces[i]);
817 if(ce32 == Collation::NO_CE32) { break; }
818 newCE32s[i] = (int32_t)ce32;
891 CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withContext,
894 if(!Collation::isSpecialCE32(ce32)) { return ce32; }
895 switch(Collation::tagFromCE32(ce32)) {
902 const uint32_t *baseCE32s = base->ce32s + Collation::indexFromCE32(ce32);
903 int32_t length = Collation::lengthFromCE32(ce32);
904 ce32 = encodeExpansion32(
909 const int64_t *baseCEs = base->ces + Collation::indexFromCE32(ce32);
910 int32_t length = Collation::lengthFromCE32(ce32);
911 ce32 = encodeExpansion(baseCEs, length, errorCode);
917 const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
918 ce32 = CollationData::readCE32(p); // Default if no prefix match.
920 return copyFromBaseCE32(c, ce32, false, errorCode);
925 if(Collation::isContractionCE32(ce32)) {
926 index = copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
928 ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
929 head.next = index = addConditionalCE32(context, ce32, errorCode);
938 ce32 = (uint32_t)prefixes.getValue();
939 if(Collation::isContractionCE32(ce32)) {
940 index = copyContractionsFromBaseCE32(context, c, ce32, cond, errorCode);
942 ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
943 cond->next = index = addConditionalCE32(context, ce32, errorCode);
948 ce32 = makeBuilderContextCE32(head.next);
954 const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
955 ce32 = CollationData::readCE32(p); // Default if no suffix match.
956 return copyFromBaseCE32(c, ce32, false, errorCode);
960 copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
961 ce32 = makeBuilderContextCE32(head.next);
969 ce32 = getCE32FromOffsetCE32(true, c, ce32);
972 ce32 = encodeOneCE(Collation::unassignedCEFromCodePoint(c), errorCode);
975 UPRV_UNREACHABLE_EXIT; // require ce32 == base->getFinalCE32(ce32)
977 return ce32;
981 CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar32 c, uint32_t ce32,
984 const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
986 if((ce32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
993 ce32 = CollationData::readCE32(p); // Default if no suffix match.
994 U_ASSERT(!Collation::isContractionCE32(ce32));
995 ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
996 cond->next = index = addConditionalCE32(context, ce32, errorCode);
1005 ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), true, errorCode);
1006 cond->next = index = addConditionalCE32(context, ce32, errorCode);
1024 UBool copyRangeCE32(UChar32 start, UChar32 end, uint32_t ce32) {
1025 ce32 = copyCE32(ce32);
1026 utrie2_setRange32(dest.trie, start, end, ce32, true, &errorCode);
1027 if(CollationDataBuilder::isBuilderContextCE32(ce32)) {
1033 uint32_t copyCE32(uint32_t ce32) {
1034 if(!Collation::isSpecialCE32(ce32)) {
1035 int64_t ce = modifier.modifyCE32(ce32);
1037 ce32 = dest.encodeOneCE(ce, errorCode);
1040 int32_t tag = Collation::tagFromCE32(ce32);
1043 srcCE32s += Collation::indexFromCE32(ce32);
1044 int32_t length = Collation::lengthFromCE32(ce32);
1049 ce32 = srcCE32s[i];
1051 if(Collation::isSpecialCE32(ce32) ||
1052 (ce = modifier.modifyCE32(ce32)) == Collation::NO_CE) {
1054 modifiedCEs[i] = Collation::ceFromCE32(ce32);
1067 ce32 = dest.encodeCEs(modifiedCEs, length, errorCode);
1069 ce32 = dest.encodeExpansion32(
1074 srcCEs += Collation::indexFromCE32(ce32);
1075 int32_t length = Collation::lengthFromCE32(ce32);
1097 ce32 = dest.encodeCEs(modifiedCEs, length, errorCode);
1099 ce32 = dest.encodeExpansion(srcCEs, length, errorCode);
1103 ConditionalCE32 *cond = src.getConditionalCE32ForCE32(ce32);
1106 cond->context, copyCE32(cond->ce32), errorCode);
1107 ce32 = CollationDataBuilder::makeBuilderContextCE32(destIndex);
1112 cond->context, copyCE32(cond->ce32), errorCode);
1126 return ce32;
1170 uint32_t ce32 = utrie2_get32(trie, c);
1171 if(ce32 == Collation::FALLBACK_CE32) {
1172 ce32 = base->getFinalCE32(base->getCE32(c));
1173 ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
1174 utrie2_set32(trie, c, ce32, &errorCode);
1186 uint32_t ce32 = utrie2_get32(trie, c);
1187 if(ce32 == Collation::FALLBACK_CE32) {
1188 ce32 = base->getFinalCE32(base->getCE32(c));
1189 if(Collation::ce32HasContext(ce32)) {
1190 ce32 = copyFromBaseCE32(c, ce32, false /* without context */, errorCode);
1191 utrie2_set32(trie, c, ce32, &errorCode);
1193 } else if(isBuilderContextCE32(ce32)) {
1194 ce32 = getConditionalCE32ForCE32(ce32)->ce32;
1198 utrie2_set32(trie, c, ce32, &errorCode);
1213 uint32_t ce32 = utrie2_get32(trie, jamo);
1214 anyJamoAssigned |= Collation::isAssignedCE32(ce32);
1217 if(ce32 == Collation::FALLBACK_CE32) {
1219 ce32 = base->getCE32(jamo);
1221 if(Collation::isSpecialCE32(ce32)) {
1222 switch(Collation::tagFromCE32(ce32)) {
1226 // Copy the ce32 as-is.
1234 ce32 = Collation::FALLBACK_CE32;
1241 ce32 = Collation::FALLBACK_CE32;
1245 ce32 = getCE32FromOffsetCE32(fromBase, jamo, ce32);
1258 jamoCE32s[j] = ce32;
1280 uint32_t ce32 = utrie2_get32(trie, c);
1281 if(ce32 != Collation::FALLBACK_CE32 && ce32 != Collation::UNASSIGNED_CE32) {
1282 int32_t index = addCE32(ce32, errorCode);
1288 ce32 = Collation::makeCE32FromTagIndexAndLength(
1290 utrie2_set32(trie, c, ce32, &errorCode);
1362 // Small optimization: Use a bit in the Hangul ce32
1379 uint32_t ce32 = hangulCE32;
1381 ce32 |= Collation::HANGUL_NO_SPECIAL_JAMO;
1384 utrie2_setRange32(trie, c, limit - 1, ce32, true, &errorCode);
1391 uint32_t ce32 = base->getCE32(c);
1392 U_ASSERT(Collation::hasCE32Tag(ce32, Collation::HANGUL_TAG));
1394 utrie2_setRange32(trie, c, limit - 1, ce32, true, &errorCode);
1403 // For U+0000, move its normal ce32 into CE32s[0] and set U0000_TAG.
1458 uint32_t ce32 = utrie2_get32(trie, c);
1459 if(!isBuilderContextCE32(ce32)) {
1464 ConditionalCE32 *cond = getConditionalCE32ForCE32(ce32);
1465 ce32 = buildContext(cond, errorCode);
1466 utrie2_set32(trie, c, ce32, &errorCode);
1507 uint32_t ce32;
1512 ce32 = lastCond->ce32;
1523 emptySuffixCE32 = firstCond->ce32;
1575 contractionBuilder.add(suffix, (int32_t)cond->ce32, errorCode);
1585 ce32 = Collation::makeCE32FromTagAndIndex(Collation::CONTRACTION_TAG, index) | flags;
1588 firstCond->defaultCE32 = ce32;
1592 return ce32;
1597 prefixBuilder.add(prefix, (int32_t)ce32, errorCode);