Home | History | Annotate | Download | only in impl

Lines Matching refs:block

25  * very useful when you have a block of Unicode data that contains significant 
78 // preallocate and reset the first data block (block index 0)
82 // preallocate and reset the first block (number 0) and Latin-1
88 // do this at least for trie->index[0] even if that block is
177 int block = m_index_[ch >> SHIFT_];
178 return m_data_[Math.abs(block) + (ch & MASK_)];
185 * char maps into block zero, otherwise false.
198 int block = m_index_[ch >> SHIFT_];
200 inBlockZero[0] = (block == 0);
202 return m_data_[Math.abs(block) + (ch & MASK_)];
220 int block = getDataBlock(ch);
221 if (block < 0) {
225 m_data_[block + (ch & MASK_)] = value;
418 // set partial block at [start..following block boundary[
419 int block = getDataBlock(start);
420 if (block < 0) {
426 fillBlock(block, start & MASK_, DATA_BLOCK_LENGTH,
431 fillBlock(block, start & MASK_, limit & MASK_,
437 // number of positions in the last, partial block
440 // round down limit to a block boundary
453 int block
454 if (block > 0) {
456 fillBlock(block, 0, DATA_BLOCK_LENGTH, value, overwrite);
458 else if (m_data_[-block] != value && (block == 0 || overwrite)) {
459 // set the repeatBlock instead of the current block 0 or range
460 // block
471 // set the negative block number to indicate that it is a
472 // repeat block
482 // set partial block at [last block boundary..limit[
483 int block = getDataBlock(start);
484 if (block < 0) {
487 fillBlock(block, 0, rest, value, overwrite);
519 * @return -1 if no new data block available (out of memory in data array)
529 // allocate a new data block
537 // copy-on-write for a block from a setRange()
562 // initialize the index map with "block is used/unused" flags
575 // start: index of first entry of current block
576 // newStart: index where the current block is to be moved
580 // advance start to the next block
582 // leave newStart with the previous block!
585 // search for an identical block
590 // found an identical block, set the other block's index
591 // value for the current block
593 // advance start to the next block
595 // leave newStart with the previous block!
599 // see if the beginning of this block can be overlapped with the
600 // end of the previous block
602 /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
639 * Find the same data block
651 for (int block = 0; block <= dataLength; block += step) {
652 if(equal_int(data, block, otherBlock, DATA_BLOCK_LENGTH)) {
653 return block;
685 int block = 0;
687 // leadUnitValue == initialValue, use all-initial-value block
688 // block = 0; if block here left empty
692 block = allocDataBlock();
693 if (block < 0) {
697 fillBlock(block, 0, DATA_BLOCK_LENGTH, m_leadUnitValue_, true);
698 // negative block number to indicate that it is a repeat block
699 block = -block;
702 m_index_[c] = block;
708 // its index block must be used first (in which case the folding is a
716 // there is data, treat the full block for a lead surrogate
718 // is there an identical index block?
719 block = findSameIndexBlock(index, indexLength, c >> SHIFT_);
726 block + SURROGATE_BLOCK_COUNT_);
733 // if we did not find an identical index block...
734 if (block == indexLength) {
755 // data and the additional block of duplicated values for lead
760 // make space for the lead surrogate index block and insert it between
774 private void fillBlock(int block, int start, int limit, int value,
777 limit += block;
778 block += start;
780 while (block < limit) {
781 m_data_[block ++] = value;
785 while (block < limit) {
786 if (m_data_[block] == m_initialValue_) {
787 m_data_[block] = value;
789 ++ block;