Home | History | Annotate | Download | only in ext

Lines Matching refs:__r

317     _Rope_iterator(rope<_CharT, _Alloc>& __r, size_t __pos)
318 : _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos),
319 _M_root_rope(&__r)
428 _S_leaf_concat_char_iter(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
430 size_t __old_len = __r->_M_size;
435 uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
441 __r->_M_get_allocator());
446 __r->_M_get_allocator());
457 _S_destr_leaf_concat_char_iter(_RopeLeaf* __r, const _CharT* __iter,
460 if (__r->_M_ref_count > 1)
461 return _S_leaf_concat_char_iter(__r, __iter, __len);
462 size_t __old_len = __r->_M_size;
467 uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len);
469 _S_cond_store_eos(__r->_M_data[__old_len + __len]);
470 else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string)
472 __r->_M_free_c_string();
473 __r->_M_c_string = 0;
475 __r->_M_size = __old_len + __len;
476 __r->_M_ref_count = 2;
477 return __r;
481 _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
529 _S_concat_char_iter(_RopeRep* __r, const _CharT*__s, size_t __slen)
534 _S_ref(__r);
535 return __r;
537 if (0 == __r)
539 __r->_M_get_allocator());
540 if (__r->_M_tag == __detail::_S_leaf
541 && __r
543 __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
546 if (__detail::_S_concat == __r->_M_tag
547 && __detail::_S_leaf == ((_RopeConcatenation*) __r)->_M_right->_M_tag)
550 (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
553 _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
569 __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
572 __r->_M_ref_nonnil();
573 __result = _S_tree_concat(__r, __nright);
577 _S_unref(__r);
588 _S_destr_concat_char_iter(_RopeRep* __r, const _CharT* __s, size_t __slen)
591 if (0 == __r)
593 __r->_M_get_allocator());
594 size_t __count = __r->_M_ref_count;
595 size_t __orig_size = __r->_M_size;
597 return _S_concat_char_iter(__r, __s, __slen);
600 __r->_M_ref_count = 2; // One more than before
601 return __r;
604 && __detail::_S_leaf == __r->_M_tag)
606 __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s,
610 if (__detail::_S_concat == __r->_M_tag)
613 __r)->_M_right);
623 __r->_M_ref_count = 2; // One more than before.
624 ((_RopeConcatenation*)__r)->_M_right = __new_right;
625 __r->_M_size = __orig_size + __slen;
626 if (0 != __r->_M_c_string)
628 __r->_M_free_c_string();
629 __r->_M_c_string = 0;
631 return __r;
635 __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
636 __r->_M_ref_nonnil();
638 { __result = _S_tree_concat(__r, __right); }
641 _S_unref(__r);
923 const _RopeRep* __r, size_t __begin, size_t __end)
925 if (0 == __r)
927 switch(__r->_M_tag)
931 _RopeConcatenation* __conc = (_RopeConcatenation*)__r;
953 _RopeLeaf* __l = (_RopeLeaf*)__r;
959 _RopeFunction* __f = (_RopeFunction*)__r;
1010 const rope<_CharT, _Alloc>& __r)
1015 size_t __rope_len = __r.size();
1030 __r.apply_to_pieces(0, __r.size(), __c);
1048 _S_flatten(_RopeRep* __r, size_t __start, size_t __len,
1052 _S_apply_to_pieces(__c, __r, __start, __start + __len);
1074 _S_flatten(_RopeRep* __r, _CharT* __buffer)
1076 if (0 == __r)
1078 switch(__r->_M_tag)
1082 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1090 _RopeLeaf* __l = (_RopeLeaf*)__r;
1098 _RopeFunction* __f = (_RopeFunction*)__r;
1111 _S_dump(_RopeRep* __r, int __indent)
1115 if (0 == __r)
1120 if (_S_concat == __r->_M_tag)
1122 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1128 __r, __r->_M_depth, __r->_M_size,
1129 __r->_M_is_balanced? "" : "not");
1133 __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size,
1134 __r->_M_is_balanced? "" : "not");
1144 switch (__r->_M_tag)
1160 __kind, __r, __r->_M_depth, __r->_M_size);
1163 __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size);
1168 _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
1170 bool __too_big = __r->_M_size > __prefix->_M_size;
1202 _S_balance(_RopeRep* __r)
1208 // The concatenation of forest in descending order is equal to __r.
1217 _S_add_to_forest(__r, __forest);
1246 _S_add_to_forest(_RopeRep* __r, _RopeRep** __forest)
1248 if (__r->_M_is_balanced)
1250 _S_add_leaf_to_forest(__r, __forest);
1255 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1266 _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
1271 size_t __s = __r->_M_size;
1290 __insertee = _S_concat_and_set_balanced(__too_tiny, __r);
1319 _S_fetch(_RopeRep* __r, size_type __i)
1321 __GC_CONST _CharT* __cstr = __r->_M_c_string;
1327 switch(__r->_M_tag)
1331 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1338 __r = __c->_M_right;
1341 __r = __left;
1346 _RopeLeaf* __l = (_RopeLeaf*)__r;
1352 _RopeFunction* __f = (_RopeFunction*)__r;
1368 _S_fetch_ptr(_RopeRep* __r, size_type __i)
1375 if (__r->_M_ref_count > 1)
1377 switch(__r->_M_tag)
1381 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1390 __r = __c->_M_right;
1393 __r = __left;
1398 _RopeLeaf* __l = (_RopeLeaf*)__r;
1441 _RopeLeaf* __r = (_RopeLeaf*) __right;
1444 __r->_M_data, __r->_M_data
1462 _RopeLeaf* __r = (_RopeLeaf*) __right;
1464 __r->_M_data, __r->_M_data
1664 rope<_CharT, _Alloc>& __r(__first.container());
1665 rope<_CharT, _Alloc> __prefix = __r.substr(0, __first.index());
1667 __r.substr(__last.index(), __r.size() - __last.index());
1669 __r.substr(__middle.index(), __last.index() - __middle.index());
1671 __r.substr(__first.index(), __middle.index() - __first.index());
1672 __r = __prefix;
1673 __r += __part1;
1674 __r += __part2;
1675 __r += __suffix;