Lines Matching refs:CordRep
45 using ::absl::cord_internal::CordRep;
105 inline CordRepConcat* CordRep::concat() { in concat()
110 inline const CordRepConcat* CordRep::concat() const { in concat()
115 inline CordRepSubstring* CordRep::substring() { in substring()
120 inline const CordRepSubstring* CordRep::substring() const { in substring()
125 inline CordRepExternal* CordRep::external() { in external()
130 inline const CordRepExternal* CordRep::external() const { in external()
137 static const size_t kFlatOverhead = offsetof(CordRep, data);
260 static inline bool IsRootBalanced(CordRep* node) { in IsRootBalanced()
274 static CordRep* Rebalance(CordRep* node);
275 static void DumpNode(CordRep* rep, bool include_data, std::ostream* os);
276 static bool VerifyNode(CordRep* root, CordRep* start_node,
279 static inline CordRep* VerifyTree(CordRep* node) { in VerifyTree()
298 inline CordRep* Ref(CordRep* rep) { in Ref()
320 static void UnrefInternal(CordRep* rep) { in UnrefInternal()
323 absl::InlinedVector<CordRep*, kInlinedVectorSize> pending; in UnrefInternal()
327 CordRep* right = rep_concat->right; in UnrefInternal()
331 CordRep* left = rep_concat->left; in UnrefInternal()
348 CordRep* child = rep_substring->child; in UnrefInternal()
361 rep->~CordRep(); in UnrefInternal()
364 rep->~CordRep(); in UnrefInternal()
379 inline void Unref(CordRep* rep) { in Unref()
390 static int Depth(const CordRep* rep) { in Depth()
398 static void SetConcatChildren(CordRepConcat* concat, CordRep* left, in SetConcatChildren()
399 CordRep* right) { in SetConcatChildren()
410 static CordRep* RawConcat(CordRep* left, CordRep* right) { in RawConcat()
428 static CordRep* Concat(CordRep* left, CordRep* right) { in Concat()
429 CordRep* rep = RawConcat(left, right); in Concat()
437 static CordRep* MakeBalancedTree(CordRep** reps, size_t n) { in MakeBalancedTree()
457 static CordRep* NewFlat(size_t length_hint) { in NewFlat()
467 CordRep* rep = new (raw_rep) CordRep(); in NewFlat()
474 static CordRep* NewTree(const char* data, in NewTree()
478 absl::FixedArray<CordRep*> reps((length - 1) / kMaxFlatLength + 1); in NewTree()
482 CordRep* rep = NewFlat(len + alloc_hint); in NewTree()
510 static CordRep* NewSubstring(CordRep* child, size_t offset, size_t length) { in NewSubstring()
549 inline CordRep* Cord::InlineRep::force_tree(size_t extra_hint) { in force_tree()
551 CordRep* result; in force_tree()
577 void Cord::InlineRep::AppendTree(CordRep* tree) { in AppendTree()
587 void Cord::InlineRep::PrependTree(CordRep* tree) { in PrependTree()
601 static inline bool PrepareAppendRegion(CordRep* root, char** region, in PrepareAppendRegion()
604 CordRep* dst = root; in PrepareAppendRegion()
626 for (CordRep* rep = root; rep != dst; rep = rep->concat()->right) { in PrepareAppendRegion()
653 CordRep* root = force_tree(max_length); in GetAppendRegion()
660 CordRep* new_node = in GetAppendRegion()
681 CordRep* root = force_tree(max_length); in GetAppendRegion()
688 CordRep* new_node = NewFlat(root->length); in GetAppendRegion()
697 static bool RepMemoryUsageLeaf(const CordRep* rep, size_t* total_mem_usage) { in RepMemoryUsageLeaf()
758 CordRep* tree = contents_.tree(); in operator =()
791 CordRep* root = tree(); in AppendArray()
837 inline CordRep* Cord::TakeRep() const& { in TakeRep()
841 inline CordRep* Cord::TakeRep() && { in TakeRep()
842 CordRep* rep = contents_.tree(); in TakeRep()
859 CordRep* src_tree = src.contents_.tree(); in AppendImpl()
890 CordRep* src_tree = src.contents_.tree(); in Prepend()
918 static CordRep* RemovePrefixFrom(CordRep* node, size_t n) { in RemovePrefixFrom()
921 absl::InlinedVector<CordRep*, kInlinedVectorSize> rhs_stack; in RemovePrefixFrom()
959 static CordRep* RemoveSuffixFrom(CordRep* node, size_t n) { in RemoveSuffixFrom()
962 absl::InlinedVector<CordRep*, kInlinedVectorSize> lhs_stack; in RemoveSuffixFrom()
1007 CordRep* tree = contents_.tree(); in RemovePrefix()
1011 CordRep* newrep = RemovePrefixFrom(tree, n); in RemovePrefix()
1021 CordRep* tree = contents_.tree(); in RemoveSuffix()
1025 CordRep* newrep = RemoveSuffixFrom(tree, n); in RemoveSuffix()
1033 SubRange(CordRep* a_node, size_t a_pos, size_t a_n) in SubRange()
1035 CordRep* node; // nullptr means concat last 2 results.
1040 static CordRep* NewSubRange(CordRep* node, size_t pos, size_t n) { in NewSubRange()
1041 absl::InlinedVector<CordRep*, kInlinedVectorSize> results; in NewSubRange()
1053 CordRep* right = results.back(); in NewSubRange()
1055 CordRep* left = results.back(); in NewSubRange()
1087 CordRep* tree = contents_.tree(); in Subcord()
1121 void Build(CordRep* cord_root) { in Build()
1122 std::vector<CordRep*> pending = {cord_root}; in Build()
1125 CordRep* node = pending.back(); in Build()
1153 CordRep* ConcatNodes() { in ConcatNodes()
1154 CordRep* sum = nullptr; in ConcatNodes()
1167 CordRep* AppendNode(CordRep* node, CordRep* sum) { in AppendNode()
1171 CordRep* PrependNode(CordRep* node, CordRep* sum) { in PrependNode()
1175 void AddNode(CordRep* node) { in AddNode()
1176 CordRep* sum = nullptr; in AddNode()
1206 CordRep* MakeConcat(CordRep* left, CordRep* right) { in MakeConcat()
1220 static void CheckNode(CordRep* node) { in CheckNode()
1234 absl::InlinedVector<CordRep*, kInlinedVectorSize> trees_;
1240 static CordRep* Rebalance(CordRep* node) { in Rebalance()
1300 CordRep* node = tree(); in FindFlatStartPiece()
1520 CordRep* node = stack_of_right_children_.back(); in operator ++()
1571 CordRep* subnode = Ref(current_leaf_); in AdvanceAndReadBytes()
1583 CordRep* subnode = Ref(current_leaf_); in AdvanceAndReadBytes()
1595 CordRep* node = nullptr; in AdvanceAndReadBytes()
1670 CordRep* node = nullptr; in AdvanceBytesSlowPath()
1721 const CordRep* rep = contents_.tree(); in operator []()
1755 CordRep* new_rep; in FlattenSlowPath()
1779 /* static */ bool Cord::GetFlatAux(CordRep* rep, absl::string_view* fragment) { in GetFlatAux()
1788 CordRep* child = rep->substring()->child; in GetFlatAux()
1803 absl::cord_internal::CordRep* rep, in ForEachChunkAux()
1809 absl::cord_internal::CordRep* stack[stack_max]; in ForEachChunkAux()
1810 absl::cord_internal::CordRep* current_node = rep; in ForEachChunkAux()
1846 static void DumpNode(CordRep* rep, bool include_data, std::ostream* os) { in DumpNode()
1849 absl::InlinedVector<CordRep*, kInlinedVectorSize> stack; in DumpNode()
1891 static std::string ReportError(CordRep* root, CordRep* node) { in ReportError()
1898 static bool VerifyNode(CordRep* root, CordRep* start_node, in VerifyNode()
1900 absl::InlinedVector<CordRep*, 2> worklist; in VerifyNode()
1903 CordRep* node = worklist.back(); in VerifyNode()
1942 /* static */ size_t Cord::MemoryUsageAux(const CordRep* rep) { in MemoryUsageAux()
1953 absl::InlinedVector<const CordRep*, kInlinedVectorSize> tree_stack; in MemoryUsageAux()
1954 const CordRep* cur_node = rep; in MemoryUsageAux()
1956 const CordRep* next_node = nullptr; in MemoryUsageAux()
1960 const CordRep* left = cur_node->concat()->left; in MemoryUsageAux()
1965 const CordRep* right = cur_node->concat()->right; in MemoryUsageAux()