Home | History | Annotate | Download | only in impl

Lines Matching refs:block

26  * very useful when you have a block of Unicode data that contains significant 
80 // preallocate and reset the first data block (block index 0)
84 // preallocate and reset the first block (number 0) and Latin-1
90 // do this at least for trie->index[0] even if that block is
179 int block = m_index_[ch >> SHIFT_];
180 return m_data_[Math.abs(block) + (ch & MASK_)];
187 * char maps into block zero, otherwise false.
200 int block = m_index_[ch >> SHIFT_];
202 inBlockZero[0] = (block == 0);
204 return m_data_[Math.abs(block) + (ch & MASK_)];
222 int block = getDataBlock(ch);
223 if (block < 0) {
227 m_data_[block + (ch & MASK_)] = value;
420 // set partial block at [start..following block boundary[
421 int block = getDataBlock(start);
422 if (block < 0) {
428 fillBlock(block, start & MASK_, DATA_BLOCK_LENGTH,
433 fillBlock(block, start & MASK_, limit & MASK_,
439 // number of positions in the last, partial block
442 // round down limit to a block boundary
455 int block = m_index_[start >> SHIFT_];
456 if (block > 0) {
458 fillBlock(block, 0, DATA_BLOCK_LENGTH, value, overwrite);
460 else if (m_data_[-block] != value && (block == 0 || overwrite)) {
461 // set the repeatBlock instead of the current block 0 or range
462 // block
473 // set the negative block number to indicate that it is a
474 // repeat block
484 // set partial block at [last block boundary..limit[
485 int block = getDataBlock(start);
486 if (block < 0) {
489 fillBlock(block, 0, rest, value, overwrite);
521 * @return -1 if no new data block available (out of memory in data array)
531 // allocate a new data block
539 // copy-on-write for a block from a setRange()
564 // initialize the index map with "block is used/unused" flags
577 // start: index of first entry of current block
578 // newStart: index where the current block is to be moved
582 // advance start to the next block
584 // leave newStart with the previous block!
587 // search for an identical block
592 // found an identical block, set the other block's index
593 // value for the current block
595 // advance start to the next block
597 // leave newStart with the previous block!
601 // see if the beginning of this block can be overlapped with the
602 // end of the previous block
604 /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
641 * Find the same data block
653 for (int block = 0; block <= dataLength; block += step) {
654 if(equal_int(data, block, otherBlock, DATA_BLOCK_LENGTH)) {
655 return block;
687 int block = 0;
689 // leadUnitValue == initialValue, use all-initial-value block
690 // block = 0; if block here left empty
694 block = allocDataBlock();
695 if (block < 0) {
699 fillBlock(block, 0, DATA_BLOCK_LENGTH, m_leadUnitValue_, true);
700 // negative block number to indicate that it is a repeat block
701 block = -block;
704 m_index_[c] = block;
710 // its index block must be used first (in which case the folding is a
718 // there is data, treat the full block for a lead surrogate
720 // is there an identical index block?
721 block = findSameIndexBlock(index, indexLength, c >> SHIFT_);
728 block + SURROGATE_BLOCK_COUNT_);
735 // if we did not find an identical index block...
736 if (block == indexLength) {
757 // data and the additional block of duplicated values for lead
762 // make space for the lead surrogate index block and insert it between
776 private void fillBlock(int block, int start, int limit, int value,
779 limit += block;
780 block += start;
782 while (block < limit) {
783 m_data_[block ++] = value;
787 while (block < limit) {
788 if (m_data_[block] == m_initialValue_) {
789 m_data_[block] = value;
791 ++ block;