• Home
  • Raw
  • Download

Lines Matching refs:this

95   void setEnd(T *P) { this->EndX = P; }  in setEnd()
113 iterator begin() { return (iterator)this->BeginX; } in begin()
115 const_iterator begin() const { return (const_iterator)this->BeginX; } in begin()
117 iterator end() { return (iterator)this->EndX; } in end()
119 const_iterator end() const { return (const_iterator)this->EndX; } in end()
121 iterator capacity_ptr() { return (iterator)this->CapacityX; } in capacity_ptr()
122 const_iterator capacity_ptr() const { return (const_iterator)this->CapacityX;} in capacity_ptr()
230 if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) in push_back()
231 this->grow(); in push_back()
232 ::new ((void*) this->end()) T(Elt); in push_back()
233 this->setEnd(this->end()+1); in push_back()
237 if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) in push_back()
238 this->grow(); in push_back()
239 ::new ((void*) this->end()) T(::std::move(Elt)); in push_back()
240 this->setEnd(this->end()+1); in push_back()
244 this->setEnd(this->end()-1); in pop_back()
245 this->end()->~T(); in pop_back()
252 size_t CurCapacity = this->capacity(); in grow()
253 size_t CurSize = this->size(); in grow()
261 this->uninitialized_move(this->begin(), this->end(), NewElts); in grow()
264 destroy_range(this->begin(), this->end()); in grow()
267 if (!this->isSmall()) in grow()
268 free(this->begin()); in grow()
270 this->setEnd(NewElts+CurSize); in grow()
271 this->BeginX = NewElts; in grow()
272 this->CapacityX = this->begin()+NewCapacity; in grow()
334 this->grow_pod(MinSize*sizeof(T), sizeof(T));
338 if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) in push_back()
339 this->grow(); in push_back()
340 memcpy(this->end(), &Elt, sizeof(T)); in push_back()
341 this->setEnd(this->end()+1); in push_back()
345 this->setEnd(this->end()-1); in pop_back()
370 this->destroy_range(this->begin(), this->end()); in ~SmallVectorImpl()
373 if (!this->isSmall()) in ~SmallVectorImpl()
374 free(this->begin()); in ~SmallVectorImpl()
379 this->destroy_range(this->begin(), this->end()); in clear()
380 this->EndX = this->BeginX; in clear()
384 if (N < this->size()) { in resize()
385 this->destroy_range(this->begin()+N, this->end()); in resize()
386 this->setEnd(this->begin()+N); in resize()
387 } else if (N > this->size()) { in resize()
388 if (this->capacity() < N) in resize()
389 this->grow(N); in resize()
390 for (auto I = this->end(), E = this->begin() + N; I != E; ++I) in resize()
392 this->setEnd(this->begin()+N); in resize()
397 if (N < this->size()) { in resize()
398 this->destroy_range(this->begin()+N, this->end()); in resize()
399 this->setEnd(this->begin()+N); in resize()
400 } else if (N > this->size()) { in resize()
401 if (this->capacity() < N) in resize()
402 this->grow(N); in resize()
403 std::uninitialized_fill(this->end(), this->begin()+N, NV); in resize()
404 this->setEnd(this->begin()+N); in resize()
409 if (this->capacity() < N) in reserve()
410 this->grow(N); in reserve()
414 T Result = ::std::move(this->back()); in pop_back_val()
415 this->pop_back(); in pop_back_val()
426 if (NumInputs > size_type(this->capacity_ptr()-this->end())) in append()
427 this->grow(this->size()+NumInputs); in append()
430 this->uninitialized_copy(in_start, in_end, this->end()); in append()
431 this->setEnd(this->end() + NumInputs); in append()
437 if (NumInputs > size_type(this->capacity_ptr()-this->end())) in append()
438 this->grow(this->size()+NumInputs); in append()
441 std::uninitialized_fill_n(this->end(), NumInputs, Elt); in append()
442 this->setEnd(this->end() + NumInputs); in append()
451 if (this->capacity() < NumElts) in assign()
452 this->grow(NumElts); in assign()
453 this->setEnd(this->begin()+NumElts); in assign()
454 std::uninitialized_fill(this->begin(), this->end(), Elt); in assign()
463 assert(I >= this->begin() && "Iterator to erase is out of bounds."); in erase()
464 assert(I < this->end() && "Erasing at past-the-end iterator."); in erase()
468 this->move(I+1, this->end(), I); in erase()
470 this->pop_back(); in erase()
475 assert(S >= this->begin() && "Range to erase is out of bounds."); in erase()
477 assert(E <= this->end() && "Trying to erase past the end."); in erase()
481 iterator I = this->move(E, this->end(), S); in erase()
483 this->destroy_range(I, this->end()); in erase()
484 this->setEnd(I); in erase()
489 if (I == this->end()) { // Important special case for empty vector. in insert()
490 this->push_back(::std::move(Elt)); in insert()
491 return this->end()-1; in insert()
494 assert(I >= this->begin() && "Insertion iterator is out of bounds."); in insert()
495 assert(I <= this->end() && "Inserting past the end of the vector."); in insert()
497 if (this->EndX >= this->CapacityX) { in insert()
498 size_t EltNo = I-this->begin(); in insert()
499 this->grow(); in insert()
500 I = this->begin()+EltNo; in insert()
503 ::new ((void*) this->end()) T(::std::move(this->back())); in insert()
505 this->move_backward(I, this->end()-1, this->end()); in insert()
506 this->setEnd(this->end()+1); in insert()
511 if (I <= EltPtr && EltPtr < this->EndX) in insert()
519 if (I == this->end()) { // Important special case for empty vector. in insert()
520 this->push_back(Elt); in insert()
521 return this->end()-1; in insert()
524 assert(I >= this->begin() && "Insertion iterator is out of bounds."); in insert()
525 assert(I <= this->end() && "Inserting past the end of the vector."); in insert()
527 if (this->EndX >= this->CapacityX) { in insert()
528 size_t EltNo = I-this->begin(); in insert()
529 this->grow(); in insert()
530 I = this->begin()+EltNo; in insert()
532 ::new ((void*) this->end()) T(std::move(this->back())); in insert()
534 this->move_backward(I, this->end()-1, this->end()); in insert()
535 this->setEnd(this->end()+1); in insert()
540 if (I <= EltPtr && EltPtr < this->EndX) in insert()
549 size_t InsertElt = I - this->begin(); in insert()
551 if (I == this->end()) { // Important special case for empty vector. in insert()
553 return this->begin()+InsertElt; in insert()
556 assert(I >= this->begin() && "Insertion iterator is out of bounds."); in insert()
557 assert(I <= this->end() && "Inserting past the end of the vector."); in insert()
560 reserve(this->size() + NumToInsert); in insert()
563 I = this->begin()+InsertElt; in insert()
569 if (size_t(this->end()-I) >= NumToInsert) { in insert()
570 T *OldEnd = this->end(); in insert()
571 append(std::move_iterator<iterator>(this->end() - NumToInsert), in insert()
572 std::move_iterator<iterator>(this->end())); in insert()
575 this->move_backward(I, OldEnd-NumToInsert, OldEnd); in insert()
585 T *OldEnd = this->end(); in insert()
586 this->setEnd(this->end() + NumToInsert); in insert()
588 this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten); in insert()
601 size_t InsertElt = I - this->begin(); in insert()
603 if (I == this->end()) { // Important special case for empty vector. in insert()
605 return this->begin()+InsertElt; in insert()
608 assert(I >= this->begin() && "Insertion iterator is out of bounds."); in insert()
609 assert(I <= this->end() && "Inserting past the end of the vector."); in insert()
614 reserve(this->size() + NumToInsert); in insert()
617 I = this->begin()+InsertElt; in insert()
623 if (size_t(this->end()-I) >= NumToInsert) { in insert()
624 T *OldEnd = this->end(); in insert()
625 append(std::move_iterator<iterator>(this->end() - NumToInsert), in insert()
626 std::move_iterator<iterator>(this->end())); in insert()
629 this->move_backward(I, OldEnd-NumToInsert, OldEnd); in insert()
639 T *OldEnd = this->end(); in insert()
640 this->setEnd(this->end() + NumToInsert); in insert()
642 this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten); in insert()
651 this->uninitialized_copy(From, To, OldEnd); in insert()
660 if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) in emplace_back()
661 this->grow(); in emplace_back()
662 ::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...); in emplace_back()
663 this->setEnd(this->end() + 1); in emplace_back()
671 if (this->size() != RHS.size()) return false;
672 return std::equal(this->begin(), this->end(), RHS.begin());
675 return !(*this == RHS);
679 return std::lexicographical_compare(this->begin(), this->end(),
693 assert(N <= this->capacity()); in set_size()
694 this->setEnd(this->begin() + N); in set_size()
701 if (this == &RHS) return; in swap()
704 if (!this->isSmall() && !RHS.isSmall()) { in swap()
705 std::swap(this->BeginX, RHS.BeginX); in swap()
706 std::swap(this->EndX, RHS.EndX); in swap()
707 std::swap(this->CapacityX, RHS.CapacityX); in swap()
710 if (RHS.size() > this->capacity()) in swap()
711 this->grow(RHS.size()); in swap()
712 if (this->size() > RHS.capacity()) in swap()
713 RHS.grow(this->size()); in swap()
716 size_t NumShared = this->size(); in swap()
719 std::swap((*this)[i], RHS[i]); in swap()
722 if (this->size() > RHS.size()) { in swap()
723 size_t EltDiff = this->size() - RHS.size(); in swap()
724 this->uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end()); in swap()
726 this->destroy_range(this->begin()+NumShared, this->end()); in swap()
727 this->setEnd(this->begin()+NumShared); in swap()
728 } else if (RHS.size() > this->size()) { in swap()
729 size_t EltDiff = RHS.size() - this->size(); in swap()
730 this->uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end()); in swap()
731 this->setEnd(this->end() + EltDiff); in swap()
732 this->destroy_range(RHS.begin()+NumShared, RHS.end()); in swap()
741 if (this == &RHS) return *this;
746 size_t CurSize = this->size();
751 NewEnd = std::copy(RHS.begin(), RHS.begin()+RHSSize, this->begin());
753 NewEnd = this->begin();
756 this->destroy_range(NewEnd, this->end());
759 this->setEnd(NewEnd);
760 return *this;
766 if (this->capacity() < RHSSize) {
768 this->destroy_range(this->begin(), this->end());
769 this->setEnd(this->begin());
771 this->grow(RHSSize);
774 std::copy(RHS.begin(), RHS.begin()+CurSize, this->begin());
778 this->uninitialized_copy(RHS.begin()+CurSize, RHS.end(),
779 this->begin()+CurSize);
782 this->setEnd(this->begin()+RHSSize);
783 return *this;
789 if (this == &RHS) return *this;
793 this->destroy_range(this->begin(), this->end());
794 if (!this->isSmall()) free(this->begin());
795 this->BeginX = RHS.BeginX;
796 this->EndX = RHS.EndX;
797 this->CapacityX = RHS.CapacityX;
799 return *this;
805 size_t CurSize = this->size();
808 iterator NewEnd = this->begin();
810 NewEnd = this->move(RHS.begin(), RHS.end(), NewEnd);
813 this->destroy_range(NewEnd, this->end());
814 this->setEnd(NewEnd);
819 return *this;
826 if (this->capacity() < RHSSize) {
828 this->destroy_range(this->begin(), this->end());
829 this->setEnd(this->begin());
831 this->grow(RHSSize);
834 this->move(RHS.begin(), RHS.begin()+CurSize, this->begin());
838 this->uninitialized_move(RHS.begin()+CurSize, RHS.end(),
839 this->begin()+CurSize);
842 this->setEnd(this->begin()+RHSSize);
845 return *this;
877 this->assign(Size, Value);
882 this->append(S, E);
888 this->append(R.begin(), R.end());
892 this->assign(IL);
902 return *this;
912 return *this;
922 return *this;
926 this->assign(IL);
927 return *this;