Home | History | Annotate | Download | only in ext

Lines Matching refs:__r

316     _Rope_iterator(rope<_CharT, _Alloc>& __r, size_t __pos)
317 : _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos),
318 _M_root_rope(&__r)
427 _S_leaf_concat_char_iter(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
429 size_t __old_len = __r->_M_size;
434 uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
440 __r->_M_get_allocator());
445 __r->_M_get_allocator());
456 _S_destr_leaf_concat_char_iter(_RopeLeaf* __r, const _CharT* __iter,
459 if (__r->_M_ref_count > 1)
460 return _S_leaf_concat_char_iter(__r, __iter, __len);
461 size_t __old_len = __r->_M_size;
466 uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len);
468 _S_cond_store_eos(__r->_M_data[__old_len + __len]);
469 else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string)
471 __r->_M_free_c_string();
472 __r->_M_c_string = 0;
474 __r->_M_size = __old_len + __len;
475 __r->_M_ref_count = 2;
476 return __r;
480 _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
528 _S_concat_char_iter(_RopeRep* __r, const _CharT*__s, size_t __slen)
533 _S_ref(__r);
534 return __r;
536 if (0 == __r)
538 __r->_M_get_allocator());
539 if (__r->_M_tag == __detail::_S_leaf
540 && __r->_M_size + __slen <= size_t(_S_copy_max))
542 __r, __s, __slen);
545 if (__detail::_S_concat == __r->_M_tag
546 && __detail::_S_leaf == ((_RopeConcatenation*) __r)->_M_right->_M_tag)
549 (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
552 _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
568 __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
571 __r->_M_ref_nonnil();
572 __result = _S_tree_concat(__r, __nright);
576 _S_unref(__r);
587 _S_destr_concat_char_iter(_RopeRep* __r, const _CharT* __s, size_t __slen)
590 if (0 == __r)
592 __r->_M_get_allocator());
593 size_t __count = __r->_M_ref_count;
594 size_t __orig_size = __r->_M_size;
596 return _S_concat_char_iter(__r, __s, __slen);
599 __r->_M_ref_count = 2; // One more than before
600 return __r;
603 && __detail::_S_leaf == __r->_M_tag)
605 __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s,
609 if (__detail::_S_concat == __r->_M_tag)
612 __r)->_M_right);
622 __r->_M_ref_count = 2; // One more than before.
623 ((_RopeConcatenation*)__r)->_M_right = __new_right;
624 __r->_M_size = __orig_size + __slen;
625 if (0 != __r->_M_c_string)
627 __r->_M_free_c_string();
628 __r->_M_c_string = 0;
630 return __r;
634 __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
635 __r->_M_ref_nonnil();
637 { __result = _S_tree_concat(__r, __right); }
640 _S_unref(__r);
922 const _RopeRep* __r, size_t __begin, size_t __end)
924 if (0 == __r)
926 switch(__r->_M_tag)
930 _RopeConcatenation* __conc = (_RopeConcatenation*)__r;
952 _RopeLeaf* __l = (_RopeLeaf*)__r;
958 _RopeFunction* __f = (_RopeFunction*)__r;
1009 const rope<_CharT, _Alloc>& __r)
1014 size_t __rope_len = __r.size();
1029 __r.apply_to_pieces(0, __r.size(), __c);
1047 _S_flatten(_RopeRep* __r, size_t __start, size_t __len,
1051 _S_apply_to_pieces(__c, __r, __start, __start + __len);
1073 _S_flatten(_RopeRep* __r, _CharT* __buffer)
1075 if (0 == __r)
1077 switch(__r->_M_tag)
1081 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1089 _RopeLeaf* __l = (_RopeLeaf*)__r;
1097 _RopeFunction* __f = (_RopeFunction*)__r;
1110 _S_dump(_RopeRep* __r, int __indent)
1114 if (0 == __r)
1119 if (_S_concat == __r->_M_tag)
1121 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1127 __r, __r->_M_depth, __r->_M_size,
1128 __r->_M_is_balanced? "" : "not");
1132 __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size,
1133 __r->_M_is_balanced? "" : "not");
1143 switch (__r->_M_tag)
1159 __kind, __r, __r->_M_depth, __r->_M_size);
1162 __kind, __r, __r->_M_ref_count, __r__r->_M_size);
1167 _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
1169 bool __too_big = __r->_M_size > __prefix->_M_size;
1201 _S_balance(_RopeRep* __r)
1207 // The concatenation of forest in descending order is equal to __r.
1216 _S_add_to_forest(__r, __forest);
1245 _S_add_to_forest(_RopeRep* __r, _RopeRep** __forest)
1247 if (__r->_M_is_balanced)
1249 _S_add_leaf_to_forest(__r, __forest);
1254 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1265 _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
1270 size_t __s = __r->_M_size;
1289 __insertee = _S_concat_and_set_balanced(__too_tiny, __r);
1318 _S_fetch(_RopeRep* __r, size_type __i)
1320 __GC_CONST _CharT* __cstr = __r->_M_c_string;
1326 switch(__r->_M_tag)
1330 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1337 __r = __c->_M_right;
1340 __r = __left;
1345 _RopeLeaf* __l = (_RopeLeaf*)__r;
1351 _RopeFunction* __f = (_RopeFunction*)__r;
1367 _S_fetch_ptr(_RopeRep* __r, size_type __i)
1374 if (__r->_M_ref_count > 1)
1376 switch(__r->_M_tag)
1380 _RopeConcatenation* __c = (_RopeConcatenation*)__r;
1389 __r = __c->_M_right;
1392 __r = __left;
1397 _RopeLeaf* __l = (_RopeLeaf*)__r;
1440 _RopeLeaf* __r = (_RopeLeaf*) __right;
1443 __r->_M_data, __r->_M_data
1461 _RopeLeaf* __r = (_RopeLeaf*) __right;
1463 __r->_M_data, __r->_M_data
1663 rope<_CharT, _Alloc>& __r(__first.container());
1664 rope<_CharT, _Alloc> __prefix = __r.substr(0, __first.index());
1666 __r.substr(__last.index(), __r.size() - __last.index());
1668 __r.substr(__middle.index(), __last.index() - __middle.index());
1670 __r.substr(__first.index(), __middle.index() - __first.index());
1671 __r = __prefix;
1672 __r += __part1;
1673 __r += __part2;
1674 __r += __suffix;