/third_party/icu/icu4c/source/common/ |
H A D | utrie.cpp | 18 * This is a common implementation of a "folded" trie. 46 /* Building a trie ----------------------------------------------------------*/ 53 UNewTrie *trie; in utrie_open() local 63 trie=fillIn; in utrie_open() 65 trie=(UNewTrie *)uprv_malloc(sizeof(UNewTrie)); in utrie_open() 66 if(trie==NULL) { in utrie_open() 70 uprv_memset(trie, 0, sizeof(UNewTrie)); in utrie_open() 71 trie->isAllocated= (UBool)(fillIn==NULL); in utrie_open() 74 trie->data=aliasData; in utrie_open() 75 trie in utrie_open() 117 UNewTrie *trie; utrie_clone() local 153 utrie_close(UNewTrie *trie) utrie_close() argument 166 utrie_getData(UNewTrie *trie, int32_t *pLength) utrie_getData() argument 176 utrie_allocDataBlock(UNewTrie *trie) utrie_allocDataBlock() argument 196 utrie_getDataBlock(UNewTrie *trie, UChar32 c) utrie_getDataBlock() argument 222 utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value) utrie_set32() argument 240 utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero) utrie_get32() argument 284 utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, UBool overwrite) utrie_setRange32() argument 405 utrie_fold(UNewTrie *trie, UNewTrieGetFoldedValue *getFoldedValue, UErrorCode *pErrorCode) utrie_fold() argument 546 _findUnusedBlocks(UNewTrie *trie) _findUnusedBlocks() argument 590 utrie_compact(UNewTrie *trie, UBool overlap, UErrorCode *pErrorCode) utrie_compact() argument 721 defaultGetFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) defaultGetFoldedValue() argument 742 utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity, UNewTrieGetFoldedValue *getFoldedValue, UBool reduceTo16Bits, UErrorCode *pErrorCode) utrie_serialize() argument 857 utrie_unserialize(UTrie *trie, const void *data, int32_t length, UErrorCode *pErrorCode) utrie_unserialize() argument 932 utrie_unserializeDummy(UTrie *trie, void *data, int32_t length, uint32_t initialValue, uint32_t leadUnitValue, UBool make16BitTrie, UErrorCode *pErrorCode) utrie_unserializeDummy() argument 1059 utrie_enum(const UTrie *trie, UTrieEnumValue *enumValue, UTrieEnumRange *enumRange, const void *context) utrie_enum() argument [all...] |
H A D | utrie2_builder.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 49 * have been chosen to minimize trie sizes overall. 78 /* Building a trie ----------------------------------------------------------*/ 113 allocIndex2Block(UNewTrie2 *trie); 117 UTrie2 *trie; in utrie2_open() local 126 trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2)); in utrie2_open() 129 if(trie==NULL || newTrie==NULL || data==NULL) { in utrie2_open() 130 uprv_free(trie); in utrie2_open() 137 uprv_memset(trie, in utrie2_open() 250 UNewTrie2 *trie; cloneBuilder() local 300 UTrie2 *trie; utrie2_clone() local 345 UTrie2 *trie; global() member 369 countInitial(const UTrie2 *trie) countInitial() argument 386 utrie_printLengths(const UTrie *trie) utrie_printLengths() argument 395 utrie2_printLengths(const UTrie2 *trie, const char *which) utrie2_printLengths() argument 498 isInNullBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) isInNullBlock() argument 513 allocIndex2Block(UNewTrie2 *trie) allocIndex2Block() argument 532 getIndex2Block(UNewTrie2 *trie, UChar32 c, UBool forLSCP) getIndex2Block() argument 552 allocDataBlock(UNewTrie2 *trie, int32_t copyBlock) allocDataBlock() argument 598 releaseDataBlock(UNewTrie2 *trie, int32_t block) releaseDataBlock() argument 605 isWritableBlock(UNewTrie2 *trie, int32_t block) isWritableBlock() argument 610 setIndex2Entry(UNewTrie2 *trie, int32_t i2, int32_t block) setIndex2Entry() argument 627 getDataBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) getDataBlock() argument 655 set32(UNewTrie2 *trie, UChar32 c, UBool forLSCP, uint32_t value, UErrorCode *pErrorCode) set32() argument 678 utrie2_set32(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) utrie2_set32() argument 690 utrie2_set32ForLeadSurrogateCodeUnit(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) utrie2_set32ForLeadSurrogateCodeUnit() argument 737 utrie2_setRange32(UTrie2 *trie, UChar32 start, UChar32 end, uint32_t value, UBool overwrite, UErrorCode *pErrorCode) utrie2_setRange32() argument 944 findHighStart(UNewTrie2 *trie, uint32_t highValue) findHighStart() argument 1030 compactData(UNewTrie2 *trie) compactData() argument 1147 compactIndex2(UNewTrie2 *trie) compactIndex2() argument 1229 compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) compactTrie() argument 1306 utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) utrie2_freeze() argument [all...] |
H A D | utrie2.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 42 get32(const UNewTrie2 *trie, UChar32 c, UBool fromLSCP) { in get32() argument 45 if(c>=trie->highStart && (!U_IS_LEAD(c) || fromLSCP)) { in get32() 46 return trie->data[trie->dataLength-UTRIE2_DATA_GRANULARITY]; in get32() 53 i2=trie->index1[c>>UTRIE2_SHIFT_1]+ in get32() 56 block=trie->index2[i2]; in get32() 57 return trie->data[block+(c&UTRIE2_DATA_MASK)]; in get32() 61 utrie2_get32(const UTrie2 *trie, UChar3 argument 74 utrie2_get32FromLeadSurrogateCodeUnit(const UTrie2 *trie, UChar32 c) utrie2_get32FromLeadSurrogateCodeUnit() argument 88 u8Index(const UTrie2 *trie, UChar32 c, int32_t i) u8Index() argument 98 utrie2_internalU8NextIndex(const UTrie2 *trie, UChar32 c, const uint8_t *src, const uint8_t *limit) utrie2_internalU8NextIndex() argument 113 utrie2_internalU8PrevIndex(const UTrie2 *trie, UChar32 c, const uint8_t *start, const uint8_t *src) utrie2_internalU8PrevIndex() argument 137 UTrie2 *trie; utrie2_openFromSerialized() local 242 UTrie2 *trie; utrie2_openDummy() local 374 utrie2_close(UTrie2 *trie) utrie2_close() argument 391 utrie2_isFrozen(const UTrie2 *trie) utrie2_isFrozen() argument 396 utrie2_serialize(const UTrie2 *trie, void *data, int32_t capacity, UErrorCode *pErrorCode) utrie2_serialize() argument 443 enumEitherTrie(const UTrie2 *trie, UChar32 start, UChar32 limit, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) enumEitherTrie() argument 621 utrie2_enum(const UTrie2 *trie, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) utrie2_enum() argument 627 utrie2_enumForLeadSurrogate(const UTrie2 *trie, UChar32 lead, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) utrie2_enumForLeadSurrogate() argument [all...] |
H A D | ucptrie.cpp | 36 // Enough data for a trie header? in ucptrie_openFromBinary() 99 // Allocate the trie. in ucptrie_openFromBinary() 100 UCPTrie *trie = (UCPTrie *)uprv_malloc(sizeof(UCPTrie)); in ucptrie_openFromBinary() local 101 if (trie == nullptr) { in ucptrie_openFromBinary() 105 uprv_memcpy(trie, &tempTrie, sizeof(tempTrie)); in ucptrie_openFromBinary() 107 trie->name = "fromSerialized"; in ucptrie_openFromBinary() 112 trie->index = p16; in ucptrie_openFromBinary() 113 p16 += trie->indexLength; in ucptrie_openFromBinary() 116 int32_t nullValueOffset = trie->dataNullOffset; in ucptrie_openFromBinary() 117 if (nullValueOffset >= trie in ucptrie_openFromBinary() 146 ucptrie_close(UCPTrie *trie) ucptrie_close() argument 151 ucptrie_getType(const UCPTrie *trie) ucptrie_getType() argument 156 ucptrie_getValueWidth(const UCPTrie *trie) ucptrie_getValueWidth() argument 161 ucptrie_internalSmallIndex(const UCPTrie *trie, UChar32 c) ucptrie_internalSmallIndex() argument 188 ucptrie_internalSmallU8Index(const UCPTrie *trie, int32_t lt1, uint8_t t2, uint8_t t3) ucptrie_internalSmallU8Index() argument 198 ucptrie_internalU8PrevIndex(const UCPTrie *trie, UChar32 c, const uint8_t *start, const uint8_t *src) ucptrie_internalU8PrevIndex() argument 233 ucptrie_get(const UCPTrie *trie, UChar32 c) ucptrie_get() argument 264 const UCPTrie *trie = reinterpret_cast<const UCPTrie *>(t); getRange() local 415 ucptrie_internalGetRange(UCPTrieGetRange *getRange, const void *trie, UChar32 start, UCPMapRangeOption option, uint32_t surrogateValue, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) ucptrie_internalGetRange() argument 461 ucptrie_getRange(const UCPTrie *trie, UChar32 start, UCPMapRangeOption option, uint32_t surrogateValue, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) ucptrie_getRange() argument 470 ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *pErrorCode) ucptrie_toBinary() argument 545 countNull(const UCPTrie *trie) countNull() argument 573 ucptrie_printLengths(const UCPTrie *trie, const char *which) ucptrie_printLengths() argument [all...] |
H A D | utrie.h | 30 * This is a common implementation of a "folded" trie. 116 * Number of bytes for a dummy trie. 117 * A dummy trie is an empty runtime trie, used when a real data trie cannot 137 * @param data data value for a surrogate from the trie, including the folding offset 177 /** Internal trie getter from an offset (0 if c16 is a BMP/lead units) and a 16-bit unit */ 178 #define _UTRIE_GET_RAW(trie, data, offset, c16) \ 179 (trie)->data[ \ 180 ((int32_t)((trie) [all...] |
H A D | utrie2.h | 36 * This is a common implementation of a Unicode trie. 40 * This is the second common version of a Unicode trie (hence the name UTrie2). 84 * Open a frozen trie from its serialized from, stored in 32-bit-aligned memory. 86 * The memory must remain valid and unchanged as long as the trie is used. 87 * You must utrie2_close() the trie once you are done using it. 94 * @param pActualLength receives the actual number of bytes at data taken up by the trie data; 97 * @return the unserialized trie 108 * Open a frozen, empty "dummy" trie. 109 * A dummy trie is an empty trie, use 605 const UTrie2 *trie; global() member in UTrie2StringIterator [all...] |
/third_party/node/deps/icu-small/source/common/ |
H A D | utrie.cpp | 18 * This is a common implementation of a "folded" trie. 46 /* Building a trie ----------------------------------------------------------*/ 53 UNewTrie *trie; in utrie_open() local 63 trie=fillIn; in utrie_open() 65 trie=(UNewTrie *)uprv_malloc(sizeof(UNewTrie)); in utrie_open() 66 if(trie==nullptr) { in utrie_open() 70 uprv_memset(trie, 0, sizeof(UNewTrie)); in utrie_open() 71 trie->isAllocated= (UBool)(fillIn==nullptr); in utrie_open() 74 trie->data=aliasData; in utrie_open() 75 trie in utrie_open() 117 UNewTrie *trie; utrie_clone() local 153 utrie_close(UNewTrie *trie) utrie_close() argument 166 utrie_getData(UNewTrie *trie, int32_t *pLength) utrie_getData() argument 176 utrie_allocDataBlock(UNewTrie *trie) utrie_allocDataBlock() argument 196 utrie_getDataBlock(UNewTrie *trie, UChar32 c) utrie_getDataBlock() argument 222 utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value) utrie_set32() argument 240 utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero) utrie_get32() argument 284 utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, UBool overwrite) utrie_setRange32() argument 405 utrie_fold(UNewTrie *trie, UNewTrieGetFoldedValue *getFoldedValue, UErrorCode *pErrorCode) utrie_fold() argument 546 _findUnusedBlocks(UNewTrie *trie) _findUnusedBlocks() argument 590 utrie_compact(UNewTrie *trie, UBool overlap, UErrorCode *pErrorCode) utrie_compact() argument 721 defaultGetFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) defaultGetFoldedValue() argument 742 utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity, UNewTrieGetFoldedValue *getFoldedValue, UBool reduceTo16Bits, UErrorCode *pErrorCode) utrie_serialize() argument 857 utrie_unserialize(UTrie *trie, const void *data, int32_t length, UErrorCode *pErrorCode) utrie_unserialize() argument 932 utrie_unserializeDummy(UTrie *trie, void *data, int32_t length, uint32_t initialValue, uint32_t leadUnitValue, UBool make16BitTrie, UErrorCode *pErrorCode) utrie_unserializeDummy() argument 1059 utrie_enum(const UTrie *trie, UTrieEnumValue *enumValue, UTrieEnumRange *enumRange, const void *context) utrie_enum() argument [all...] |
H A D | utrie2_builder.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 49 * have been chosen to minimize trie sizes overall. 78 /* Building a trie ----------------------------------------------------------*/ 113 allocIndex2Block(UNewTrie2 *trie); 117 UTrie2 *trie; in utrie2_open() local 126 trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2)); in utrie2_open() 129 if(trie==nullptr || newTrie==nullptr || data==nullptr) { in utrie2_open() 130 uprv_free(trie); in utrie2_open() 137 uprv_memset(trie, in utrie2_open() 250 UNewTrie2 *trie; cloneBuilder() local 300 UTrie2 *trie; utrie2_clone() local 345 UTrie2 *trie; global() member 369 countInitial(const UTrie2 *trie) countInitial() argument 386 utrie_printLengths(const UTrie *trie) utrie_printLengths() argument 395 utrie2_printLengths(const UTrie2 *trie, const char *which) utrie2_printLengths() argument 498 isInNullBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) isInNullBlock() argument 513 allocIndex2Block(UNewTrie2 *trie) allocIndex2Block() argument 532 getIndex2Block(UNewTrie2 *trie, UChar32 c, UBool forLSCP) getIndex2Block() argument 552 allocDataBlock(UNewTrie2 *trie, int32_t copyBlock) allocDataBlock() argument 598 releaseDataBlock(UNewTrie2 *trie, int32_t block) releaseDataBlock() argument 605 isWritableBlock(UNewTrie2 *trie, int32_t block) isWritableBlock() argument 610 setIndex2Entry(UNewTrie2 *trie, int32_t i2, int32_t block) setIndex2Entry() argument 627 getDataBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) getDataBlock() argument 655 set32(UNewTrie2 *trie, UChar32 c, UBool forLSCP, uint32_t value, UErrorCode *pErrorCode) set32() argument 678 utrie2_set32(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) utrie2_set32() argument 690 utrie2_set32ForLeadSurrogateCodeUnit(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) utrie2_set32ForLeadSurrogateCodeUnit() argument 737 utrie2_setRange32(UTrie2 *trie, UChar32 start, UChar32 end, uint32_t value, UBool overwrite, UErrorCode *pErrorCode) utrie2_setRange32() argument 944 findHighStart(UNewTrie2 *trie, uint32_t highValue) findHighStart() argument 1030 compactData(UNewTrie2 *trie) compactData() argument 1147 compactIndex2(UNewTrie2 *trie) compactIndex2() argument 1229 compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) compactTrie() argument 1306 utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) utrie2_freeze() argument [all...] |
H A D | utrie2.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 42 get32(const UNewTrie2 *trie, UChar32 c, UBool fromLSCP) { in get32() argument 45 if(c>=trie->highStart && (!U_IS_LEAD(c) || fromLSCP)) { in get32() 46 return trie->data[trie->dataLength-UTRIE2_DATA_GRANULARITY]; in get32() 53 i2=trie->index1[c>>UTRIE2_SHIFT_1]+ in get32() 56 block=trie->index2[i2]; in get32() 57 return trie->data[block+(c&UTRIE2_DATA_MASK)]; in get32() 61 utrie2_get32(const UTrie2 *trie, UChar3 argument 74 utrie2_get32FromLeadSurrogateCodeUnit(const UTrie2 *trie, UChar32 c) utrie2_get32FromLeadSurrogateCodeUnit() argument 88 u8Index(const UTrie2 *trie, UChar32 c, int32_t i) u8Index() argument 98 utrie2_internalU8NextIndex(const UTrie2 *trie, UChar32 c, const uint8_t *src, const uint8_t *limit) utrie2_internalU8NextIndex() argument 113 utrie2_internalU8PrevIndex(const UTrie2 *trie, UChar32 c, const uint8_t *start, const uint8_t *src) utrie2_internalU8PrevIndex() argument 137 UTrie2 *trie; utrie2_openFromSerialized() local 242 UTrie2 *trie; utrie2_openDummy() local 374 utrie2_close(UTrie2 *trie) utrie2_close() argument 391 utrie2_isFrozen(const UTrie2 *trie) utrie2_isFrozen() argument 396 utrie2_serialize(const UTrie2 *trie, void *data, int32_t capacity, UErrorCode *pErrorCode) utrie2_serialize() argument 443 enumEitherTrie(const UTrie2 *trie, UChar32 start, UChar32 limit, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) enumEitherTrie() argument 621 utrie2_enum(const UTrie2 *trie, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) utrie2_enum() argument 627 utrie2_enumForLeadSurrogate(const UTrie2 *trie, UChar32 lead, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) utrie2_enumForLeadSurrogate() argument [all...] |
H A D | ucptrie.cpp | 36 // Enough data for a trie header? in ucptrie_openFromBinary() 99 // Allocate the trie. in ucptrie_openFromBinary() 100 UCPTrie *trie = (UCPTrie *)uprv_malloc(sizeof(UCPTrie)); in ucptrie_openFromBinary() local 101 if (trie == nullptr) { in ucptrie_openFromBinary() 105 uprv_memcpy(trie, &tempTrie, sizeof(tempTrie)); in ucptrie_openFromBinary() 107 trie->name = "fromSerialized"; in ucptrie_openFromBinary() 112 trie->index = p16; in ucptrie_openFromBinary() 113 p16 += trie->indexLength; in ucptrie_openFromBinary() 116 int32_t nullValueOffset = trie->dataNullOffset; in ucptrie_openFromBinary() 117 if (nullValueOffset >= trie in ucptrie_openFromBinary() 146 ucptrie_close(UCPTrie *trie) ucptrie_close() argument 151 ucptrie_getType(const UCPTrie *trie) ucptrie_getType() argument 156 ucptrie_getValueWidth(const UCPTrie *trie) ucptrie_getValueWidth() argument 161 ucptrie_internalSmallIndex(const UCPTrie *trie, UChar32 c) ucptrie_internalSmallIndex() argument 188 ucptrie_internalSmallU8Index(const UCPTrie *trie, int32_t lt1, uint8_t t2, uint8_t t3) ucptrie_internalSmallU8Index() argument 198 ucptrie_internalU8PrevIndex(const UCPTrie *trie, UChar32 c, const uint8_t *start, const uint8_t *src) ucptrie_internalU8PrevIndex() argument 233 ucptrie_get(const UCPTrie *trie, UChar32 c) ucptrie_get() argument 264 const UCPTrie *trie = reinterpret_cast<const UCPTrie *>(t); getRange() local 415 ucptrie_internalGetRange(UCPTrieGetRange *getRange, const void *trie, UChar32 start, UCPMapRangeOption option, uint32_t surrogateValue, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) ucptrie_internalGetRange() argument 461 ucptrie_getRange(const UCPTrie *trie, UChar32 start, UCPMapRangeOption option, uint32_t surrogateValue, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) ucptrie_getRange() argument 470 ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *pErrorCode) ucptrie_toBinary() argument 545 countNull(const UCPTrie *trie) countNull() argument 573 ucptrie_printLengths(const UCPTrie *trie, const char *which) ucptrie_printLengths() argument [all...] |
H A D | utrie.h | 30 * This is a common implementation of a "folded" trie. 116 * Number of bytes for a dummy trie. 117 * A dummy trie is an empty runtime trie, used when a real data trie cannot 137 * @param data data value for a surrogate from the trie, including the folding offset 177 /** Internal trie getter from an offset (0 if c16 is a BMP/lead units) and a 16-bit unit */ 178 #define _UTRIE_GET_RAW(trie, data, offset, c16) \ 179 (trie)->data[ \ 180 ((int32_t)((trie) [all...] |
/third_party/skia/third_party/externals/icu/source/common/ |
H A D | utrie.cpp | 18 * This is a common implementation of a "folded" trie. 46 /* Building a trie ----------------------------------------------------------*/ 53 UNewTrie *trie; in utrie_open() local 63 trie=fillIn; in utrie_open() 65 trie=(UNewTrie *)uprv_malloc(sizeof(UNewTrie)); in utrie_open() 66 if(trie==NULL) { in utrie_open() 70 uprv_memset(trie, 0, sizeof(UNewTrie)); in utrie_open() 71 trie->isAllocated= (UBool)(fillIn==NULL); in utrie_open() 74 trie->data=aliasData; in utrie_open() 75 trie in utrie_open() 117 UNewTrie *trie; utrie_clone() local 153 utrie_close(UNewTrie *trie) utrie_close() argument 166 utrie_getData(UNewTrie *trie, int32_t *pLength) utrie_getData() argument 176 utrie_allocDataBlock(UNewTrie *trie) utrie_allocDataBlock() argument 196 utrie_getDataBlock(UNewTrie *trie, UChar32 c) utrie_getDataBlock() argument 222 utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value) utrie_set32() argument 240 utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero) utrie_get32() argument 284 utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, UBool overwrite) utrie_setRange32() argument 405 utrie_fold(UNewTrie *trie, UNewTrieGetFoldedValue *getFoldedValue, UErrorCode *pErrorCode) utrie_fold() argument 546 _findUnusedBlocks(UNewTrie *trie) _findUnusedBlocks() argument 590 utrie_compact(UNewTrie *trie, UBool overlap, UErrorCode *pErrorCode) utrie_compact() argument 721 defaultGetFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) defaultGetFoldedValue() argument 742 utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity, UNewTrieGetFoldedValue *getFoldedValue, UBool reduceTo16Bits, UErrorCode *pErrorCode) utrie_serialize() argument 857 utrie_unserialize(UTrie *trie, const void *data, int32_t length, UErrorCode *pErrorCode) utrie_unserialize() argument 932 utrie_unserializeDummy(UTrie *trie, void *data, int32_t length, uint32_t initialValue, uint32_t leadUnitValue, UBool make16BitTrie, UErrorCode *pErrorCode) utrie_unserializeDummy() argument 1059 utrie_enum(const UTrie *trie, UTrieEnumValue *enumValue, UTrieEnumRange *enumRange, const void *context) utrie_enum() argument [all...] |
H A D | utrie2_builder.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 49 * have been chosen to minimize trie sizes overall. 78 /* Building a trie ----------------------------------------------------------*/ 113 allocIndex2Block(UNewTrie2 *trie); 117 UTrie2 *trie; in utrie2_open() local 126 trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2)); in utrie2_open() 129 if(trie==NULL || newTrie==NULL || data==NULL) { in utrie2_open() 130 uprv_free(trie); in utrie2_open() 137 uprv_memset(trie, in utrie2_open() 250 UNewTrie2 *trie; cloneBuilder() local 300 UTrie2 *trie; utrie2_clone() local 345 UTrie2 *trie; global() member 369 countInitial(const UTrie2 *trie) countInitial() argument 386 utrie_printLengths(const UTrie *trie) utrie_printLengths() argument 395 utrie2_printLengths(const UTrie2 *trie, const char *which) utrie2_printLengths() argument 498 isInNullBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) isInNullBlock() argument 513 allocIndex2Block(UNewTrie2 *trie) allocIndex2Block() argument 532 getIndex2Block(UNewTrie2 *trie, UChar32 c, UBool forLSCP) getIndex2Block() argument 552 allocDataBlock(UNewTrie2 *trie, int32_t copyBlock) allocDataBlock() argument 598 releaseDataBlock(UNewTrie2 *trie, int32_t block) releaseDataBlock() argument 605 isWritableBlock(UNewTrie2 *trie, int32_t block) isWritableBlock() argument 610 setIndex2Entry(UNewTrie2 *trie, int32_t i2, int32_t block) setIndex2Entry() argument 627 getDataBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) getDataBlock() argument 655 set32(UNewTrie2 *trie, UChar32 c, UBool forLSCP, uint32_t value, UErrorCode *pErrorCode) set32() argument 678 utrie2_set32(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) utrie2_set32() argument 690 utrie2_set32ForLeadSurrogateCodeUnit(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) utrie2_set32ForLeadSurrogateCodeUnit() argument 737 utrie2_setRange32(UTrie2 *trie, UChar32 start, UChar32 end, uint32_t value, UBool overwrite, UErrorCode *pErrorCode) utrie2_setRange32() argument 944 findHighStart(UNewTrie2 *trie, uint32_t highValue) findHighStart() argument 1030 compactData(UNewTrie2 *trie) compactData() argument 1147 compactIndex2(UNewTrie2 *trie) compactIndex2() argument 1229 compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) compactTrie() argument 1306 utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) utrie2_freeze() argument [all...] |
H A D | utrie2.cpp | 18 * This is a common implementation of a Unicode trie. 21 * This is the second common version of a Unicode trie (hence the name UTrie2). 42 get32(const UNewTrie2 *trie, UChar32 c, UBool fromLSCP) { in get32() argument 45 if(c>=trie->highStart && (!U_IS_LEAD(c) || fromLSCP)) { in get32() 46 return trie->data[trie->dataLength-UTRIE2_DATA_GRANULARITY]; in get32() 53 i2=trie->index1[c>>UTRIE2_SHIFT_1]+ in get32() 56 block=trie->index2[i2]; in get32() 57 return trie->data[block+(c&UTRIE2_DATA_MASK)]; in get32() 61 utrie2_get32(const UTrie2 *trie, UChar3 argument 74 utrie2_get32FromLeadSurrogateCodeUnit(const UTrie2 *trie, UChar32 c) utrie2_get32FromLeadSurrogateCodeUnit() argument 88 u8Index(const UTrie2 *trie, UChar32 c, int32_t i) u8Index() argument 98 utrie2_internalU8NextIndex(const UTrie2 *trie, UChar32 c, const uint8_t *src, const uint8_t *limit) utrie2_internalU8NextIndex() argument 113 utrie2_internalU8PrevIndex(const UTrie2 *trie, UChar32 c, const uint8_t *start, const uint8_t *src) utrie2_internalU8PrevIndex() argument 137 UTrie2 *trie; utrie2_openFromSerialized() local 242 UTrie2 *trie; utrie2_openDummy() local 374 utrie2_close(UTrie2 *trie) utrie2_close() argument 391 utrie2_isFrozen(const UTrie2 *trie) utrie2_isFrozen() argument 396 utrie2_serialize(const UTrie2 *trie, void *data, int32_t capacity, UErrorCode *pErrorCode) utrie2_serialize() argument 443 enumEitherTrie(const UTrie2 *trie, UChar32 start, UChar32 limit, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) enumEitherTrie() argument 621 utrie2_enum(const UTrie2 *trie, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) utrie2_enum() argument 627 utrie2_enumForLeadSurrogate(const UTrie2 *trie, UChar32 lead, UTrie2EnumValue *enumValue, UTrie2EnumRange *enumRange, const void *context) utrie2_enumForLeadSurrogate() argument [all...] |
H A D | ucptrie.cpp | 36 // Enough data for a trie header? in ucptrie_openFromBinary() 99 // Allocate the trie. in ucptrie_openFromBinary() 100 UCPTrie *trie = (UCPTrie *)uprv_malloc(sizeof(UCPTrie)); in ucptrie_openFromBinary() local 101 if (trie == nullptr) { in ucptrie_openFromBinary() 105 uprv_memcpy(trie, &tempTrie, sizeof(tempTrie)); in ucptrie_openFromBinary() 107 trie->name = "fromSerialized"; in ucptrie_openFromBinary() 112 trie->index = p16; in ucptrie_openFromBinary() 113 p16 += trie->indexLength; in ucptrie_openFromBinary() 116 int32_t nullValueOffset = trie->dataNullOffset; in ucptrie_openFromBinary() 117 if (nullValueOffset >= trie in ucptrie_openFromBinary() 146 ucptrie_close(UCPTrie *trie) ucptrie_close() argument 151 ucptrie_getType(const UCPTrie *trie) ucptrie_getType() argument 156 ucptrie_getValueWidth(const UCPTrie *trie) ucptrie_getValueWidth() argument 161 ucptrie_internalSmallIndex(const UCPTrie *trie, UChar32 c) ucptrie_internalSmallIndex() argument 188 ucptrie_internalSmallU8Index(const UCPTrie *trie, int32_t lt1, uint8_t t2, uint8_t t3) ucptrie_internalSmallU8Index() argument 198 ucptrie_internalU8PrevIndex(const UCPTrie *trie, UChar32 c, const uint8_t *start, const uint8_t *src) ucptrie_internalU8PrevIndex() argument 233 ucptrie_get(const UCPTrie *trie, UChar32 c) ucptrie_get() argument 264 const UCPTrie *trie = reinterpret_cast<const UCPTrie *>(t); getRange() local 415 ucptrie_internalGetRange(UCPTrieGetRange *getRange, const void *trie, UChar32 start, UCPMapRangeOption option, uint32_t surrogateValue, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) ucptrie_internalGetRange() argument 461 ucptrie_getRange(const UCPTrie *trie, UChar32 start, UCPMapRangeOption option, uint32_t surrogateValue, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) ucptrie_getRange() argument 470 ucptrie_toBinary(const UCPTrie *trie, void *data, int32_t capacity, UErrorCode *pErrorCode) ucptrie_toBinary() argument 545 countNull(const UCPTrie *trie) countNull() argument 573 ucptrie_printLengths(const UCPTrie *trie, const char *which) ucptrie_printLengths() argument [all...] |
H A D | utrie.h | 30 * This is a common implementation of a "folded" trie. 116 * Number of bytes for a dummy trie. 117 * A dummy trie is an empty runtime trie, used when a real data trie cannot 137 * @param data data value for a surrogate from the trie, including the folding offset 177 /** Internal trie getter from an offset (0 if c16 is a BMP/lead units) and a 16-bit unit */ 178 #define _UTRIE_GET_RAW(trie, data, offset, c16) \ 179 (trie)->data[ \ 180 ((int32_t)((trie) [all...] |
/third_party/icu/icu4c/source/test/intltest/ |
H A D | bytestrietest.cpp | 65 void checkFirst(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 66 void checkNext(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 67 void checkNextWithState(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 68 void checkNextWithState64(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 69 void checkNextString(BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 70 void checkIterator(const BytesTrie &trie, const StringAndValue data[], int32_t dataLength); 313 LocalPointer<BytesTrie> trie(buildMonthsTrie(USTRINGTRIE_BUILD_FAST)); in TestHasUniqueValue() 314 if(trie.isNull()) { in TestHasUniqueValue() 318 if(trie->hasUniqueValue(uniqueValue)) { in TestHasUniqueValue() 321 trie in TestHasUniqueValue() 711 checkFirst(BytesTrie &trie, const StringAndValue data[], int32_t dataLength) checkFirst() argument 733 checkNext(BytesTrie &trie, const StringAndValue data[], int32_t dataLength) checkNext() argument 813 checkNextWithState(BytesTrie &trie, const StringAndValue data[], int32_t dataLength) checkNextWithState() argument 871 checkNextWithState64(BytesTrie &trie, const StringAndValue data[], int32_t dataLength) checkNextWithState64() argument 928 checkNextString(BytesTrie &trie, const StringAndValue data[], int32_t dataLength) checkNextString() argument 945 checkIterator(const BytesTrie &trie, const StringAndValue data[], int32_t dataLength) checkIterator() argument [all...] |
H A D | ucharstrietest.cpp | 71 void checkFirst(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 72 void checkNext(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 73 void checkNextWithState(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 74 void checkNextWithState64(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 75 void checkNextString(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 76 void checkIterator(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength); 299 LocalPointer<UCharsTrie> trie(buildTrie(data, UPRV_LENGTHOF(data), USTRINGTRIE_BUILD_FAST)); in TestNextForCodePoint() 300 if(trie.isNull()) { in TestNextForCodePoint() 304 if( (result=trie->nextForCodePoint(0x4dff))!=USTRINGTRIE_NO_VALUE || result!=trie in TestNextForCodePoint() 822 checkFirst(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength) checkFirst() argument 860 checkNext(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength) checkNext() argument 934 checkNextWithState(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength) checkNextWithState() argument 992 checkNextWithState64(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength) checkNextWithState64() argument 1049 checkNextString(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength) checkNextString() argument 1067 checkIterator(UCharsTrie &trie, const StringAndValue data[], int32_t dataLength) checkIterator() argument [all...] |
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/ |
H A D | BytesTrieTest.java | 268 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test40GetUniqueValue() 270 if((uniqueValue=trie.getUniqueValue())!=0) { in Test40GetUniqueValue() 273 trie.next('j'); in Test40GetUniqueValue() 274 trie.next('a'); in Test40GetUniqueValue() 275 trie.next('n'); in Test40GetUniqueValue() 277 if((uniqueValue=trie.getUniqueValue())!=((1<<1)|1)) { in Test40GetUniqueValue() 280 trie.first('j'); in Test40GetUniqueValue() 281 trie.next('u'); in Test40GetUniqueValue() 282 if((uniqueValue=trie.getUniqueValue())!=0) { in Test40GetUniqueValue() 285 if(trie in Test40GetUniqueValue() 598 checkFirst(BytesTrie trie, StringAndValue data[], int dataLength) checkFirst() argument 620 checkNext(BytesTrie trie, StringAndValue data[], int dataLength) checkNext() argument 691 checkNextWithState(BytesTrie trie, StringAndValue data[], int dataLength) checkNextWithState() argument 746 checkNextWithState64(BytesTrie trie, StringAndValue data[], int dataLength) checkNextWithState64() argument 796 checkNextString(BytesTrie trie, StringAndValue data[], int dataLength) checkNextString() argument 813 checkIterator(BytesTrie trie, StringAndValue data[], int dataLength) checkIterator() argument [all...] |
H A D | CharsTrieTest.java | 247 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); in Test32NextForCodePoint() 249 if( (result=trie.nextForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 250 (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 251 (result=trie.nextForCodePoint(0x9999))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 252 (result=trie.nextForCodePoint(0x20000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 253 (result=trie in Test32NextForCodePoint() 725 checkFirst(CharsTrie trie, StringAndValue[] data, int dataLength) checkFirst() argument 762 checkNext(CharsTrie trie, StringAndValue[] data, int dataLength) checkNext() argument 837 checkNextWithState(CharsTrie trie, StringAndValue[] data, int dataLength) checkNextWithState() argument 892 checkNextWithState64(CharsTrie trie, StringAndValue[] data, int dataLength) checkNextWithState64() argument 942 checkNextString(CharsTrie trie, StringAndValue[] data, int dataLength) checkNextString() argument 959 checkIterator(CharsTrie trie, StringAndValue[] data, int dataLength) checkIterator() argument [all...] |
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ |
H A D | BytesTrieTest.java | 266 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test40GetUniqueValue() 268 if((uniqueValue=trie.getUniqueValue())!=0) { in Test40GetUniqueValue() 271 trie.next('j'); in Test40GetUniqueValue() 272 trie.next('a'); in Test40GetUniqueValue() 273 trie.next('n'); in Test40GetUniqueValue() 275 if((uniqueValue=trie.getUniqueValue())!=((1<<1)|1)) { in Test40GetUniqueValue() 278 trie.first('j'); in Test40GetUniqueValue() 279 trie.next('u'); in Test40GetUniqueValue() 280 if((uniqueValue=trie.getUniqueValue())!=0) { in Test40GetUniqueValue() 283 if(trie in Test40GetUniqueValue() 632 checkFirst(BytesTrie trie, StringAndValue data[], int dataLength) checkFirst() argument 654 checkNext(BytesTrie trie, StringAndValue data[], int dataLength) checkNext() argument 725 checkNextWithState(BytesTrie trie, StringAndValue data[], int dataLength) checkNextWithState() argument 780 checkNextWithState64(BytesTrie trie, StringAndValue data[], int dataLength) checkNextWithState64() argument 830 checkNextString(BytesTrie trie, StringAndValue data[], int dataLength) checkNextString() argument 847 checkIterator(BytesTrie trie, StringAndValue data[], int dataLength) checkIterator() argument [all...] |
H A D | CharsTrieTest.java | 244 CharsTrie trie=buildTrie(data, data.length, StringTrieBuilder.Option.FAST); in Test32NextForCodePoint() 246 if( (result=trie.nextForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 247 (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 248 (result=trie.nextForCodePoint(0x9999))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 249 (result=trie.nextForCodePoint(0x20000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint() 250 (result=trie in Test32NextForCodePoint() 722 checkFirst(CharsTrie trie, StringAndValue[] data, int dataLength) checkFirst() argument 759 checkNext(CharsTrie trie, StringAndValue[] data, int dataLength) checkNext() argument 834 checkNextWithState(CharsTrie trie, StringAndValue[] data, int dataLength) checkNextWithState() argument 889 checkNextWithState64(CharsTrie trie, StringAndValue[] data, int dataLength) checkNextWithState64() argument 939 checkNextString(CharsTrie trie, StringAndValue[] data, int dataLength) checkNextString() argument 956 checkIterator(CharsTrie trie, StringAndValue[] data, int dataLength) checkIterator() argument [all...] |
/third_party/icu/icu4c/source/common/unicode/ |
H A D | ucptrie.h | 22 * \brief C API: This file defines an immutable Unicode code point trie. 43 * Immutable Unicode code point trie structure. 48 * Functions are easy to use: They support all trie types and value widths. 157 * The trie stores 16 bits per data value. 163 * The trie stores 32 bits per data value. 168 * The trie stores 8 bits per data value. 179 * Opens a trie from its binary form, stored in 32-bit-aligned memory. 182 * The memory must remain valid and unchanged as long as the trie is used. 183 * You must ucptrie_close() the trie once you are done using it. 185 * @param type selects the trie typ [all...] |
/third_party/node/deps/icu-small/source/common/unicode/ |
H A D | ucptrie.h | 22 * \brief C API: This file defines an immutable Unicode code point trie. 43 * Immutable Unicode code point trie structure. 48 * Functions are easy to use: They support all trie types and value widths. 157 * The trie stores 16 bits per data value. 163 * The trie stores 32 bits per data value. 168 * The trie stores 8 bits per data value. 179 * Opens a trie from its binary form, stored in 32-bit-aligned memory. 182 * The memory must remain valid and unchanged as long as the trie is used. 183 * You must ucptrie_close() the trie once you are done using it. 185 * @param type selects the trie typ [all...] |
/third_party/skia/third_party/externals/icu/source/common/unicode/ |
H A D | ucptrie.h | 23 * This file defines an immutable Unicode code point trie. 44 * Immutable Unicode code point trie structure. 49 * Functions are easy to use: They support all trie types and value widths. 158 * The trie stores 16 bits per data value. 164 * The trie stores 32 bits per data value. 169 * The trie stores 8 bits per data value. 180 * Opens a trie from its binary form, stored in 32-bit-aligned memory. 183 * The memory must remain valid and unchanged as long as the trie is used. 184 * You must ucptrie_close() the trie once you are done using it. 186 * @param type selects the trie typ [all...] |