1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html#License
3/*
4*******************************************************************************
5* Copyright (C) 2012-2016, International Business Machines
6* Corporation and others.  All Rights Reserved.
7*******************************************************************************
8* CollationFCD.java, ported from collationfcd.h/.cpp
9*
10* C++ version created on: 2012aug18
11* created by: Markus W. Scherer
12*/
13
14package com.ibm.icu.impl.coll;
15
16import com.ibm.icu.text.UTF16;
17
18/**
19 * Data and functions for the FCD check fast path.
20 *
21 * The fast path looks at a pair of 16-bit code units and checks
22 * whether there is an FCD boundary between them;
23 * there is if the first unit has a trailing ccc=0 (!hasTccc(first))
24 * or the second unit has a leading ccc=0 (!hasLccc(second)),
25 * or both.
26 * When the fast path finds a possible non-boundary,
27 * then the FCD check slow path looks at the actual sequence of FCD values.
28 *
29 * This is a pure optimization.
30 * The fast path must at least find all possible non-boundaries.
31 * If the fast path is too pessimistic, it costs performance.
32 *
33 * For a pair of BMP characters, the fast path tests are precise (1 bit per character).
34 *
35 * For a supplementary code point, the two units are its lead and trail surrogates.
36 * We set hasTccc(lead)=true if any of its 1024 associated supplementary code points
37 * has lccc!=0 or tccc!=0.
38 * We set hasLccc(trail)=true for all trail surrogates.
39 * As a result, we leave the fast path if the lead surrogate might start a
40 * supplementary code point that is not FCD-inert.
41 * (So the fast path need not detect that there is a surrogate pair,
42 * nor look ahead to the next full code point.)
43 *
44 * hasLccc(lead)=true if any of its 1024 associated supplementary code points
45 * has lccc!=0, for fast boundary checking between BMP & supplementary.
46 *
47 * hasTccc(trail)=false:
48 * It should only be tested for unpaired trail surrogates which are FCD-inert.
49 */
50public final class CollationFCD {
51    public static boolean hasLccc(int c) {
52        assert c <= 0xffff;
53        // c can be negative, e.g., Collation.SENTINEL_CP from UCharIterator;
54        // that is handled in the first test.
55        int i;
56        return
57            // U+0300 is the first character with lccc!=0.
58            c >= 0x300 &&
59            (i = lcccIndex[c >> 5]) != 0 &&
60            (lcccBits[i] & (1 << (c & 0x1f))) != 0;
61    }
62
63    public static boolean hasTccc(int c) {
64        assert c <= 0xffff;
65        // c can be negative, e.g., Collation.SENTINEL_CP from UCharIterator;
66        // that is handled in the first test.
67        int i;
68        return
69            // U+00C0 is the first character with tccc!=0.
70            c >= 0xc0 &&
71            (i = tcccIndex[c >> 5]) != 0 &&
72            (tcccBits[i] & (1 << (c & 0x1f))) != 0;
73    }
74
75    static boolean mayHaveLccc(int c) {
76        // Handles all of Unicode 0..10FFFF.
77        // c can be negative, e.g., Collation.SENTINEL_CP.
78        // U+0300 is the first character with lccc!=0.
79        if(c < 0x300) { return false; }
80        if(c > 0xffff) { c = UTF16.getLeadSurrogate(c); }
81        int i;
82        return
83            (i = lcccIndex[c >> 5]) != 0 &&
84            (lcccBits[i] & (1 << (c & 0x1f))) != 0;
85    }
86
87    /**
88     * Tibetan composite vowel signs (U+0F73, U+0F75, U+0F81)
89     * must be decomposed before reaching the core collation code,
90     * or else some sequences including them, even ones passing the FCD check,
91     * do not yield canonically equivalent results.
92     *
93     * This is a fast and imprecise test.
94     *
95     * @param c a code point
96     * @return true if c is U+0F73, U+0F75 or U+0F81 or one of several other Tibetan characters
97     */
98    static boolean maybeTibetanCompositeVowel(int c) {
99        return (c & 0x1fff01) == 0xf01;
100    }
101
102    /**
103     * Tibetan composite vowel signs (U+0F73, U+0F75, U+0F81)
104     * must be decomposed before reaching the core collation code,
105     * or else some sequences including them, even ones passing the FCD check,
106     * do not yield canonically equivalent results.
107     *
108     * They have distinct lccc/tccc combinations: 129/130 or 129/132.
109     *
110     * @param fcd16 the FCD value (lccc/tccc combination) of a code point
111     * @return true if fcd16 is from U+0F73, U+0F75 or U+0F81
112     */
113    static boolean isFCD16OfTibetanCompositeVowel(int fcd16) {
114        return fcd16 == 0x8182 || fcd16 == 0x8184;
115    }
116
117    // CollationFCD();  // No instantiation.
118
119    // TODO: machine-generate by: icu/tools/unicode/c/genuca/genuca.cpp
120
121    private static final byte[] lcccIndex={
1220,0,0,0,0,0,0,0,0,0,0,0,0,0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2380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2390,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2410,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2450,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2470,0,0,0,0,0,0,0,0x43,0,0,0,0,0,0,0,
2480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2490,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0
250};
251
252    private static final byte[] tcccIndex={
2530,0,0,0,0,0,2,3,4,5,6,7,0,8,9,0xa,
2540xb,0xc,0,0,0,0,0,0,1,1,0xd,0xe,0xf,0x10,0x11,0,
2550x12,0x13,0x14,0x15,0x16,0,0x17,0x18,0,0,0,0,0x19,0x1a,0x1b,0,
2560x1c,0x1d,0x1e,0x1f,0,0,0x20,0x21,0x22,0x23,0x24,0,0,0,0,0x25,
2570x26,0x27,0x28,0,0,0,0x29,0x2a,0,0x2b,0x2c,0,0,0x2d,0x2e,0,
2580,0x2f,0x30,0,0,0x2d,0x31,0,0,0x2d,0x32,0,0,0,0x31,0,
2590,0,0x33,0,0,0x2d,0x31,0,0,0,0x31,0,0,0,0x34,0,
2600,0x35,0x36,0,0,0x37,0x36,0,0x37,0x38,0,0x39,0x3a,0,0x3b,0,
2610,0x3c,0,0,0x31,0,0,0,0,0,0,0,0,0,0,0,
2620,0,0,0,0,0,0,0,0,0,0x3d,0,0,0,0,0,
2630,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2640,0,0,0,0,0,0,0,0x3e,0x3e,0,0,0,0,0x3f,0,
2650,0,0,0,0,0x40,0,0,0,0x28,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,
3530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3540,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3570,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3590,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3610x71,0x72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3630,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3640,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3650,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3670,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3690,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3700,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3710,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3730,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3750,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3770,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3780,0,0,0,0,0,0,0,0x3d,0x73,0x74,0,0,0,0,0,
3790,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3800,0xe,0,0,0,0,0,0,0,0,0,0,0,0,0,0
381};
382
383    private static final int[] lcccBits={
3840,0xffffffff,0xffff7fff,0xffff,0xf8,0xfffe0000,0xbfffffff,0xb6,0x7ff0000,0xfffff800,0x10000,0x9fc00000,0x3d9f,0x20000,0xffff0000,0x7ff,
3850xff800,0xfbc00000,0x3eef,0xe000000,0xfff00000,0xfffffffb,0x10000000,0x1e2000,0x2000,0x602000,0x400,0x7000000,0xf00,0x3000000,0x2a00000,0x3c3e0000,
3860xdf,0x40,0x6800000,0xe0000000,0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0x3fff0000,0x10,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd,
3870xf83fffff,0x1fff0000,0x1ffe2,0x38000,0x80000000,0xfc00,0x6000000,0x3ff08000,0xc0000000,0x30000,0x3ffff,0x3800,0x80000,1,0xc19d0000,2,
3880x400000,0x40000b5,0x5108000,0x40000000
389};
390    private static final int[] tcccBits={
3910,0xffffffff,0x3e7effbf,0xbe7effbf,0xfffcffff,0x7ef1ff3f,0xfff3f1f8,0x7fffff3f,0x18003,0xdfffe000,0xff31ffcf,0xcfffffff,0xfffc0,0xffff7fff,0xffff,0x1d760,
3920x1fc00,0x187c00,0x200708b,0x2000000,0x708b0000,0xc00000,0xf8,0xfccf0006,0x33ffcfc,0xfffe0000,0xbfffffff,0xb6,0x7ff0000,0x7c,0xfffff800,0x10000,
3930x9fc80005,0x3d9f,0x20000,0xffff0000,0x7ff,0xff800,0xfbc00000,0x3eef,0xe000000,0xfff00000,0xfffffffb,0x10120200,0xff1e2000,0x10000000,0xb0002000,0x10480000,
3940x4e002000,0x2000,0x30002000,0x602100,0x24000400,0x7000000,0xf00,0x3000000,0x2a00000,0x3d7e0000,0xdf,0x40,0x6800000,0xe0000000,0x100000,0x20040000,
3950x200,0x1800000,0x9fe00001,0x3fff0000,0x10,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd,0xf83fffff,0xbffffff,0x3ffffff,0x3f3fffff,0xaaff3f3f,0x3fffffff,
3960x1fdfffff,0xefcfffde,0x1fdc7fff,0x1fff0000,0x1ffe2,0x800,0xc000000,0x4000,0xe000,0x1210,0x50,0x292,0x333e005,0x333,0xf000,0x3c0f,
3970x38000,0x80000000,0xfc00,0x55555000,0x36db02a5,0x46100000,0x47900000,0x3ff08000,0xc0000000,0x30000,0x3ffff,0x3800,0x80000,1,0xc19d0000,2,
3980x400000,0x40000b5,0x5108000,0x5f7ffc00,0x7fdb
399};
400
401}
402