Lines Matching refs:newTrie
118 UNewTrie2 *newTrie; in utrie2_open() local
127 newTrie=(UNewTrie2 *)uprv_malloc(sizeof(UNewTrie2)); in utrie2_open()
129 if(trie==NULL || newTrie==NULL || data==NULL) { in utrie2_open()
131 uprv_free(newTrie); in utrie2_open()
141 trie->newTrie=newTrie; in utrie2_open()
146 newTrie->data=data; in utrie2_open()
148 newTrie->t3=umutablecptrie_open(initialValue, errorValue, pErrorCode); in utrie2_open()
150 newTrie->dataCapacity=UNEWTRIE2_INITIAL_DATA_LENGTH; in utrie2_open()
151 newTrie->initialValue=initialValue; in utrie2_open()
152 newTrie->errorValue=errorValue; in utrie2_open()
153 newTrie->highStart=0x110000; in utrie2_open()
154 newTrie->firstFreeBlock=0; /* no free block in the list */ in utrie2_open()
155 newTrie->isCompacted=FALSE; in utrie2_open()
164 newTrie->data[i]=initialValue; in utrie2_open()
167 newTrie->data[i]=errorValue; in utrie2_open()
170 newTrie->data[i]=initialValue; in utrie2_open()
172 newTrie->dataNullOffset=UNEWTRIE2_DATA_NULL_OFFSET; in utrie2_open()
173 newTrie->dataLength=UNEWTRIE2_DATA_START_OFFSET; in utrie2_open()
177 newTrie->index2[i]=j; in utrie2_open()
178 newTrie->map[i]=1; in utrie2_open()
182 newTrie->map[i]=0; in utrie2_open()
190 newTrie->map[i++]= in utrie2_open()
197 newTrie->map[i]=0; in utrie2_open()
205 newTrie->index2[i]=UNEWTRIE2_DATA_NULL_OFFSET; in utrie2_open()
213 newTrie->index2[UNEWTRIE2_INDEX_GAP_OFFSET+i]=-1; in utrie2_open()
218 newTrie->index2[UNEWTRIE2_INDEX_2_NULL_OFFSET+i]=UNEWTRIE2_DATA_NULL_OFFSET; in utrie2_open()
220 newTrie->index2NullOffset=UNEWTRIE2_INDEX_2_NULL_OFFSET; in utrie2_open()
221 newTrie->index2Length=UNEWTRIE2_INDEX_2_START_OFFSET; in utrie2_open()
228 newTrie->index1[i]=j; in utrie2_open()
233 newTrie->index1[i]=UNEWTRIE2_INDEX_2_NULL_OFFSET; in utrie2_open()
305 if(other==NULL || (other->memory==NULL && other->newTrie==NULL)) { in utrie2_clone()
333 trie->newTrie=cloneBuilder(other->newTrie); in utrie2_clone()
336 if(trie->memory==NULL && trie->newTrie==NULL) { in utrie2_clone()
412 if(other==NULL || (other->memory==NULL && other->newTrie==NULL)) { in utrie2_cloneAsThawed()
416 if(other->newTrie!=NULL && !other->newTrie->isCompacted) { in utrie2_cloneAsThawed()
686 set32(trie->newTrie, c, TRUE, value, pErrorCode); in utrie2_set32()
700 set32(trie->newTrie, c, FALSE, value, pErrorCode); in utrie2_set32ForLeadSurrogateCodeUnit()
746 UNewTrie2 *newTrie; in utrie2_setRange32() local
757 newTrie=trie->newTrie; in utrie2_setRange32()
758 if(newTrie==NULL || newTrie->isCompacted) { in utrie2_setRange32()
763 umutablecptrie_setRange(newTrie->t3, start, end, value, pErrorCode); in utrie2_setRange32()
765 if(!overwrite && value==newTrie->initialValue) { in utrie2_setRange32()
774 block=getDataBlock(newTrie, start, TRUE); in utrie2_setRange32()
782 fillBlock(newTrie->data+block, start&UTRIE2_DATA_MASK, UTRIE2_DATA_BLOCK_LENGTH, in utrie2_setRange32()
783 value, newTrie->initialValue, overwrite); in utrie2_setRange32()
786 fillBlock(newTrie->data+block, start&UTRIE2_DATA_MASK, limit&UTRIE2_DATA_MASK, in utrie2_setRange32()
787 value, newTrie->initialValue, overwrite); in utrie2_setRange32()
799 if(value==newTrie->initialValue) { in utrie2_setRange32()
800 repeatBlock=newTrie->dataNullOffset; in utrie2_setRange32()
809 if(value==newTrie->initialValue && isInNullBlock(newTrie, start, TRUE)) { in utrie2_setRange32()
815 i2=getIndex2Block(newTrie, start, TRUE); in utrie2_setRange32()
821 block=newTrie->index2[i2]; in utrie2_setRange32()
822 if(isWritableBlock(newTrie, block)) { in utrie2_setRange32()
833 fillBlock(newTrie->data+block, in utrie2_setRange32()
835 value, newTrie->initialValue, overwrite); in utrie2_setRange32()
837 } else if(newTrie->data[block]!=value && (overwrite || block==newTrie->dataNullOffset)) { in utrie2_setRange32()
858 setIndex2Entry(newTrie, i2, repeatBlock); in utrie2_setRange32()
861 repeatBlock=getDataBlock(newTrie, start, TRUE); in utrie2_setRange32()
866 writeBlock(newTrie->data+repeatBlock, value); in utrie2_setRange32()
875 block=getDataBlock(newTrie, start, TRUE); in utrie2_setRange32()
881 fillBlock(newTrie->data+block, 0, rest, value, newTrie->initialValue, overwrite); in utrie2_setRange32()
1230 UNewTrie2 *newTrie; in compactTrie() local
1234 newTrie=trie->newTrie; in compactTrie()
1238 highStart=findHighStart(newTrie, highValue); in compactTrie()
1248 trie->highStart=newTrie->highStart=highStart; in compactTrie()
1264 compactData(newTrie); in compactTrie()
1266 compactIndex2(newTrie); in compactTrie()
1270 (long)highStart, (long)trie->newTrie->index2Length, (long)UTRIE2_INDEX_1_OFFSET); in compactTrie()
1279 newTrie->data[newTrie->dataLength++]=highValue; in compactTrie()
1280 while((newTrie->dataLength&(UTRIE2_DATA_GRANULARITY-1))!=0) { in compactTrie()
1281 newTrie->data[newTrie->dataLength++]=trie->initialValue; in compactTrie()
1284 newTrie->isCompacted=TRUE; in compactTrie()
1307 UNewTrie2 *newTrie; in utrie2_freeze() local
1326 newTrie=trie->newTrie; in utrie2_freeze()
1327 if(newTrie==NULL) { in utrie2_freeze()
1338 if(!newTrie->isCompacted) { in utrie2_freeze()
1349 allIndexesLength=newTrie->index2Length; in utrie2_freeze()
1361 (dataMove+newTrie->dataNullOffset)>0xffff || in utrie2_freeze()
1365 (dataMove+newTrie->dataLength)>UTRIE2_MAX_DATA_LENGTH in utrie2_freeze()
1374 length+=newTrie->dataLength*2; in utrie2_freeze()
1376 length+=newTrie->dataLength*4; in utrie2_freeze()
1388 trie->dataLength=newTrie->dataLength; in utrie2_freeze()
1392 … trie->index2NullOffset=static_cast<uint16_t>(UTRIE2_INDEX_2_OFFSET+newTrie->index2NullOffset); in utrie2_freeze()
1394 trie->dataNullOffset=(uint16_t)(dataMove+newTrie->dataNullOffset); in utrie2_freeze()
1414 p=(uint32_t *)newTrie->index2; in utrie2_freeze()
1424 *dest16++=(uint16_t)(dataMove+newTrie->index2[i<<(6-UTRIE2_SHIFT_2)]); in utrie2_freeze()
1432 p=(uint32_t *)newTrie->index1+UTRIE2_OMITTED_BMP_INDEX_1_LENGTH; in utrie2_freeze()
1441 p=(uint32_t *)newTrie->index2+index2Offset; in utrie2_freeze()
1442 for(i=newTrie->index2Length-index2Offset; i>0; --i) { in utrie2_freeze()
1453 p=newTrie->data; in utrie2_freeze()
1454 for(i=newTrie->dataLength; i>0; --i) { in utrie2_freeze()
1462 uprv_memcpy(dest16, newTrie->data, (size_t)newTrie->dataLength*4); in utrie2_freeze()
1474 umutablecptrie_setName(newTrie->t3, trie->name); in utrie2_freeze()
1477 newTrie->t3, UCPTRIE_TYPE_FAST, (UCPTrieValueWidth)valueBits, pErrorCode)); in utrie2_freeze()
1480 uprv_free(newTrie->data); in utrie2_freeze()
1481 uprv_free(newTrie); in utrie2_freeze()
1482 trie->newTrie=NULL; in utrie2_freeze()