Home | History | Annotate | Download | only in coll

Lines Matching refs:ce

141         // Find or insert a node whose index we will put into a temporary CE.
158 // We do not support tailoring to an unassigned-implicit CE.
230 // Strength of the temporary CE = strength of its reset position.
243 // Collect the root CE weights if this node is for a root CE.
244 // If it is not, then return the low non-primary boundary for a tailored CE.
271 // [p, s, t] is a root CE. Return the preceding weight for the requested level.
285 long ce;
312 ce = rootElements.getLastTertiaryCE();
335 ce = rootElements.getFirstSecondaryCE();
340 ce = rootElements.getLastSecondaryCE();
344 ce = rootElements.getFirstPrimaryCE();
348 ce = rootElements.lastCEWithPrimaryBefore(variableTop + 1);
351 ce
355 // Use the Hani-first-primary rather than the actual last "regular" CE before it,
358 ce = rootElements.firstCEWithPrimaryAtLeast(
362 ce = baseData.getSingleCE(0x4e00);
365 // We do not support tailoring to an unassigned-implicit CE.
369 ce = Collation.makeCE(Collation.FIRST_TRAILING_PRIMARY);
379 int index = findOrInsertNodeForRootCE(ce, strength);
386 // Find the first character tailored after the boundary CE,
387 // or the first real root CE after it.
394 ce = tempCEFromIndexAndStrength(index, strength);
397 long p = ce >>> 32;
401 ce = Collation.makeCE(p);
402 index = findOrInsertNodeForRootCE(ce, Collator.PRIMARY);
416 ce = tempCEFromIndexAndStrength(index, strength);
430 // Do not make a temporary CE for a root node.
431 // This last node might be the node for the root CE itself,
434 ce = tempCEFromIndexAndStrength(index, strength);
437 return ce;
484 long ce = ces[cesLength - 1];
485 if(strength == Collator.PRIMARY && !isTempCE(ce) && (ce >>> 32) == 0) {
490 if(strength == Collator.QUATERNARY && ce == 0) {
491 // The CE data structure does not support non-zero quaternary weights
498 // Strength of the temporary CE:
499 // The new relation may yield a stronger CE but not a weaker one.
500 int tempStrength = ceStrength(ce);
530 * for the CE + strength.
535 // Find the last CE that is at least as "strong" as the requested difference.
537 long ce;
540 ce = ces[0] = 0;
544 ce = ces[cesLength - 1];
546 if(ceStrength(ce) <= strength) { break; }
549 if(isTempCE(ce)) {
552 return indexFromTempCE(ce);
555 // root CE
556 if((int)(ce >>> 56) == Collation.UNASSIGNED_IMPLICIT_BYTE) {
560 return findOrInsertNodeForRootCE(ce, strength);
563 private int findOrInsertNodeForRootCE(long ce, int strength) {
564 assert((int)(ce >>> 56) != Collation.UNASSIGNED_IMPLICIT_BYTE);
566 // Find or insert the node for each of the root CE's weights,
569 assert((ce & 0xc0) == 0);
570 int index = findOrInsertNodeForPrimary(ce >>> 32);
572 int lower32 = (int)ce;
614 /** Finds or inserts the node for a root CE's primary weight. */
666 // Find the root CE's weight for this level.
681 // Found the node for the root CE up to this level.
800 long ce = baseCEs.getCE(i);
801 if((ce >>> 32) != 0) {
803 int c = ((int)ce >> 14) & 3;
804 assert(c == 0 || c == 2); // lowercase or uppercase, no mixed case in any base CE
824 long ce = ces[i] & 0xffffffffffff3fffL; // clear old case bits
825 int strength = ceStrength(ce);
827 ce |= (cases & 3) << 14;
832 ce |= 0x8000;
836 // since currently only U+0345 is cased and maps to a secondary CE,
839 ces[i] = ce;
1184 // Gap at the beginning of the tertiary CE range.
1226 // Gap at the beginning of the secondary CE range.
1341 public long modifyCE(long ce) {
1342 if(CollationBuilder.isTempCE(ce)) {
1344 return finalCEs[CollationBuilder.indexFromTempCE(ce)] | (ce & 0xc000);
1363 * Encodes "temporary CE" data into a CE that fits into the CE32 data structure,
1365 * with valid CE byte values.
1377 // CE byte offsets, to ensure valid CE bytes, and case bits 11
1379 // index bits 19..13 -> primary byte 1 = CE bits 63..56 (byte values 40..BF)
1381 // index bits 12..6 -> primary byte 2 = CE bits 55..48 (byte values 40..BF)
1383 // index bits 5..0 -> secondary byte 1 = CE bits 31..24 (byte values 06..45)
1385 // strength bits 1..0 -> tertiary byte 1 = CE bits 13..8 (byte values 20..23)
1398 private static boolean isTempCE(long ce) {
1399 int sec = (int)ce >>> 24;
1416 private static int ceStrength(long ce) {
1418 isTempCE(ce) ? strengthFromTempCE(ce) :
1419 (ce & 0xff00000000000000L) != 0 ? Collator.PRIMARY :
1420 ((int)ce & 0xff000000) != 0 ? Collator.SECONDARY :
1421 ce != 0 ? Collator.TERTIARY :
1565 * A temporary CE in the ces[] array may point to a non-tailored reset-before-position node,