Home | History | Annotate | Download | only in impl

Lines Matching refs:block

43         this.firstFreeBlock = 0;  /* no free block in the list */
49 * - the bad-UTF-8-data block
50 * - the null data block
71 /* reference counts for the bad-UTF-8-data block */
77 * Reference counts for the null data block: all blocks except for the ASCII blocks.
78 * Plus 1 so that we don't drop this block during compaction.
93 * set the remaining indexes in the BMP index-2 block
94 * to the null data block
108 /* set the indexes in the null index-2 block */
115 /* set the index-1 indexes for the linear index-2 block */
123 /* set the remaining index-1 indexes to the null index-2 block */
155 int i2, block;
164 block=index2[i2];
165 return (block==dataNullOffset);
206 /* get the first free block */
210 /* get a new block from the high end */
243 /* call when the block's reference counter reaches 0 */
244 private void releaseDataBlock(int block) {
245 /* put this block at the front of the free-block chain */
246 map[block>>UTRIE2_SHIFT_2]=-firstFreeBlock;
247 firstFreeBlock=block;
251 private boolean isWritableBlock(int block) {
252 return (block!=dataNullOffset && 1==map[block>>UTRIE2_SHIFT_2]);
255 private void setIndex2Entry(int i2, int block) {
257 ++map[block>>UTRIE2_SHIFT_2]; /* increment first, in case block==oldBlock! */
262 index2[i2]=block;
282 /* allocate a new data block */
303 int block;
307 block = getDataBlock(c, forLSCP);
308 data[block + (c&UTRIE2_DATA_MASK)] = value;
351 private void writeBlock(int block, int value) {
352 int limit=block+UTRIE2_DATA_BLOCK_LENGTH;
353 while(block<limit) {
354 data[block++]=value;
362 private void fillBlock(int block, /*UChar32*/ int start, /*UChar32*/ int limit,
365 int pLimit = block+limit;
367 for (i=block+start; i<pLimit; i++) {
371 for (i=block+start; i<pLimit; i++) {
396 int block, rest, repeatBlock;
414 /* set partial block at [start..following block boundary[ */
415 block=getDataBlock(start, true);
419 fillBlock(block, start&UTRIE2_DATA_MASK, UTRIE2_DATA_BLOCK_LENGTH,
423 fillBlock(block, start&UTRIE2_DATA_MASK, limit&UTRIE2_DATA_MASK,
429 /* number of positions in the last, partial block */
432 /* round down limit to a block boundary */
454 block=index2[i2];
455 if(isWritableBlock(block)) {
457 if(overwrite && block>=UNEWTRIE2_DATA_0800_OFFSET) {
460 * protected (ASCII-linear or 2-byte UTF-8) block:
465 /* !overwrite, or protected block: just write the values into this block */
466 fillBlock(block,
470 } else if(data[block]!=value && (overwrite || block==dataNullOffset)) {
472 * Set the repeatBlock instead of the null block or previous repeat block:
474 block have the same value
475 * because it's the null block or a range block (the repeatBlock from a previous
479 * The null block is the only non-writable block with the initialValue because
481 * the repeatBlock will be the null data block.)
483 * We set our repeatBlock if the desired value differs from the block's value,
485 * (which is the same as the block being the null block, see above).
503 /* set partial block at [last block boundary..limit[ */
504 block=getDataBlock(start, true);
505 fillBlock(block, 0, rest, value, initialValue, overwrite);
580 int i2, block;
593 block=index2[i2];
594 return data[block+(c&UTRIE2_DATA_MASK)];
628 int block;
633 for(block=0; block<=index2Length; ++block) {
634 if(equal_int(index2, block, otherBlock, UTRIE2_INDEX_2_BLOCK_LENGTH)) {
635 return block;
643 int block;
648 for(block=0; block<=dataLength; block+=UTRIE2_DATA_GRANULARITY) {
649 if(equal_int(data, block, otherBlock, blockLength)) {
650 return block;
664 int i1, i2, j, i2Block, prevI2Block, block, prevBlock;
683 /* the index-2 block is the same as the previous one, and filled with highValue */
689 /* this is the null index-2 block */
695 /* enumerate data blocks for one index-2 block */
697 block=index2[i2Block+ --i2];
698 if(block==prevBlock) {
699 /* the block is the same as the previous one, and filled with highValue */
703 prevBlock=block;
704 if(block==dataNullOffset) {
705 /* this is the null data block */
712 value=data[block+ --j];
751 * Start with a block length of 64 for 2-byte UTF-8,
758 * start: index of first entry of current block
759 * newStart: index where the current block is to be moved
769 /* advance start to the next block */
772 /* leave newStart with the previous block! */
776 /* search for an identical block */
779 /* found an identical block, set the other block's index value for the current block */
785 /* advance start to the next block */
788 /* leave newStart with the previous block! */
792 /* see if the beginning of this block can be overlapped with the end of the previous block */
793 /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
799 /* some overlap, or just move the whole block */
858 * start: index of first entry of current block
859 * newStart: index where the current block is to be moved
863 /* search for an identical block */
867 /* found an identical block, set the other block's index value for the current block */
870 /* advance start to the next block */
873 /* leave newStart with the previous block! */
877 /* see if the beginning of this block can be overlapped with the end of the previous block */
878 /* look for maximum overlap with the previous, adjacent block */
884 /* some overlap, or just move the whole block */
1161 /** The null index-2 block, following the gap in the index-2 table. */
1168 * The null data block.
1179 * Below, compaction uses a block length of 64 for 2-byte UTF-8.
1200 * Multi-purpose per-data-block table.
1204 * Per-data-block reference counters/free-block list.
1207 * <0: next free data block in free-block list