Home | History | Annotate | Download | only in coll

Lines Matching refs:ce

137         // Find or insert a node whose index we will put into a temporary CE.
154 // We do not support tailoring to an unassigned-implicit CE.
226 // Strength of the temporary CE = strength of its reset position.
239 // Collect the root CE weights if this node is for a root CE.
240 // If it is not, then return the low non-primary boundary for a tailored CE.
267 // [p, s, t] is a root CE. Return the preceding weight for the requested level.
281 long ce;
308 ce = rootElements.getLastTertiaryCE();
331 ce = rootElements.getFirstSecondaryCE();
336 ce = rootElements.getLastSecondaryCE();
340 ce = rootElements.getFirstPrimaryCE();
344 ce = rootElements.lastCEWithPrimaryBefore(variableTop + 1);
347 ce = rootElements.firstCEWithPrimaryAtLeast(variableTop + 1);
351 // Use the Hani-first-primary rather than the actual last "regular" CE before it,
354 ce = rootElements.firstCEWithPrimaryAtLeast(
358 ce = baseData.getSingleCE(0x4e00);
361 // We do not support tailoring to an unassigned-implicit CE.
365 ce = Collation.makeCE(Collation.FIRST_TRAILING_PRIMARY);
375 int index = findOrInsertNodeForRootCE(ce, strength);
382 // Find the first character tailored after the boundary CE,
383 // or the first real root CE after it.
390 ce = tempCEFromIndexAndStrength(index, strength);
393 long p = ce >>> 32;
397 ce = Collation.makeCE(p);
398 index = findOrInsertNodeForRootCE(ce, Collator.PRIMARY);
412 ce = tempCEFromIndexAndStrength(index, strength);
426 // Do not make a temporary CE for a root node.
427 // This last node might be the node for the root CE itself,
430 ce = tempCEFromIndexAndStrength(index, strength);
433 return ce;
480 long ce = ces[cesLength - 1];
481 if(strength == Collator.PRIMARY && !isTempCE(ce) && (ce >>> 32) == 0) {
486 if(strength == Collator.QUATERNARY && ce == 0) {
487 // The CE data structure does not support non-zero quaternary weights
494 // Strength of the temporary CE:
495 // The new relation may yield a stronger CE but not a weaker one.
496 int tempStrength = ceStrength(ce);
526 * for the CE + strength.
531 // Find the last CE that is at least as "strong" as the requested difference.
533 long ce;
536 ce = ces[0] = 0;
540 ce = ces[cesLength - 1];
542 if(ceStrength(ce) <= strength) { break; }
545 if(isTempCE(ce)) {
548 return indexFromTempCE(ce);
551 // root CE
552 if((int)(ce >>> 56) == Collation.UNASSIGNED_IMPLICIT_BYTE) {
556 return findOrInsertNodeForRootCE(ce, strength);
559 private int findOrInsertNodeForRootCE(long ce, int strength) {
560 assert((int)(ce >>> 56) != Collation.UNASSIGNED_IMPLICIT_BYTE);
562 // Find or insert the node for each of the root CE's weights,
565 assert((ce & 0xc0) == 0);
566 int index = findOrInsertNodeForPrimary(ce >>> 32);
568 int lower32 = (int)ce;
610 /** Finds or inserts the node for a root CE's primary weight. */
662 // Find the root CE's weight for this level.
677 // Found the node for the root CE up to this level.
796 long ce = baseCEs.getCE(i);
797 if((ce >>> 32) != 0) {
799 int c = ((int)ce >> 14) & 3;
800 assert(c == 0 || c == 2); // lowercase or uppercase, no mixed case in any base CE
820 long ce = ces[i] & 0xffffffffffff3fffL; // clear old case bits
821 int strength = ceStrength(ce);
823 ce |= (cases & 3) << 14;
828 ce |= 0x8000;
832 // since currently only U+0345 is cased and maps to a secondary CE,
835 ces[i] = ce;
1180 // Gap at the beginning of the tertiary CE range.
1222 // Gap at the beginning of the secondary CE range.
1337 public long modifyCE(long ce) {
1338 if(CollationBuilder.isTempCE(ce)) {
1340 return finalCEs[CollationBuilder.indexFromTempCE(ce)] | (ce & 0xc000);
1359 * Encodes "temporary CE" data into a CE that fits into the CE32 data structure,
1361 * with valid CE byte values.
1373 // CE byte offsets, to ensure valid CE bytes, and case bits 11
1375 // index bits 19..13 -> primary byte 1 = CE bits 63..56 (byte values 40..BF)
1377 // index bits 12..6 -> primary byte 2 = CE bits 55..48 (byte values 40..BF)
1379 // index bits 5..0 -> secondary byte 1 = CE bits 31..24 (byte values 06..45)
1381 // strength bits 1..0 -> tertiary byte 1 = CE bits 13..8 (byte values 20..23)
1394 private static boolean isTempCE(long ce) {
1395 int sec = (int)ce >>> 24;
1412 private static int ceStrength(long ce) {
1414 isTempCE(ce) ? strengthFromTempCE(ce) :
1415 (ce & 0xff00000000000000L) != 0 ? Collator.PRIMARY :
1416 ((int)ce & 0xff000000) != 0 ? Collator.SECONDARY :
1417 ce != 0 ? Collator.TERTIARY :
1561 * A temporary CE in the ces[] array may point to a non-tailored reset-before-position node,