/src/libprotobuf-mutator/build/external.protobuf/src/external.protobuf/src/google/protobuf/descriptor.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Protocol Buffers - Google's data interchange format |
2 | | // Copyright 2008 Google Inc. All rights reserved. |
3 | | // https://developers.google.com/protocol-buffers/ |
4 | | // |
5 | | // Redistribution and use in source and binary forms, with or without |
6 | | // modification, are permitted provided that the following conditions are |
7 | | // met: |
8 | | // |
9 | | // * Redistributions of source code must retain the above copyright |
10 | | // notice, this list of conditions and the following disclaimer. |
11 | | // * Redistributions in binary form must reproduce the above |
12 | | // copyright notice, this list of conditions and the following disclaimer |
13 | | // in the documentation and/or other materials provided with the |
14 | | // distribution. |
15 | | // * Neither the name of Google Inc. nor the names of its |
16 | | // contributors may be used to endorse or promote products derived from |
17 | | // this software without specific prior written permission. |
18 | | // |
19 | | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
20 | | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
21 | | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
22 | | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
23 | | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
24 | | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 | | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 | | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 | | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 | | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | | |
31 | | // Author: kenton@google.com (Kenton Varda) |
32 | | // Based on original Protocol Buffers design by |
33 | | // Sanjay Ghemawat, Jeff Dean, and others. |
34 | | |
35 | | #include "google/protobuf/descriptor.h" |
36 | | |
37 | | #include <algorithm> |
38 | | #include <array> |
39 | | #include <cstdlib> |
40 | | #include <functional> |
41 | | #include <iterator> |
42 | | #include <limits> |
43 | | #include <memory> |
44 | | #include <sstream> |
45 | | #include <string> |
46 | | #include <type_traits> |
47 | | #include <vector> |
48 | | |
49 | | #include "google/protobuf/stubs/common.h" |
50 | | #include "absl/base/call_once.h" |
51 | | #include "absl/base/casts.h" |
52 | | #include "absl/base/dynamic_annotations.h" |
53 | | #include "absl/container/btree_map.h" |
54 | | #include "absl/container/flat_hash_map.h" |
55 | | #include "absl/container/flat_hash_set.h" |
56 | | #include "absl/hash/hash.h" |
57 | | #include "absl/log/absl_check.h" |
58 | | #include "absl/log/absl_log.h" |
59 | | #include "absl/strings/ascii.h" |
60 | | #include "absl/strings/escaping.h" |
61 | | #include "absl/strings/match.h" |
62 | | #include "absl/strings/str_cat.h" |
63 | | #include "absl/strings/str_format.h" |
64 | | #include "absl/strings/str_join.h" |
65 | | #include "absl/strings/str_split.h" |
66 | | #include "absl/strings/string_view.h" |
67 | | #include "absl/strings/strip.h" |
68 | | #include "absl/strings/substitute.h" |
69 | | #include "absl/synchronization/mutex.h" |
70 | | #include "absl/types/optional.h" |
71 | | #include "google/protobuf/any.h" |
72 | | #include "google/protobuf/descriptor.pb.h" |
73 | | #include "google/protobuf/descriptor_database.h" |
74 | | #include "google/protobuf/dynamic_message.h" |
75 | | #include "google/protobuf/generated_message_util.h" |
76 | | #include "google/protobuf/io/strtod.h" |
77 | | #include "google/protobuf/io/tokenizer.h" |
78 | | #include "google/protobuf/port.h" |
79 | | #include "google/protobuf/text_format.h" |
80 | | #include "google/protobuf/unknown_field_set.h" |
81 | | |
82 | | |
83 | | // Must be included last. |
84 | | #include "google/protobuf/port_def.inc" |
85 | | |
86 | | namespace google { |
87 | | namespace protobuf { |
88 | | namespace { |
89 | | using ::google::protobuf::internal::DownCast; |
90 | | |
91 | | const int kPackageLimit = 100; |
92 | | |
93 | | |
94 | 150 | std::string ToCamelCase(const std::string& input, bool lower_first) { |
95 | 150 | bool capitalize_next = !lower_first; |
96 | 150 | std::string result; |
97 | 150 | result.reserve(input.size()); |
98 | | |
99 | 2.39k | for (char character : input) { |
100 | 2.39k | if (character == '_') { |
101 | 208 | capitalize_next = true; |
102 | 2.18k | } else if (capitalize_next) { |
103 | 208 | result.push_back(absl::ascii_toupper(character)); |
104 | 208 | capitalize_next = false; |
105 | 1.98k | } else { |
106 | 1.98k | result.push_back(character); |
107 | 1.98k | } |
108 | 2.39k | } |
109 | | |
110 | | // Lower-case the first letter. |
111 | 150 | if (lower_first && !result.empty()) { |
112 | 150 | result[0] = absl::ascii_tolower(result[0]); |
113 | 150 | } |
114 | | |
115 | 150 | return result; |
116 | 150 | } |
117 | | |
118 | 0 | std::string ToJsonName(const std::string& input) { |
119 | 0 | bool capitalize_next = false; |
120 | 0 | std::string result; |
121 | 0 | result.reserve(input.size()); |
122 | |
|
123 | 0 | for (char character : input) { |
124 | 0 | if (character == '_') { |
125 | 0 | capitalize_next = true; |
126 | 0 | } else if (capitalize_next) { |
127 | 0 | result.push_back(absl::ascii_toupper(character)); |
128 | 0 | capitalize_next = false; |
129 | 0 | } else { |
130 | 0 | result.push_back(character); |
131 | 0 | } |
132 | 0 | } |
133 | |
|
134 | 0 | return result; |
135 | 0 | } |
136 | | |
137 | | template <typename OptionsT> |
138 | 0 | bool IsLegacyJsonFieldConflictEnabled(const OptionsT& options) { |
139 | 0 | #ifdef __GNUC__ |
140 | 0 | #pragma GCC diagnostic push |
141 | 0 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
142 | 0 | #endif |
143 | 0 | return options.deprecated_legacy_json_field_conflicts(); |
144 | 0 | #ifdef __GNUC__ |
145 | 0 | #pragma GCC diagnostic pop |
146 | 0 | #endif |
147 | 0 | } Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::IsLegacyJsonFieldConflictEnabled<google::protobuf::MessageOptions>(google::protobuf::MessageOptions const&) Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::IsLegacyJsonFieldConflictEnabled<google::protobuf::EnumOptions>(google::protobuf::EnumOptions const&) |
148 | | |
149 | | // Backport of fold expressions for the comma operator to C++11. |
150 | | // Usage: Fold({expr...}); |
151 | | // Guaranteed to evaluate left-to-right |
152 | | struct ExpressionEater { |
153 | | template <typename T> |
154 | 1.60k | ExpressionEater(T&&) {} // NOLINT descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) Line | Count | Source | 154 | 1.21k | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<bool>(bool&&) Line | Count | Source | 154 | 156 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<int&>(int&) Line | Count | Source | 154 | 156 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<char*&>(char*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::SourceCodeInfo*&>(google::protobuf::SourceCodeInfo*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::FileDescriptorTables*&>(google::protobuf::FileDescriptorTables*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::MessageOptions*&>(google::protobuf::MessageOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::FieldOptions*&>(google::protobuf::FieldOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::EnumOptions*&>(google::protobuf::EnumOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::EnumValueOptions*&>(google::protobuf::EnumValueOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::ExtensionRangeOptions*&>(google::protobuf::ExtensionRangeOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::OneofOptions*&>(google::protobuf::OneofOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::ServiceOptions*&>(google::protobuf::ServiceOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::MethodOptions*&>(google::protobuf::MethodOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
descriptor.cc:google::protobuf::(anonymous namespace)::ExpressionEater::ExpressionEater<google::protobuf::FileOptions*&>(google::protobuf::FileOptions*&) Line | Count | Source | 154 | 6 | ExpressionEater(T&&) {} // NOLINT |
|
155 | | }; |
156 | 568 | void Fold(std::initializer_list<ExpressionEater>) {} |
157 | | |
158 | | template <int R> |
159 | 1.51k | constexpr size_t RoundUpTo(size_t n) { |
160 | 1.51k | static_assert((R & (R - 1)) == 0, "Must be power of two"); |
161 | 1.51k | return (n + (R - 1)) & ~(R - 1); |
162 | 1.51k | } |
163 | | |
164 | 0 | constexpr size_t Max(size_t a, size_t b) { return a > b ? a : b; } |
165 | | template <typename T, typename... Ts> |
166 | 0 | constexpr size_t Max(T a, Ts... b) { |
167 | 0 | return Max(a, Max(b...)); |
168 | 0 | } Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::Max<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) |
169 | | |
170 | | template <typename T> |
171 | 0 | constexpr size_t EffectiveAlignof() { |
172 | 0 | // `char` is special in that it gets aligned to 8. It is where we drop the |
173 | 0 | // trivial structs. |
174 | 0 | return std::is_same<T, char>::value ? 8 : alignof(T); |
175 | 0 | } Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<char>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::SourceCodeInfo>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::FileDescriptorTables>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::MessageOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::FieldOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::EnumOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::EnumValueOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::ExtensionRangeOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::OneofOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::ServiceOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::MethodOptions>() Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::EffectiveAlignof<google::protobuf::FileOptions>() |
176 | | |
177 | | template <int align, typename U, typename... T> |
178 | | using AppendIfAlign = |
179 | | typename std::conditional<EffectiveAlignof<U>() == align, void (*)(T..., U), |
180 | | void (*)(T...)>::type; |
181 | | |
182 | | // Metafunction to sort types in descending order of alignment. |
183 | | // Useful for the flat allocator to ensure proper alignment of all elements |
184 | | // without having to add padding. |
185 | | // Instead of implementing a proper sort metafunction we just do a |
186 | | // filter+merge, which is much simpler to write as a metafunction. |
187 | | // We have a fixed set of alignments we can filter on. |
188 | | // For simplicity we use a function pointer as a type list. |
189 | | template <typename In, typename T16, typename T8, typename T4, typename T2, |
190 | | typename T1> |
191 | | struct TypeListSortImpl; |
192 | | |
193 | | template <typename... T16, typename... T8, typename... T4, typename... T2, |
194 | | typename... T1> |
195 | | struct TypeListSortImpl<void (*)(), void (*)(T16...), void (*)(T8...), |
196 | | void (*)(T4...), void (*)(T2...), void (*)(T1...)> { |
197 | | using type = void (*)(T16..., T8..., T4..., T2..., T1...); |
198 | | }; |
199 | | |
200 | | template <typename First, typename... Rest, typename... T16, typename... T8, |
201 | | typename... T4, typename... T2, typename... T1> |
202 | | struct TypeListSortImpl<void (*)(First, Rest...), void (*)(T16...), |
203 | | void (*)(T8...), void (*)(T4...), void (*)(T2...), |
204 | | void (*)(T1...)> { |
205 | | using type = typename TypeListSortImpl< |
206 | | void (*)(Rest...), AppendIfAlign<16, First, T16...>, |
207 | | AppendIfAlign<8, First, T8...>, AppendIfAlign<4, First, T4...>, |
208 | | AppendIfAlign<2, First, T2...>, AppendIfAlign<1, First, T1...>>::type; |
209 | | }; |
210 | | |
211 | | template <typename... T> |
212 | | using SortByAlignment = |
213 | | typename TypeListSortImpl<void (*)(T...), void (*)(), void (*)(), |
214 | | void (*)(), void (*)(), void (*)()>::type; |
215 | | |
216 | | template <template <typename...> class C, typename... T> |
217 | | auto ApplyTypeList(void (*)(T...)) -> C<T...>; |
218 | | |
219 | | template <typename T> |
220 | 0 | constexpr int FindTypeIndex() { |
221 | 0 | return -1; |
222 | 0 | } Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions>() |
223 | | |
224 | | template <typename T, typename T1, typename... Ts> |
225 | 0 | constexpr int FindTypeIndex() { |
226 | 0 | return std::is_same<T, T1>::value ? 0 : FindTypeIndex<T, Ts...>() + 1; |
227 | 0 | } Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<char, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::SourceCodeInfo, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileDescriptorTables, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MessageOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FieldOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::EnumValueOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ExtensionRangeOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::OneofOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::ServiceOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::MethodOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() Unexecuted instantiation: descriptor.cc:int google::protobuf::(anonymous namespace)::FindTypeIndex<google::protobuf::FileOptions, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>() |
228 | | |
229 | | // A type to value map, where the possible keys as specified in `Keys...`. |
230 | | // The values for key `K` is `ValueT<K>` |
231 | | template <template <typename> class ValueT, typename... Keys> |
232 | | class TypeMap { |
233 | | public: |
234 | | template <typename K> |
235 | 5.47k | ValueT<K>& Get() { |
236 | 5.47k | return static_cast<Base<K>&>(payload_).value; |
237 | 5.47k | } descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() Line | Count | Source | 235 | 544 | ValueT<K>& Get() { | 236 | 544 | return static_cast<Base<K>&>(payload_).value; | 237 | 544 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() Line | Count | Source | 235 | 1.78k | ValueT<K>& Get() { | 236 | 1.78k | return static_cast<Base<K>&>(payload_).value; | 237 | 1.78k | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileDescriptorTables>() Line | Count | Source | 235 | 30 | ValueT<K>& Get() { | 236 | 30 | return static_cast<Base<K>&>(payload_).value; | 237 | 30 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>() Line | Count | Source | 235 | 30 | ValueT<K>& Get() { | 236 | 30 | return static_cast<Base<K>&>(payload_).value; | 237 | 30 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::SourceCodeInfo>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>() Line | Count | Source | 235 | 2.14k | ValueT<K>& Get() { | 236 | 2.14k | return static_cast<Base<K>&>(payload_).value; | 237 | 2.14k | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ServiceOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MethodOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MessageOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ExtensionRangeOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::OneofOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumValueOptions>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:int& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FieldOptions>() Line | Count | Source | 235 | 48 | ValueT<K>& Get() { | 236 | 48 | return static_cast<Base<K>&>(payload_).value; | 237 | 48 | } |
descriptor.cc:char*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>() Line | Count | Source | 235 | 716 | ValueT<K>& Get() { | 236 | 716 | return static_cast<Base<K>&>(payload_).value; | 237 | 716 | } |
descriptor.cc:google::protobuf::SourceCodeInfo*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::SourceCodeInfo>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::FileDescriptorTables*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileDescriptorTables>() Line | Count | Source | 235 | 12 | ValueT<K>& Get() { | 236 | 12 | return static_cast<Base<K>&>(payload_).value; | 237 | 12 | } |
descriptor.cc:google::protobuf::MessageOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MessageOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::FieldOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FieldOptions>() Line | Count | Source | 235 | 18 | ValueT<K>& Get() { | 236 | 18 | return static_cast<Base<K>&>(payload_).value; | 237 | 18 | } |
descriptor.cc:google::protobuf::EnumOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::EnumValueOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumValueOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::ExtensionRangeOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ExtensionRangeOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::OneofOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::OneofOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::ServiceOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ServiceOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::MethodOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MethodOptions>() Line | Count | Source | 235 | 6 | ValueT<K>& Get() { | 236 | 6 | return static_cast<Base<K>&>(payload_).value; | 237 | 6 | } |
descriptor.cc:google::protobuf::FileOptions*& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>() Line | Count | Source | 235 | 10 | ValueT<K>& Get() { | 236 | 10 | return static_cast<Base<K>&>(payload_).value; | 237 | 10 | } |
|
238 | | |
239 | | template <typename K> |
240 | 3.89k | const ValueT<K>& Get() const { |
241 | 3.89k | return static_cast<const Base<K>&>(payload_).value; |
242 | 3.89k | } descriptor.cc:char* const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::PointerT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>() const Line | Count | Source | 240 | 3.36k | const ValueT<K>& Get() const { | 241 | 3.36k | return static_cast<const Base<K>&>(payload_).value; | 242 | 3.36k | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<char>() const Line | Count | Source | 240 | 36 | const ValueT<K>& Get() const { | 241 | 36 | return static_cast<const Base<K>&>(payload_).value; | 242 | 36 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::SourceCodeInfo>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileDescriptorTables>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MessageOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FieldOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::EnumValueOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ExtensionRangeOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::OneofOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::ServiceOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::MethodOptions>() const Line | Count | Source | 240 | 42 | const ValueT<K>& Get() const { | 241 | 42 | return static_cast<const Base<K>&>(payload_).value; | 242 | 42 | } |
descriptor.cc:int const& google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>() const Line | Count | Source | 240 | 30 | const ValueT<K>& Get() const { | 241 | 30 | return static_cast<const Base<K>&>(payload_).value; | 242 | 30 | } |
|
243 | | |
244 | | private: |
245 | | template <typename K> |
246 | | struct Base { |
247 | | ValueT<K> value{}; |
248 | | }; |
249 | | struct Payload : Base<Keys>... {}; |
250 | | Payload payload_; |
251 | | }; |
252 | | |
253 | | template <typename T> |
254 | | using IntT = int; |
255 | | template <typename T> |
256 | | using PointerT = T*; |
257 | | |
258 | | // Manages an allocation of sequential arrays of type `T...`. |
259 | | // It is more space efficient than storing N (ptr, size) pairs, by storing only |
260 | | // the pointer to the head and the boundaries between the arrays. |
261 | | template <typename... T> |
262 | | class FlatAllocation { |
263 | | public: |
264 | | static constexpr size_t kMaxAlign = Max(alignof(T)...); |
265 | | |
266 | 6 | FlatAllocation(const TypeMap<IntT, T...>& ends) : ends_(ends) { |
267 | | // The arrays start just after FlatAllocation, so adjust the ends. |
268 | 6 | Fold({(ends_.template Get<T>() += |
269 | 6 | RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)))...}); |
270 | 6 | Fold({Init<T>()...}); |
271 | 6 | } |
272 | | |
273 | 0 | void Destroy() { |
274 | 0 | Fold({Destroy<T>()...}); |
275 | 0 | internal::SizedDelete(this, total_bytes()); |
276 | 0 | } |
277 | | |
278 | | template <int I> |
279 | | using type = typename std::tuple_element<I, std::tuple<T...>>::type; |
280 | | |
281 | | // Gets a tuple of the head pointers for the arrays |
282 | 6 | TypeMap<PointerT, T...> Pointers() const { |
283 | 6 | TypeMap<PointerT, T...> out; |
284 | 6 | Fold({(out.template Get<T>() = Begin<T>())...}); |
285 | 6 | return out; |
286 | 6 | } |
287 | | |
288 | | |
289 | | private: |
290 | | // Total number of bytes used by all arrays. |
291 | 0 | int total_bytes() const { |
292 | | // Get the last end. |
293 | 0 | return ends_.template Get<typename std::tuple_element< |
294 | 0 | sizeof...(T) - 1, std::tuple<T...>>::type>(); |
295 | 0 | } |
296 | | |
297 | | |
298 | | template <typename U> |
299 | 150 | int BeginOffset() const { |
300 | 150 | constexpr int type_index = FindTypeIndex<U, T...>(); |
301 | | // Avoid a negative value here to keep it compiling when type_index == 0 |
302 | 150 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; |
303 | 150 | using PrevType = |
304 | 150 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; |
305 | | // Ensure the types are properly aligned. |
306 | 150 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); |
307 | 150 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) |
308 | 150 | : ends_.template Get<PrevType>(); |
309 | 150 | } descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::SourceCodeInfo>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::FileDescriptorTables>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::MessageOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::FieldOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::EnumOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::EnumValueOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::ExtensionRangeOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::OneofOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::ServiceOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::MethodOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<google::protobuf::FileOptions>() const Line | Count | Source | 299 | 12 | int BeginOffset() const { | 300 | 12 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 12 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 12 | using PrevType = | 304 | 12 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 12 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 12 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 12 | : ends_.template Get<PrevType>(); | 309 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::BeginOffset<char>() const Line | Count | Source | 299 | 6 | int BeginOffset() const { | 300 | 6 | constexpr int type_index = FindTypeIndex<U, T...>(); | 301 | | // Avoid a negative value here to keep it compiling when type_index == 0 | 302 | 6 | constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1; | 303 | 6 | using PrevType = | 304 | 6 | typename std::tuple_element<prev_type_index, std::tuple<T...>>::type; | 305 | | // Ensure the types are properly aligned. | 306 | 6 | static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), ""); | 307 | 6 | return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)) | 308 | 6 | : ends_.template Get<PrevType>(); | 309 | 6 | } |
|
310 | | |
311 | | template <typename U> |
312 | 150 | int EndOffset() const { |
313 | 150 | return ends_.template Get<U>(); |
314 | 150 | } descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::SourceCodeInfo>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::FileDescriptorTables>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::MessageOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::FieldOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::EnumOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::EnumValueOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::ExtensionRangeOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::OneofOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::ServiceOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::MethodOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<google::protobuf::FileOptions>() const Line | Count | Source | 312 | 12 | int EndOffset() const { | 313 | 12 | return ends_.template Get<U>(); | 314 | 12 | } |
descriptor.cc:int google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::EndOffset<char>() const Line | Count | Source | 312 | 6 | int EndOffset() const { | 313 | 6 | return ends_.template Get<U>(); | 314 | 6 | } |
|
315 | | |
316 | | // Avoid the reinterpret_cast if the array is empty. |
317 | | // Clang's Control Flow Integrity does not like the cast pointing to memory |
318 | | // that is not yet initialized to be of that type. |
319 | | // (from -fsanitize=cfi-unrelated-cast) |
320 | | template <typename U> |
321 | 78 | U* Begin() const { |
322 | 78 | int begin = BeginOffset<U>(), end = EndOffset<U>(); |
323 | 78 | if (begin == end) return nullptr; |
324 | 24 | return reinterpret_cast<U*>(data() + begin); |
325 | 78 | } descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 6 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::SourceCodeInfo* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::SourceCodeInfo>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::FileDescriptorTables* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::FileDescriptorTables>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 6 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::MessageOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::MessageOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::FieldOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::FieldOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 2 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::EnumOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::EnumOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::EnumValueOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::EnumValueOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::ExtensionRangeOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::ExtensionRangeOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::OneofOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::OneofOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::ServiceOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::ServiceOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::MethodOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::MethodOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 0 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:google::protobuf::FileOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<google::protobuf::FileOptions>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 4 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
descriptor.cc:char* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Begin<char>() const Line | Count | Source | 321 | 6 | U* Begin() const { | 322 | 6 | int begin = BeginOffset<U>(), end = EndOffset<U>(); | 323 | 6 | if (begin == end) return nullptr; | 324 | 6 | return reinterpret_cast<U*>(data() + begin); | 325 | 6 | } |
|
326 | | |
327 | | template <typename U> |
328 | 0 | U* End() const { |
329 | 0 | int begin = BeginOffset<U>(), end = EndOffset<U>(); |
330 | 0 | if (begin == end) return nullptr; |
331 | 0 | return reinterpret_cast<U*>(data() + end); |
332 | 0 | } Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const Unexecuted instantiation: descriptor.cc:google::protobuf::SourceCodeInfo* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::SourceCodeInfo>() const Unexecuted instantiation: descriptor.cc:google::protobuf::FileDescriptorTables* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::FileDescriptorTables>() const Unexecuted instantiation: descriptor.cc:google::protobuf::MessageOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::MessageOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::FieldOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::FieldOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::EnumOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::EnumOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::EnumValueOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::ExtensionRangeOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::ExtensionRangeOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::OneofOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::OneofOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::ServiceOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::MethodOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::MethodOptions>() const Unexecuted instantiation: descriptor.cc:google::protobuf::FileOptions* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<google::protobuf::FileOptions>() const Unexecuted instantiation: descriptor.cc:char* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::End<char>() const |
333 | | |
334 | | template <typename U> |
335 | 78 | bool Init() { |
336 | | // Skip for the `char` block. No need to zero initialize it. |
337 | 78 | if (std::is_same<U, char>::value) return true; |
338 | 72 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); |
339 | 1.30k | p != end; p += sizeof(U)) { |
340 | 1.23k | ::new (p) U{}; |
341 | 1.23k | } |
342 | 72 | return true; |
343 | 78 | } descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<char>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 0 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 0 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 0 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 1.22k | p != end; p += sizeof(U)) { | 340 | 1.21k | ::new (p) U{}; | 341 | 1.21k | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::SourceCodeInfo>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::FileDescriptorTables>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 12 | p != end; p += sizeof(U)) { | 340 | 6 | ::new (p) U{}; | 341 | 6 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::MessageOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::FieldOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 18 | p != end; p += sizeof(U)) { | 340 | 12 | ::new (p) U{}; | 341 | 12 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::EnumOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::EnumValueOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::ExtensionRangeOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::OneofOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::ServiceOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::MethodOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 6 | p != end; p += sizeof(U)) { | 340 | 0 | ::new (p) U{}; | 341 | 0 | } | 342 | 6 | return true; | 343 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Init<google::protobuf::FileOptions>() Line | Count | Source | 335 | 6 | bool Init() { | 336 | | // Skip for the `char` block. No need to zero initialize it. | 337 | 6 | if (std::is_same<U, char>::value) return true; | 338 | 6 | for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>(); | 339 | 10 | p != end; p += sizeof(U)) { | 340 | 4 | ::new (p) U{}; | 341 | 4 | } | 342 | 6 | return true; | 343 | 6 | } |
|
344 | | |
345 | | template <typename U> |
346 | 0 | bool Destroy() { |
347 | 0 | if (std::is_trivially_destructible<U>::value) return true; |
348 | 0 | for (U* it = Begin<U>(), *end = End<U>(); it != end; ++it) { |
349 | 0 | it->~U(); |
350 | 0 | } |
351 | 0 | return true; |
352 | 0 | } Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<char>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::SourceCodeInfo>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::FileDescriptorTables>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::MessageOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::FieldOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::EnumOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::EnumValueOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::ExtensionRangeOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::OneofOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::ServiceOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::MethodOptions>() Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Destroy<google::protobuf::FileOptions>() |
353 | | |
354 | 168 | char* data() const { |
355 | 168 | return const_cast<char*>(reinterpret_cast<const char*>(this)); |
356 | 168 | } |
357 | | |
358 | | TypeMap<IntT, T...> ends_; |
359 | | }; |
360 | | |
361 | | template <typename... T> |
362 | 6 | TypeMap<IntT, T...> CalculateEnds(const TypeMap<IntT, T...>& sizes) { |
363 | 6 | int total = 0; |
364 | 6 | TypeMap<IntT, T...> out; |
365 | 6 | Fold({(out.template Get<T>() = total += |
366 | 6 | sizeof(T) * sizes.template Get<T>())...}); |
367 | 6 | return out; |
368 | 6 | } |
369 | | |
370 | | // The implementation for FlatAllocator below. |
371 | | // This separate class template makes it easier to have methods that fold on |
372 | | // `T...`. |
373 | | template <typename... T> |
374 | | class FlatAllocatorImpl { |
375 | | public: |
376 | | using Allocation = FlatAllocation<T...>; |
377 | | |
378 | | template <typename U> |
379 | 1.42k | void PlanArray(int array_size) { |
380 | | // We can't call PlanArray after FinalizePlanning has been called. |
381 | 1.42k | ABSL_CHECK(!has_allocated()); |
382 | 1.42k | if (std::is_trivially_destructible<U>::value) { |
383 | | // Trivial types are aligned to 8 bytes. |
384 | 710 | static_assert(alignof(U) <= 8, ""); |
385 | 710 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); |
386 | 716 | } else { |
387 | | // Since we can't use `if constexpr`, just make the expression compile |
388 | | // when this path is not taken. |
389 | 716 | using TypeToUse = |
390 | 716 | typename std::conditional<std::is_trivially_destructible<U>::value, |
391 | 716 | char, U>::type; |
392 | 716 | total_.template Get<TypeToUse>() += array_size; |
393 | 716 | } |
394 | 1.42k | } descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptorTables>(int) Line | Count | Source | 379 | 6 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 6 | ABSL_CHECK(!has_allocated()); | 382 | 6 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 0 | static_assert(alignof(U) <= 8, ""); | 385 | 0 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 6 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 6 | using TypeToUse = | 390 | 6 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 6 | char, U>::type; | 392 | 6 | total_.template Get<TypeToUse>() += array_size; | 393 | 6 | } | 394 | 6 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileOptions>(int) Line | Count | Source | 379 | 4 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 4 | ABSL_CHECK(!has_allocated()); | 382 | 4 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 0 | static_assert(alignof(U) <= 8, ""); | 385 | 0 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 4 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 4 | using TypeToUse = | 390 | 4 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 4 | char, U>::type; | 392 | 4 | total_.template Get<TypeToUse>() += array_size; | 393 | 4 | } | 394 | 4 | } |
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::SourceCodeInfo>(int) descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::ServiceDescriptor>(int) Line | Count | Source | 379 | 6 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 6 | ABSL_CHECK(!has_allocated()); | 382 | 6 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 6 | static_assert(alignof(U) <= 8, ""); | 385 | 6 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 6 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 6 | } |
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::ServiceOptions>(int) Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::MethodDescriptor>(int) Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::MethodOptions>(int) Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::MessageOptions>(int) Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::ExtensionRangeOptions>(int) descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ReservedRange>(int) Line | Count | Source | 379 | 76 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 76 | ABSL_CHECK(!has_allocated()); | 382 | 76 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 76 | static_assert(alignof(U) <= 8, ""); | 385 | 76 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 76 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 76 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>(int) Line | Count | Source | 379 | 94 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 94 | ABSL_CHECK(!has_allocated()); | 382 | 94 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 94 | static_assert(alignof(U) <= 8, ""); | 385 | 94 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 94 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 94 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::OneofDescriptor>(int) Line | Count | Source | 379 | 76 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 76 | ABSL_CHECK(!has_allocated()); | 382 | 76 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 76 | static_assert(alignof(U) <= 8, ""); | 385 | 76 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 76 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 76 | } |
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::OneofOptions>(int) Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumOptions>(int) Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumValueOptions>(int) descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumDescriptor::ReservedRange>(int) Line | Count | Source | 379 | 18 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 18 | ABSL_CHECK(!has_allocated()); | 382 | 18 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 18 | static_assert(alignof(U) <= 8, ""); | 385 | 18 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 18 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 18 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FieldDescriptor>(int) Line | Count | Source | 379 | 158 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 158 | ABSL_CHECK(!has_allocated()); | 382 | 158 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 158 | static_assert(alignof(U) <= 8, ""); | 385 | 158 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 158 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 158 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FieldOptions>(int) Line | Count | Source | 379 | 12 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 12 | ABSL_CHECK(!has_allocated()); | 382 | 12 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 0 | static_assert(alignof(U) <= 8, ""); | 385 | 0 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 12 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 12 | using TypeToUse = | 390 | 12 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 12 | char, U>::type; | 392 | 12 | total_.template Get<TypeToUse>() += array_size; | 393 | 12 | } | 394 | 12 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<int>(int) Line | Count | Source | 379 | 12 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 12 | ABSL_CHECK(!has_allocated()); | 382 | 12 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 12 | static_assert(alignof(U) <= 8, ""); | 385 | 12 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 12 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 12 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor const*>(int) Line | Count | Source | 379 | 6 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 6 | ABSL_CHECK(!has_allocated()); | 382 | 6 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 6 | static_assert(alignof(U) <= 8, ""); | 385 | 6 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 6 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 6 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumValueDescriptor>(int) Line | Count | Source | 379 | 18 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 18 | ABSL_CHECK(!has_allocated()); | 382 | 18 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 18 | static_assert(alignof(U) <= 8, ""); | 385 | 18 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 18 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 18 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(int) Line | Count | Source | 379 | 694 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 694 | ABSL_CHECK(!has_allocated()); | 382 | 694 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 0 | static_assert(alignof(U) <= 8, ""); | 385 | 0 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 694 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 694 | using TypeToUse = | 390 | 694 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 694 | char, U>::type; | 392 | 694 | total_.template Get<TypeToUse>() += array_size; | 393 | 694 | } | 394 | 694 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor>(int) Line | Count | Source | 379 | 6 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 6 | ABSL_CHECK(!has_allocated()); | 382 | 6 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 6 | static_assert(alignof(U) <= 8, ""); | 385 | 6 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 6 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 6 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::EnumDescriptor>(int) Line | Count | Source | 379 | 82 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 82 | ABSL_CHECK(!has_allocated()); | 382 | 82 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 82 | static_assert(alignof(U) <= 8, ""); | 385 | 82 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 82 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 82 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor>(int) Line | Count | Source | 379 | 82 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 82 | ABSL_CHECK(!has_allocated()); | 382 | 82 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 82 | static_assert(alignof(U) <= 8, ""); | 385 | 82 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 82 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 82 | } |
descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ExtensionRange>(int) Line | Count | Source | 379 | 76 | void PlanArray(int array_size) { | 380 | | // We can't call PlanArray after FinalizePlanning has been called. | 381 | 76 | ABSL_CHECK(!has_allocated()); | 382 | 76 | if (std::is_trivially_destructible<U>::value) { | 383 | | // Trivial types are aligned to 8 bytes. | 384 | 76 | static_assert(alignof(U) <= 8, ""); | 385 | 76 | total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); | 386 | 76 | } else { | 387 | | // Since we can't use `if constexpr`, just make the expression compile | 388 | | // when this path is not taken. | 389 | 0 | using TypeToUse = | 390 | 0 | typename std::conditional<std::is_trivially_destructible<U>::value, | 391 | 0 | char, U>::type; | 392 | 0 | total_.template Get<TypeToUse>() += array_size; | 393 | 0 | } | 394 | 76 | } |
|
395 | | |
396 | | template <typename U> |
397 | 1.27k | U* AllocateArray(int array_size) { |
398 | 1.27k | constexpr bool trivial = std::is_trivially_destructible<U>::value; |
399 | 1.27k | using TypeToUse = typename std::conditional<trivial, char, U>::type; |
400 | | |
401 | | // We can only allocate after FinalizePlanning has been called. |
402 | 1.27k | ABSL_CHECK(has_allocated()); |
403 | | |
404 | 1.27k | TypeToUse*& data = pointers_.template Get<TypeToUse>(); |
405 | 1.27k | int& used = used_.template Get<TypeToUse>(); |
406 | 1.27k | U* res = reinterpret_cast<U*>(data + used); |
407 | 1.27k | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; |
408 | 1.27k | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); |
409 | 1.27k | return res; |
410 | 1.27k | } descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(int) Line | Count | Source | 397 | 538 | U* AllocateArray(int array_size) { | 398 | 538 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 538 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 538 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 538 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 538 | int& used = used_.template Get<TypeToUse>(); | 406 | 538 | U* res = reinterpret_cast<U*>(data + used); | 407 | 538 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 538 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 538 | return res; | 410 | 538 | } |
descriptor.cc:google::protobuf::EnumValueDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumValueDescriptor>(int) Line | Count | Source | 397 | 18 | U* AllocateArray(int array_size) { | 398 | 18 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 18 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 18 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 18 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 18 | int& used = used_.template Get<TypeToUse>(); | 406 | 18 | U* res = reinterpret_cast<U*>(data + used); | 407 | 18 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 18 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 18 | return res; | 410 | 18 | } |
descriptor.cc:google::protobuf::EnumDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumDescriptor>(int) Line | Count | Source | 397 | 82 | U* AllocateArray(int array_size) { | 398 | 82 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 82 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 82 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 82 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 82 | int& used = used_.template Get<TypeToUse>(); | 406 | 82 | U* res = reinterpret_cast<U*>(data + used); | 407 | 82 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 82 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 82 | return res; | 410 | 82 | } |
descriptor.cc:google::protobuf::Descriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::Descriptor>(int) Line | Count | Source | 397 | 82 | U* AllocateArray(int array_size) { | 398 | 82 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 82 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 82 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 82 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 82 | int& used = used_.template Get<TypeToUse>(); | 406 | 82 | U* res = reinterpret_cast<U*>(data + used); | 407 | 82 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 82 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 82 | return res; | 410 | 82 | } |
descriptor.cc:google::protobuf::Descriptor::ExtensionRange* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::Descriptor::ExtensionRange>(int) Line | Count | Source | 397 | 76 | U* AllocateArray(int array_size) { | 398 | 76 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 76 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 76 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 76 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 76 | int& used = used_.template Get<TypeToUse>(); | 406 | 76 | U* res = reinterpret_cast<U*>(data + used); | 407 | 76 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 76 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 76 | return res; | 410 | 76 | } |
descriptor.cc:google::protobuf::FileDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileDescriptor>(int) Line | Count | Source | 397 | 6 | U* AllocateArray(int array_size) { | 398 | 6 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 6 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 6 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 6 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 6 | int& used = used_.template Get<TypeToUse>(); | 406 | 6 | U* res = reinterpret_cast<U*>(data + used); | 407 | 6 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 6 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 6 | return res; | 410 | 6 | } |
descriptor.cc:google::protobuf::FileOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileOptions>(int) Line | Count | Source | 397 | 4 | U* AllocateArray(int array_size) { | 398 | 4 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 4 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 4 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 4 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 4 | int& used = used_.template Get<TypeToUse>(); | 406 | 4 | U* res = reinterpret_cast<U*>(data + used); | 407 | 4 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 4 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 4 | return res; | 410 | 4 | } |
Unexecuted instantiation: descriptor.cc:google::protobuf::SourceCodeInfo* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::SourceCodeInfo>(int) descriptor.cc:google::protobuf::FileDescriptorTables* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileDescriptorTables>(int) Line | Count | Source | 397 | 6 | U* AllocateArray(int array_size) { | 398 | 6 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 6 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 6 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 6 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 6 | int& used = used_.template Get<TypeToUse>(); | 406 | 6 | U* res = reinterpret_cast<U*>(data + used); | 407 | 6 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 6 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 6 | return res; | 410 | 6 | } |
descriptor.cc:google::protobuf::FileDescriptor const** google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FileDescriptor const*>(int) Line | Count | Source | 397 | 6 | U* AllocateArray(int array_size) { | 398 | 6 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 6 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 6 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 6 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 6 | int& used = used_.template Get<TypeToUse>(); | 406 | 6 | U* res = reinterpret_cast<U*>(data + used); | 407 | 6 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 6 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 6 | return res; | 410 | 6 | } |
descriptor.cc:int* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<int>(int) Line | Count | Source | 397 | 12 | U* AllocateArray(int array_size) { | 398 | 12 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 12 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 12 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 12 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 12 | int& used = used_.template Get<TypeToUse>(); | 406 | 12 | U* res = reinterpret_cast<U*>(data + used); | 407 | 12 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 12 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 12 | return res; | 410 | 12 | } |
descriptor.cc:google::protobuf::ServiceDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::ServiceDescriptor>(int) Line | Count | Source | 397 | 6 | U* AllocateArray(int array_size) { | 398 | 6 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 6 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 6 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 6 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 6 | int& used = used_.template Get<TypeToUse>(); | 406 | 6 | U* res = reinterpret_cast<U*>(data + used); | 407 | 6 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 6 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 6 | return res; | 410 | 6 | } |
descriptor.cc:google::protobuf::FieldDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FieldDescriptor>(int) Line | Count | Source | 397 | 158 | U* AllocateArray(int array_size) { | 398 | 158 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 158 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 158 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 158 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 158 | int& used = used_.template Get<TypeToUse>(); | 406 | 158 | U* res = reinterpret_cast<U*>(data + used); | 407 | 158 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 158 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 158 | return res; | 410 | 158 | } |
descriptor.cc:google::protobuf::OneofDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::OneofDescriptor>(int) Line | Count | Source | 397 | 76 | U* AllocateArray(int array_size) { | 398 | 76 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 76 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 76 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 76 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 76 | int& used = used_.template Get<TypeToUse>(); | 406 | 76 | U* res = reinterpret_cast<U*>(data + used); | 407 | 76 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 76 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 76 | return res; | 410 | 76 | } |
descriptor.cc:google::protobuf::Descriptor::ReservedRange* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::Descriptor::ReservedRange>(int) Line | Count | Source | 397 | 76 | U* AllocateArray(int array_size) { | 398 | 76 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 76 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 76 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 76 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 76 | int& used = used_.template Get<TypeToUse>(); | 406 | 76 | U* res = reinterpret_cast<U*>(data + used); | 407 | 76 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 76 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 76 | return res; | 410 | 76 | } |
descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const** google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>(int) Line | Count | Source | 397 | 94 | U* AllocateArray(int array_size) { | 398 | 94 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 94 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 94 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 94 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 94 | int& used = used_.template Get<TypeToUse>(); | 406 | 94 | U* res = reinterpret_cast<U*>(data + used); | 407 | 94 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 94 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 94 | return res; | 410 | 94 | } |
Unexecuted instantiation: descriptor.cc:google::protobuf::MessageOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::MessageOptions>(int) descriptor.cc:google::protobuf::FieldOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::FieldOptions>(int) Line | Count | Source | 397 | 12 | U* AllocateArray(int array_size) { | 398 | 12 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 12 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 12 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 12 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 12 | int& used = used_.template Get<TypeToUse>(); | 406 | 12 | U* res = reinterpret_cast<U*>(data + used); | 407 | 12 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 12 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 12 | return res; | 410 | 12 | } |
Unexecuted instantiation: descriptor.cc:google::protobuf::ExtensionRangeOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::ExtensionRangeOptions>(int) Unexecuted instantiation: descriptor.cc:google::protobuf::OneofOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::OneofOptions>(int) descriptor.cc:google::protobuf::EnumDescriptor::ReservedRange* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumDescriptor::ReservedRange>(int) Line | Count | Source | 397 | 18 | U* AllocateArray(int array_size) { | 398 | 18 | constexpr bool trivial = std::is_trivially_destructible<U>::value; | 399 | 18 | using TypeToUse = typename std::conditional<trivial, char, U>::type; | 400 | | | 401 | | // We can only allocate after FinalizePlanning has been called. | 402 | 18 | ABSL_CHECK(has_allocated()); | 403 | | | 404 | 18 | TypeToUse*& data = pointers_.template Get<TypeToUse>(); | 405 | 18 | int& used = used_.template Get<TypeToUse>(); | 406 | 18 | U* res = reinterpret_cast<U*>(data + used); | 407 | 18 | used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size; | 408 | 18 | ABSL_CHECK_LE(used, total_.template Get<TypeToUse>()); | 409 | 18 | return res; | 410 | 18 | } |
Unexecuted instantiation: descriptor.cc:google::protobuf::EnumOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumOptions>(int) Unexecuted instantiation: descriptor.cc:google::protobuf::EnumValueOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::EnumValueOptions>(int) Unexecuted instantiation: descriptor.cc:google::protobuf::MethodDescriptor* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::MethodDescriptor>(int) Unexecuted instantiation: descriptor.cc:google::protobuf::ServiceOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::ServiceOptions>(int) Unexecuted instantiation: descriptor.cc:google::protobuf::MethodOptions* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateArray<google::protobuf::MethodOptions>(int) |
411 | | |
412 | | template <typename... In> |
413 | 538 | const std::string* AllocateStrings(In&&... in) { |
414 | 538 | std::string* strings = AllocateArray<std::string>(sizeof...(in)); |
415 | 538 | std::string* res = strings; |
416 | 538 | Fold({(*strings++ = std::string(std::forward<In>(in)))...}); |
417 | 538 | return res; |
418 | 538 | } Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<absl::lts_20230125::string_view>(absl::lts_20230125::string_view&&) Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<char const (&) [1]>(char const (&) [1]) Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<absl::lts_20230125::string_view&, absl::lts_20230125::string_view&>(absl::lts_20230125::string_view&, absl::lts_20230125::string_view&) Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<char const (&) [18], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(char const (&) [18], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<absl::lts_20230125::string_view&>(absl::lts_20230125::string_view&) descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Line | Count | Source | 413 | 12 | const std::string* AllocateStrings(In&&... in) { | 414 | 12 | std::string* strings = AllocateArray<std::string>(sizeof...(in)); | 415 | 12 | std::string* res = strings; | 416 | 12 | Fold({(*strings++ = std::string(std::forward<In>(in)))...}); | 417 | 12 | return res; | 418 | 12 | } |
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) Line | Count | Source | 413 | 376 | const std::string* AllocateStrings(In&&... in) { | 414 | 376 | std::string* strings = AllocateArray<std::string>(sizeof...(in)); | 415 | 376 | std::string* res = strings; | 416 | 376 | Fold({(*strings++ = std::string(std::forward<In>(in)))...}); | 417 | 376 | return res; | 418 | 376 | } |
descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) Line | Count | Source | 413 | 150 | const std::string* AllocateStrings(In&&... in) { | 414 | 150 | std::string* strings = AllocateArray<std::string>(sizeof...(in)); | 415 | 150 | std::string* res = strings; | 416 | 150 | Fold({(*strings++ = std::string(std::forward<In>(in)))...}); | 417 | 150 | return res; | 418 | 150 | } |
Unexecuted instantiation: descriptor.cc:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const* google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::AllocateStrings<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) |
419 | | |
420 | | // Allocate all 5 names of the field: |
421 | | // name, full name, lowercase, camelcase and json. |
422 | | // It will dedup the strings when possible. |
423 | | // The resulting array contains `name` at index 0, `full_name` at index 1 |
424 | | // and the other 3 indices are specified in the result. |
425 | | void PlanFieldNames(const std::string& name, |
426 | 330 | const std::string* opt_json_name) { |
427 | 330 | ABSL_CHECK(!has_allocated()); |
428 | | |
429 | | // Fast path for snake_case names, which follow the style guide. |
430 | 330 | if (opt_json_name == nullptr) { |
431 | 330 | switch (GetFieldNameCase(name)) { |
432 | 180 | case FieldNameCase::kAllLower: |
433 | | // Case 1: they are all the same. |
434 | 180 | return PlanArray<std::string>(2); |
435 | 150 | case FieldNameCase::kSnakeCase: |
436 | | // Case 2: name==lower, camel==json |
437 | 150 | return PlanArray<std::string>(3); |
438 | 0 | default: |
439 | 0 | break; |
440 | 330 | } |
441 | 330 | } |
442 | | |
443 | 0 | std::string lowercase_name = name; |
444 | 0 | absl::AsciiStrToLower(&lowercase_name); |
445 | |
|
446 | 0 | std::string camelcase_name = ToCamelCase(name, /* lower_first = */ true); |
447 | 0 | std::string json_name = |
448 | 0 | opt_json_name != nullptr ? *opt_json_name : ToJsonName(name); |
449 | |
|
450 | 0 | absl::string_view all_names[] = {name, lowercase_name, camelcase_name, |
451 | 0 | json_name}; |
452 | 0 | std::sort(all_names, all_names + 4); |
453 | 0 | int unique = |
454 | 0 | static_cast<int>(std::unique(all_names, all_names + 4) - all_names); |
455 | |
|
456 | 0 | PlanArray<std::string>(unique + 1); |
457 | 0 | } |
458 | | |
459 | | struct FieldNamesResult { |
460 | | const std::string* array; |
461 | | int lowercase_index; |
462 | | int camelcase_index; |
463 | | int json_index; |
464 | | }; |
465 | | FieldNamesResult AllocateFieldNames(const std::string& name, |
466 | | const std::string& scope, |
467 | 330 | const std::string* opt_json_name) { |
468 | 330 | ABSL_CHECK(has_allocated()); |
469 | | |
470 | 330 | std::string full_name = |
471 | 330 | scope.empty() ? name : absl::StrCat(scope, ".", name); |
472 | | |
473 | | // Fast path for snake_case names, which follow the style guide. |
474 | 330 | if (opt_json_name == nullptr) { |
475 | 330 | switch (GetFieldNameCase(name)) { |
476 | 180 | case FieldNameCase::kAllLower: |
477 | | // Case 1: they are all the same. |
478 | 180 | return {AllocateStrings(name, std::move(full_name)), 0, 0, 0}; |
479 | 150 | case FieldNameCase::kSnakeCase: |
480 | | // Case 2: name==lower, camel==json |
481 | 150 | return {AllocateStrings(name, std::move(full_name), |
482 | 150 | ToCamelCase(name, /* lower_first = */ true)), |
483 | 150 | 0, 2, 2}; |
484 | 0 | default: |
485 | 0 | break; |
486 | 330 | } |
487 | 330 | } |
488 | | |
489 | 0 | std::vector<std::string> names; |
490 | 0 | names.push_back(name); |
491 | 0 | names.push_back(std::move(full_name)); |
492 | |
|
493 | 0 | const auto push_name = [&](std::string new_name) { |
494 | 0 | for (size_t i = 0; i < names.size(); ++i) { |
495 | | // Do not compare the full_name. It is unlikely to match, except in |
496 | | // custom json_name. We are not taking this into account in |
497 | | // PlanFieldNames so better to not try it. |
498 | 0 | if (i == 1) continue; |
499 | 0 | if (names[i] == new_name) return i; |
500 | 0 | } |
501 | 0 | names.push_back(std::move(new_name)); |
502 | 0 | return names.size() - 1; |
503 | 0 | }; |
504 | |
|
505 | 0 | FieldNamesResult result{nullptr, 0, 0, 0}; |
506 | |
|
507 | 0 | std::string lowercase_name = name; |
508 | 0 | absl::AsciiStrToLower(&lowercase_name); |
509 | 0 | result.lowercase_index = push_name(std::move(lowercase_name)); |
510 | 0 | result.camelcase_index = |
511 | 0 | push_name(ToCamelCase(name, /* lower_first = */ true)); |
512 | 0 | result.json_index = |
513 | 0 | push_name(opt_json_name != nullptr ? *opt_json_name : ToJsonName(name)); |
514 | |
|
515 | 0 | std::string* all_names = AllocateArray<std::string>(names.size()); |
516 | 0 | result.array = all_names; |
517 | 0 | std::move(names.begin(), names.end(), all_names); |
518 | |
|
519 | 0 | return result; |
520 | 330 | } |
521 | | |
522 | | template <typename Alloc> |
523 | 6 | void FinalizePlanning(Alloc& alloc) { |
524 | 6 | ABSL_CHECK(!has_allocated()); |
525 | | |
526 | 6 | pointers_ = alloc->CreateFlatAlloc(total_)->Pointers(); |
527 | | |
528 | 6 | ABSL_CHECK(has_allocated()); |
529 | 6 | } descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<google::protobuf::DescriptorPool::Tables*>(google::protobuf::DescriptorPool::Tables*&) Line | Count | Source | 523 | 6 | void FinalizePlanning(Alloc& alloc) { | 524 | 6 | ABSL_CHECK(!has_allocated()); | 525 | | | 526 | 6 | pointers_ = alloc->CreateFlatAlloc(total_)->Pointers(); | 527 | | | 528 | 6 | ABSL_CHECK(has_allocated()); | 529 | 6 | } |
Unexecuted instantiation: descriptor.cc:void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<std::__1::unique_ptr<google::protobuf::DescriptorPool::Tables, std::__1::default_delete<google::protobuf::DescriptorPool::Tables> > const>(std::__1::unique_ptr<google::protobuf::DescriptorPool::Tables, std::__1::default_delete<google::protobuf::DescriptorPool::Tables> > const&) |
530 | | |
531 | 6 | void ExpectConsumed() const { |
532 | | // We verify that we consumed all the memory requested if there was no |
533 | | // error in processing. |
534 | 6 | Fold({ExpectConsumed<T>()...}); |
535 | 6 | } |
536 | | |
537 | | private: |
538 | 3.36k | bool has_allocated() const { |
539 | 3.36k | return pointers_.template Get<char>() != nullptr; |
540 | 3.36k | } |
541 | | |
542 | 7.63k | static bool IsLower(char c) { return 'a' <= c && c <= 'z'; } |
543 | 432 | static bool IsDigit(char c) { return '0' <= c && c <= '9'; } |
544 | 6.97k | static bool IsLowerOrDigit(char c) { return IsLower(c) || IsDigit(c); } |
545 | | |
546 | | enum class FieldNameCase { kAllLower, kSnakeCase, kOther }; |
547 | 660 | FieldNameCase GetFieldNameCase(const std::string& name) { |
548 | 660 | if (!IsLower(name[0])) return FieldNameCase::kOther; |
549 | 660 | FieldNameCase best = FieldNameCase::kAllLower; |
550 | 6.97k | for (char c : name) { |
551 | 6.97k | if (IsLowerOrDigit(c)) { |
552 | | // nothing to do |
553 | 6.56k | } else if (c == '_') { |
554 | 416 | best = FieldNameCase::kSnakeCase; |
555 | 416 | } else { |
556 | 0 | return FieldNameCase::kOther; |
557 | 0 | } |
558 | 6.97k | } |
559 | 660 | return best; |
560 | 660 | } |
561 | | |
562 | | template <typename U> |
563 | 78 | bool ExpectConsumed() const { |
564 | 78 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); |
565 | 78 | return true; |
566 | 78 | } descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<char>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::SourceCodeInfo>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::FileDescriptorTables>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::MessageOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::FieldOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::EnumOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::EnumValueOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::ExtensionRangeOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::OneofOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::ServiceOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::MethodOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::ExpectConsumed<google::protobuf::FileOptions>() const Line | Count | Source | 563 | 6 | bool ExpectConsumed() const { | 564 | 6 | ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>()); | 565 | 6 | return true; | 566 | 6 | } |
|
567 | | |
568 | | TypeMap<PointerT, T...> pointers_; |
569 | | TypeMap<IntT, T...> total_; |
570 | | TypeMap<IntT, T...> used_; |
571 | | }; |
572 | | |
573 | | } // namespace |
574 | | |
575 | | class Symbol { |
576 | | public: |
577 | | enum Type { |
578 | | NULL_SYMBOL, |
579 | | MESSAGE, |
580 | | FIELD, |
581 | | ONEOF, |
582 | | ENUM, |
583 | | ENUM_VALUE, |
584 | | ENUM_VALUE_OTHER_PARENT, |
585 | | SERVICE, |
586 | | METHOD, |
587 | | FULL_PACKAGE, |
588 | | SUB_PACKAGE, |
589 | | }; |
590 | | |
591 | 372 | Symbol() { |
592 | 372 | static constexpr internal::SymbolBase null_symbol{}; |
593 | 372 | static_assert(null_symbol.symbol_type_ == NULL_SYMBOL, ""); |
594 | | // Initialize with a sentinel to make sure `ptr_` is never null. |
595 | 372 | ptr_ = &null_symbol; |
596 | 372 | } |
597 | | |
598 | | // Every object we store derives from internal::SymbolBase, where we store the |
599 | | // symbol type enum. |
600 | | // Storing in the object can be done without using more space in most cases, |
601 | | // while storing it in the Symbol type would require 8 bytes. |
602 | | #define DEFINE_MEMBERS(TYPE, TYPE_CONSTANT, FIELD) \ |
603 | 436 | explicit Symbol(TYPE* value) : ptr_(value) { \ |
604 | 436 | value->symbol_type_ = TYPE_CONSTANT; \ |
605 | 436 | } \ google::protobuf::Symbol::Symbol(google::protobuf::EnumDescriptor*) Line | Count | Source | 603 | 18 | explicit Symbol(TYPE* value) : ptr_(value) { \ | 604 | 18 | value->symbol_type_ = TYPE_CONSTANT; \ | 605 | 18 | } \ |
google::protobuf::Symbol::Symbol(google::protobuf::Descriptor*) Line | Count | Source | 603 | 76 | explicit Symbol(TYPE* value) : ptr_(value) { \ | 604 | 76 | value->symbol_type_ = TYPE_CONSTANT; \ | 605 | 76 | } \ |
google::protobuf::Symbol::Symbol(google::protobuf::FileDescriptor*) Line | Count | Source | 603 | 4 | explicit Symbol(TYPE* value) : ptr_(value) { \ | 604 | 4 | value->symbol_type_ = TYPE_CONSTANT; \ | 605 | 4 | } \ |
google::protobuf::Symbol::Symbol(google::protobuf::Symbol::Subpackage*) Line | Count | Source | 603 | 4 | explicit Symbol(TYPE* value) : ptr_(value) { \ | 604 | 4 | value->symbol_type_ = TYPE_CONSTANT; \ | 605 | 4 | } \ |
google::protobuf::Symbol::Symbol(google::protobuf::FieldDescriptor*) Line | Count | Source | 603 | 330 | explicit Symbol(TYPE* value) : ptr_(value) { \ | 604 | 330 | value->symbol_type_ = TYPE_CONSTANT; \ | 605 | 330 | } \ |
google::protobuf::Symbol::Symbol(google::protobuf::OneofDescriptor*) Line | Count | Source | 603 | 4 | explicit Symbol(TYPE* value) : ptr_(value) { \ | 604 | 4 | value->symbol_type_ = TYPE_CONSTANT; \ | 605 | 4 | } \ |
Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::ServiceDescriptor*) Unexecuted instantiation: google::protobuf::Symbol::Symbol(google::protobuf::MethodDescriptor*) |
606 | 309k | const TYPE* FIELD() const { \ |
607 | 309k | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ |
608 | 309k | } google::protobuf::Symbol::file_descriptor() const Line | Count | Source | 606 | 30 | const TYPE* FIELD() const { \ | 607 | 30 | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ | 608 | 30 | } |
google::protobuf::Symbol::sub_package_file_descriptor() const Line | Count | Source | 606 | 52 | const TYPE* FIELD() const { \ | 607 | 52 | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ | 608 | 52 | } |
google::protobuf::Symbol::field_descriptor() const Line | Count | Source | 606 | 307k | const TYPE* FIELD() const { \ | 607 | 307k | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ | 608 | 307k | } |
google::protobuf::Symbol::descriptor() const Line | Count | Source | 606 | 1.05k | const TYPE* FIELD() const { \ | 607 | 1.05k | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ | 608 | 1.05k | } |
google::protobuf::Symbol::oneof_descriptor() const Line | Count | Source | 606 | 36 | const TYPE* FIELD() const { \ | 607 | 36 | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ | 608 | 36 | } |
google::protobuf::Symbol::enum_descriptor() const Line | Count | Source | 606 | 172 | const TYPE* FIELD() const { \ | 607 | 172 | return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \ | 608 | 172 | } |
Unexecuted instantiation: google::protobuf::Symbol::service_descriptor() const Unexecuted instantiation: google::protobuf::Symbol::method_descriptor() const |
609 | | |
610 | | DEFINE_MEMBERS(Descriptor, MESSAGE, descriptor) |
611 | | DEFINE_MEMBERS(FieldDescriptor, FIELD, field_descriptor) |
612 | | DEFINE_MEMBERS(OneofDescriptor, ONEOF, oneof_descriptor) |
613 | | DEFINE_MEMBERS(EnumDescriptor, ENUM, enum_descriptor) |
614 | | DEFINE_MEMBERS(ServiceDescriptor, SERVICE, service_descriptor) |
615 | | DEFINE_MEMBERS(MethodDescriptor, METHOD, method_descriptor) |
616 | | DEFINE_MEMBERS(FileDescriptor, FULL_PACKAGE, file_descriptor) |
617 | | |
618 | | // We use a special node for subpackage FileDescriptor. |
619 | | // It is potentially added to the table with multiple different names, so we |
620 | | // need a separate place to put the name. |
621 | | struct Subpackage : internal::SymbolBase { |
622 | | int name_size; |
623 | | const FileDescriptor* file; |
624 | | }; |
625 | | DEFINE_MEMBERS(Subpackage, SUB_PACKAGE, sub_package_file_descriptor) |
626 | | |
627 | | // Enum values have two different parents. |
628 | | // We use two different identitied for the same object to determine the two |
629 | | // different insertions in the map. |
630 | 196 | static Symbol EnumValue(EnumValueDescriptor* value, int n) { |
631 | 196 | Symbol s; |
632 | 196 | internal::SymbolBase* ptr; |
633 | 196 | if (n == 0) { |
634 | 98 | ptr = static_cast<internal::SymbolBaseN<0>*>(value); |
635 | 98 | ptr->symbol_type_ = ENUM_VALUE; |
636 | 98 | } else { |
637 | 98 | ptr = static_cast<internal::SymbolBaseN<1>*>(value); |
638 | 98 | ptr->symbol_type_ = ENUM_VALUE_OTHER_PARENT; |
639 | 98 | } |
640 | 196 | s.ptr_ = ptr; |
641 | 196 | return s; |
642 | 196 | } |
643 | | |
644 | 1.26k | const EnumValueDescriptor* enum_value_descriptor() const { |
645 | 1.26k | return type() == ENUM_VALUE |
646 | 1.26k | ? static_cast<const EnumValueDescriptor*>( |
647 | 780 | static_cast<const internal::SymbolBaseN<0>*>(ptr_)) |
648 | 1.26k | : type() == ENUM_VALUE_OTHER_PARENT |
649 | 488 | ? static_cast<const EnumValueDescriptor*>( |
650 | 488 | static_cast<const internal::SymbolBaseN<1>*>(ptr_)) |
651 | 488 | : nullptr; |
652 | 1.26k | } |
653 | | |
654 | | #undef DEFINE_MEMBERS |
655 | | |
656 | 468k | Type type() const { return static_cast<Type>(ptr_->symbol_type_); } |
657 | 632 | bool IsNull() const { return type() == NULL_SYMBOL; } |
658 | 0 | bool IsType() const { return type() == MESSAGE || type() == ENUM; } |
659 | 0 | bool IsAggregate() const { |
660 | 0 | return IsType() || IsPackage() || type() == SERVICE; |
661 | 0 | } |
662 | 2 | bool IsPackage() const { |
663 | 2 | return type() == FULL_PACKAGE || type() == SUB_PACKAGE; |
664 | 2 | } |
665 | | |
666 | 286 | const FileDescriptor* GetFile() const { |
667 | 286 | switch (type()) { |
668 | 260 | case MESSAGE: |
669 | 260 | return descriptor()->file(); |
670 | 0 | case FIELD: |
671 | 0 | return field_descriptor()->file(); |
672 | 0 | case ONEOF: |
673 | 0 | return oneof_descriptor()->containing_type()->file(); |
674 | 18 | case ENUM: |
675 | 18 | return enum_descriptor()->file(); |
676 | 8 | case ENUM_VALUE: |
677 | 8 | return enum_value_descriptor()->type()->file(); |
678 | 0 | case SERVICE: |
679 | 0 | return service_descriptor()->file(); |
680 | 0 | case METHOD: |
681 | 0 | return method_descriptor()->service()->file(); |
682 | 0 | case FULL_PACKAGE: |
683 | 0 | return file_descriptor(); |
684 | 0 | case SUB_PACKAGE: |
685 | 0 | return sub_package_file_descriptor()->file; |
686 | 0 | default: |
687 | 0 | return nullptr; |
688 | 286 | } |
689 | 286 | } |
690 | | |
691 | 1.64k | absl::string_view full_name() const { |
692 | 1.64k | switch (type()) { |
693 | 316 | case MESSAGE: |
694 | 316 | return descriptor()->full_name(); |
695 | 954 | case FIELD: |
696 | 954 | return field_descriptor()->full_name(); |
697 | 20 | case ONEOF: |
698 | 20 | return oneof_descriptor()->full_name(); |
699 | 52 | case ENUM: |
700 | 52 | return enum_descriptor()->full_name(); |
701 | 244 | case ENUM_VALUE: |
702 | 244 | return enum_value_descriptor()->full_name(); |
703 | 0 | case SERVICE: |
704 | 0 | return service_descriptor()->full_name(); |
705 | 0 | case METHOD: |
706 | 0 | return method_descriptor()->full_name(); |
707 | 30 | case FULL_PACKAGE: |
708 | 30 | return file_descriptor()->package(); |
709 | 26 | case SUB_PACKAGE: |
710 | 26 | return absl::string_view(sub_package_file_descriptor()->file->package()) |
711 | 26 | .substr(0, sub_package_file_descriptor()->name_size); |
712 | 0 | default: |
713 | 0 | ABSL_CHECK(false); |
714 | 1.64k | } |
715 | 0 | return ""; |
716 | 1.64k | } |
717 | | |
718 | 154k | std::pair<const void*, absl::string_view> parent_name_key() const { |
719 | 154k | const auto or_file = [&](const void* p) { return p ? p : GetFile(); }; |
720 | 154k | switch (type()) { |
721 | 189 | case MESSAGE: |
722 | 189 | return {or_file(descriptor()->containing_type()), descriptor()->name()}; |
723 | 153k | case FIELD: { |
724 | 153k | auto* field = field_descriptor(); |
725 | 153k | return {or_file(field->is_extension() ? field->extension_scope() |
726 | 153k | : field->containing_type()), |
727 | 153k | field->name()}; |
728 | 0 | } |
729 | 8 | case ONEOF: |
730 | 8 | return {oneof_descriptor()->containing_type(), |
731 | 8 | oneof_descriptor()->name()}; |
732 | 42 | case ENUM: |
733 | 42 | return {or_file(enum_descriptor()->containing_type()), |
734 | 42 | enum_descriptor()->name()}; |
735 | 260 | case ENUM_VALUE: |
736 | 260 | return {or_file(enum_value_descriptor()->type()->containing_type()), |
737 | 260 | enum_value_descriptor()->name()}; |
738 | 244 | case ENUM_VALUE_OTHER_PARENT: |
739 | 244 | return {enum_value_descriptor()->type(), |
740 | 244 | enum_value_descriptor()->name()}; |
741 | 0 | case SERVICE: |
742 | 0 | return {GetFile(), service_descriptor()->name()}; |
743 | 0 | case METHOD: |
744 | 0 | return {method_descriptor()->service(), method_descriptor()->name()}; |
745 | 0 | default: |
746 | 0 | ABSL_CHECK(false); |
747 | 154k | } |
748 | 0 | return {}; |
749 | 154k | } |
750 | | |
751 | | private: |
752 | | const internal::SymbolBase* ptr_; |
753 | | }; |
754 | | |
755 | | const FieldDescriptor::CppType |
756 | | FieldDescriptor::kTypeToCppTypeMap[MAX_TYPE + 1] = { |
757 | | static_cast<CppType>(0), // 0 is reserved for errors |
758 | | |
759 | | CPPTYPE_DOUBLE, // TYPE_DOUBLE |
760 | | CPPTYPE_FLOAT, // TYPE_FLOAT |
761 | | CPPTYPE_INT64, // TYPE_INT64 |
762 | | CPPTYPE_UINT64, // TYPE_UINT64 |
763 | | CPPTYPE_INT32, // TYPE_INT32 |
764 | | CPPTYPE_UINT64, // TYPE_FIXED64 |
765 | | CPPTYPE_UINT32, // TYPE_FIXED32 |
766 | | CPPTYPE_BOOL, // TYPE_BOOL |
767 | | CPPTYPE_STRING, // TYPE_STRING |
768 | | CPPTYPE_MESSAGE, // TYPE_GROUP |
769 | | CPPTYPE_MESSAGE, // TYPE_MESSAGE |
770 | | CPPTYPE_STRING, // TYPE_BYTES |
771 | | CPPTYPE_UINT32, // TYPE_UINT32 |
772 | | CPPTYPE_ENUM, // TYPE_ENUM |
773 | | CPPTYPE_INT32, // TYPE_SFIXED32 |
774 | | CPPTYPE_INT64, // TYPE_SFIXED64 |
775 | | CPPTYPE_INT32, // TYPE_SINT32 |
776 | | CPPTYPE_INT64, // TYPE_SINT64 |
777 | | }; |
778 | | |
779 | | const char* const FieldDescriptor::kTypeToName[MAX_TYPE + 1] = { |
780 | | "ERROR", // 0 is reserved for errors |
781 | | |
782 | | "double", // TYPE_DOUBLE |
783 | | "float", // TYPE_FLOAT |
784 | | "int64", // TYPE_INT64 |
785 | | "uint64", // TYPE_UINT64 |
786 | | "int32", // TYPE_INT32 |
787 | | "fixed64", // TYPE_FIXED64 |
788 | | "fixed32", // TYPE_FIXED32 |
789 | | "bool", // TYPE_BOOL |
790 | | "string", // TYPE_STRING |
791 | | "group", // TYPE_GROUP |
792 | | "message", // TYPE_MESSAGE |
793 | | "bytes", // TYPE_BYTES |
794 | | "uint32", // TYPE_UINT32 |
795 | | "enum", // TYPE_ENUM |
796 | | "sfixed32", // TYPE_SFIXED32 |
797 | | "sfixed64", // TYPE_SFIXED64 |
798 | | "sint32", // TYPE_SINT32 |
799 | | "sint64", // TYPE_SINT64 |
800 | | }; |
801 | | |
802 | | const char* const FieldDescriptor::kCppTypeToName[MAX_CPPTYPE + 1] = { |
803 | | "ERROR", // 0 is reserved for errors |
804 | | |
805 | | "int32", // CPPTYPE_INT32 |
806 | | "int64", // CPPTYPE_INT64 |
807 | | "uint32", // CPPTYPE_UINT32 |
808 | | "uint64", // CPPTYPE_UINT64 |
809 | | "double", // CPPTYPE_DOUBLE |
810 | | "float", // CPPTYPE_FLOAT |
811 | | "bool", // CPPTYPE_BOOL |
812 | | "enum", // CPPTYPE_ENUM |
813 | | "string", // CPPTYPE_STRING |
814 | | "message", // CPPTYPE_MESSAGE |
815 | | }; |
816 | | |
817 | | const char* const FieldDescriptor::kLabelToName[MAX_LABEL + 1] = { |
818 | | "ERROR", // 0 is reserved for errors |
819 | | |
820 | | "optional", // LABEL_OPTIONAL |
821 | | "required", // LABEL_REQUIRED |
822 | | "repeated", // LABEL_REPEATED |
823 | | }; |
824 | | |
825 | 0 | const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) { |
826 | 0 | switch (syntax) { |
827 | 0 | case SYNTAX_PROTO2: |
828 | 0 | return "proto2"; |
829 | 0 | case SYNTAX_PROTO3: |
830 | 0 | return "proto3"; |
831 | 0 | case SYNTAX_UNKNOWN: |
832 | 0 | return "unknown"; |
833 | 0 | } |
834 | 0 | ABSL_LOG(FATAL) << "can't reach here."; |
835 | 0 | return nullptr; |
836 | 0 | } |
837 | | |
838 | | static const char* const kNonLinkedWeakMessageReplacementName = "google.protobuf.Empty"; |
839 | | |
840 | | #if !defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912) |
841 | | const int FieldDescriptor::kMaxNumber; |
842 | | const int FieldDescriptor::kFirstReservedNumber; |
843 | | const int FieldDescriptor::kLastReservedNumber; |
844 | | #endif |
845 | | |
846 | | namespace { |
847 | | |
848 | 0 | std::string EnumValueToPascalCase(const std::string& input) { |
849 | 0 | bool next_upper = true; |
850 | 0 | std::string result; |
851 | 0 | result.reserve(input.size()); |
852 | |
|
853 | 0 | for (char character : input) { |
854 | 0 | if (character == '_') { |
855 | 0 | next_upper = true; |
856 | 0 | } else { |
857 | 0 | if (next_upper) { |
858 | 0 | result.push_back(absl::ascii_toupper(character)); |
859 | 0 | } else { |
860 | 0 | result.push_back(absl::ascii_tolower(character)); |
861 | 0 | } |
862 | 0 | next_upper = false; |
863 | 0 | } |
864 | 0 | } |
865 | |
|
866 | 0 | return result; |
867 | 0 | } |
868 | | |
869 | | // Class to remove an enum prefix from enum values. |
870 | | class PrefixRemover { |
871 | | public: |
872 | 0 | PrefixRemover(absl::string_view prefix) { |
873 | | // Strip underscores and lower-case the prefix. |
874 | 0 | for (char character : prefix) { |
875 | 0 | if (character != '_') { |
876 | 0 | prefix_ += absl::ascii_tolower(character); |
877 | 0 | } |
878 | 0 | } |
879 | 0 | } |
880 | | |
881 | | // Tries to remove the enum prefix from this enum value. |
882 | | // If this is not possible, returns the input verbatim. |
883 | 0 | std::string MaybeRemove(absl::string_view str) { |
884 | | // We can't just lowercase and strip str and look for a prefix. |
885 | | // We need to properly recognize the difference between: |
886 | | // |
887 | | // enum Foo { |
888 | | // FOO_BAR_BAZ = 0; |
889 | | // FOO_BARBAZ = 1; |
890 | | // } |
891 | | // |
892 | | // This is acceptable (though perhaps not advisable) because even when |
893 | | // we PascalCase, these two will still be distinct (BarBaz vs. Barbaz). |
894 | 0 | size_t i, j; |
895 | | |
896 | | // Skip past prefix_ in str if we can. |
897 | 0 | for (i = 0, j = 0; i < str.size() && j < prefix_.size(); i++) { |
898 | 0 | if (str[i] == '_') { |
899 | 0 | continue; |
900 | 0 | } |
901 | | |
902 | 0 | if (absl::ascii_tolower(str[i]) != prefix_[j++]) { |
903 | 0 | return std::string(str); |
904 | 0 | } |
905 | 0 | } |
906 | | |
907 | | // If we didn't make it through the prefix, we've failed to strip the |
908 | | // prefix. |
909 | 0 | if (j < prefix_.size()) { |
910 | 0 | return std::string(str); |
911 | 0 | } |
912 | | |
913 | | // Skip underscores between prefix and further characters. |
914 | 0 | while (i < str.size() && str[i] == '_') { |
915 | 0 | i++; |
916 | 0 | } |
917 | | |
918 | | // Enum label can't be the empty string. |
919 | 0 | if (i == str.size()) { |
920 | 0 | return std::string(str); |
921 | 0 | } |
922 | | |
923 | | // We successfully stripped the prefix. |
924 | 0 | str.remove_prefix(i); |
925 | 0 | return std::string(str); |
926 | 0 | } |
927 | | |
928 | | private: |
929 | | std::string prefix_; |
930 | | }; |
931 | | |
932 | | // A DescriptorPool contains a bunch of hash-maps to implement the |
933 | | // various Find*By*() methods. Since hashtable lookups are O(1), it's |
934 | | // most efficient to construct a fixed set of large hash-maps used by |
935 | | // all objects in the pool rather than construct one or more small |
936 | | // hash-maps for each object. |
937 | | // |
938 | | // The keys to these hash-maps are (parent, name) or (parent, number) pairs. |
939 | | struct FullNameQuery { |
940 | | absl::string_view query; |
941 | 264 | absl::string_view full_name() const { return query; } |
942 | | }; |
943 | | struct SymbolByFullNameHash { |
944 | | using is_transparent = void; |
945 | | |
946 | | template <typename T> |
947 | 1.56k | size_t operator()(const T& s) const { |
948 | 1.56k | return absl::HashOf(s.full_name()); |
949 | 1.56k | } descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByFullNameHash::operator()<google::protobuf::(anonymous namespace)::FullNameQuery>(google::protobuf::(anonymous namespace)::FullNameQuery const&) const Line | Count | Source | 947 | 136 | size_t operator()(const T& s) const { | 948 | 136 | return absl::HashOf(s.full_name()); | 949 | 136 | } |
descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByFullNameHash::operator()<google::protobuf::Symbol>(google::protobuf::Symbol const&) const Line | Count | Source | 947 | 1.42k | size_t operator()(const T& s) const { | 948 | 1.42k | return absl::HashOf(s.full_name()); | 949 | 1.42k | } |
|
950 | | }; |
951 | | struct SymbolByFullNameEq { |
952 | | using is_transparent = void; |
953 | | |
954 | | template <typename T, typename U> |
955 | 173 | bool operator()(const T& a, const U& b) const { |
956 | 173 | return a.full_name() == b.full_name(); |
957 | 173 | } descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByFullNameEq::operator()<google::protobuf::Symbol, google::protobuf::(anonymous namespace)::FullNameQuery>(google::protobuf::Symbol const&, google::protobuf::(anonymous namespace)::FullNameQuery const&) const Line | Count | Source | 955 | 128 | bool operator()(const T& a, const U& b) const { | 956 | 128 | return a.full_name() == b.full_name(); | 957 | 128 | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByFullNameEq::operator()<google::protobuf::Symbol, google::protobuf::Symbol>(google::protobuf::Symbol const&, google::protobuf::Symbol const&) const Line | Count | Source | 955 | 45 | bool operator()(const T& a, const U& b) const { | 956 | 45 | return a.full_name() == b.full_name(); | 957 | 45 | } |
|
958 | | }; |
959 | | using SymbolsByNameSet = |
960 | | absl::flat_hash_set<Symbol, SymbolByFullNameHash, SymbolByFullNameEq>; |
961 | | |
962 | | struct ParentNameQuery { |
963 | | std::pair<const void*, absl::string_view> query; |
964 | 305k | std::pair<const void*, absl::string_view> parent_name_key() const { |
965 | 305k | return query; |
966 | 305k | } |
967 | | }; |
968 | | struct SymbolByParentHash { |
969 | | using is_transparent = void; |
970 | | |
971 | | template <typename T> |
972 | 154k | size_t operator()(const T& s) const { |
973 | 154k | return absl::HashOf(s.parent_name_key()); |
974 | 154k | } descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByParentHash::operator()<google::protobuf::(anonymous namespace)::ParentNameQuery>(google::protobuf::(anonymous namespace)::ParentNameQuery const&) const Line | Count | Source | 972 | 152k | size_t operator()(const T& s) const { | 973 | 152k | return absl::HashOf(s.parent_name_key()); | 974 | 152k | } |
descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::SymbolByParentHash::operator()<google::protobuf::Symbol>(google::protobuf::Symbol const&) const Line | Count | Source | 972 | 1.62k | size_t operator()(const T& s) const { | 973 | 1.62k | return absl::HashOf(s.parent_name_key()); | 974 | 1.62k | } |
|
975 | | }; |
976 | | struct SymbolByParentEq { |
977 | | using is_transparent = void; |
978 | | |
979 | | template <typename T, typename U> |
980 | 153k | bool operator()(const T& a, const U& b) const { |
981 | 153k | return a.parent_name_key() == b.parent_name_key(); |
982 | 153k | } descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByParentEq::operator()<google::protobuf::Symbol, google::protobuf::(anonymous namespace)::ParentNameQuery>(google::protobuf::Symbol const&, google::protobuf::(anonymous namespace)::ParentNameQuery const&) const Line | Count | Source | 980 | 152k | bool operator()(const T& a, const U& b) const { | 981 | 152k | return a.parent_name_key() == b.parent_name_key(); | 982 | 152k | } |
descriptor.cc:bool google::protobuf::(anonymous namespace)::SymbolByParentEq::operator()<google::protobuf::Symbol, google::protobuf::Symbol>(google::protobuf::Symbol const&, google::protobuf::Symbol const&) const Line | Count | Source | 980 | 55 | bool operator()(const T& a, const U& b) const { | 981 | 55 | return a.parent_name_key() == b.parent_name_key(); | 982 | 55 | } |
|
983 | | }; |
984 | | using SymbolsByParentSet = |
985 | | absl::flat_hash_set<Symbol, SymbolByParentHash, SymbolByParentEq>; |
986 | | |
987 | | struct FilesByNameHash { |
988 | | using is_transparent = void; |
989 | | |
990 | 18 | size_t operator()(absl::string_view name) const { return absl::HashOf(name); } |
991 | | |
992 | 8 | size_t operator()(const FileDescriptor* file) const { |
993 | 8 | return absl::HashOf(file->name()); |
994 | 8 | } |
995 | | }; |
996 | | |
997 | | struct FilesByNameEq { |
998 | | using is_transparent = void; |
999 | | |
1000 | 0 | bool operator()(absl::string_view lhs, absl::string_view rhs) const { |
1001 | 0 | return lhs == rhs; |
1002 | 0 | } |
1003 | 0 | bool operator()(absl::string_view lhs, const FileDescriptor* rhs) const { |
1004 | 0 | return lhs == rhs->name(); |
1005 | 0 | } |
1006 | 6 | bool operator()(const FileDescriptor* lhs, absl::string_view rhs) const { |
1007 | 6 | return lhs->name() == rhs; |
1008 | 6 | } |
1009 | 0 | bool operator()(const FileDescriptor* lhs, const FileDescriptor* rhs) const { |
1010 | 0 | return lhs == rhs || lhs->name() == rhs->name(); |
1011 | 0 | } |
1012 | | }; |
1013 | | using FilesByNameSet = |
1014 | | absl::flat_hash_set<const FileDescriptor*, FilesByNameHash, FilesByNameEq>; |
1015 | | |
1016 | | using FieldsByNameMap = |
1017 | | absl::flat_hash_map<std::pair<const void*, absl::string_view>, |
1018 | | const FieldDescriptor*>; |
1019 | | |
1020 | | struct ParentNumberQuery { |
1021 | | std::pair<const void*, int> query; |
1022 | | }; |
1023 | 400 | std::pair<const void*, int> ObjectToParentNumber(const FieldDescriptor* field) { |
1024 | 400 | return {field->containing_type(), field->number()}; |
1025 | 400 | } |
1026 | | std::pair<const void*, int> ObjectToParentNumber( |
1027 | 0 | const EnumValueDescriptor* enum_value) { |
1028 | 0 | return {enum_value->type(), enum_value->number()}; |
1029 | 0 | } |
1030 | 0 | std::pair<const void*, int> ObjectToParentNumber(ParentNumberQuery query) { |
1031 | 0 | return query.query; |
1032 | 0 | } |
1033 | | struct ParentNumberHash { |
1034 | | using is_transparent = void; |
1035 | | |
1036 | | template <typename T> |
1037 | 378 | size_t operator()(const T& t) const { |
1038 | 378 | return absl::HashOf(ObjectToParentNumber(t)); |
1039 | 378 | } Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::(anonymous namespace)::ParentNumberQuery>(google::protobuf::(anonymous namespace)::ParentNumberQuery const&) const Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::EnumValueDescriptor*>(google::protobuf::EnumValueDescriptor* const&) const Unexecuted instantiation: descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::EnumValueDescriptor const*>(google::protobuf::EnumValueDescriptor const* const&) const descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::FieldDescriptor*>(google::protobuf::FieldDescriptor* const&) const Line | Count | Source | 1037 | 160 | size_t operator()(const T& t) const { | 1038 | 160 | return absl::HashOf(ObjectToParentNumber(t)); | 1039 | 160 | } |
descriptor.cc:unsigned long google::protobuf::(anonymous namespace)::ParentNumberHash::operator()<google::protobuf::FieldDescriptor const*>(google::protobuf::FieldDescriptor const* const&) const Line | Count | Source | 1037 | 218 | size_t operator()(const T& t) const { | 1038 | 218 | return absl::HashOf(ObjectToParentNumber(t)); | 1039 | 218 | } |
|
1040 | | }; |
1041 | | struct ParentNumberEq { |
1042 | | using is_transparent = void; |
1043 | | |
1044 | | template <typename T, typename U> |
1045 | 11 | bool operator()(const T& a, const U& b) const { |
1046 | 11 | return ObjectToParentNumber(a) == ObjectToParentNumber(b); |
1047 | 11 | } Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::ParentNumberQuery>(google::protobuf::FieldDescriptor const* const&, google::protobuf::(anonymous namespace)::ParentNumberQuery const&) const Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::EnumValueDescriptor const*, google::protobuf::(anonymous namespace)::ParentNumberQuery>(google::protobuf::EnumValueDescriptor const* const&, google::protobuf::(anonymous namespace)::ParentNumberQuery const&) const Unexecuted instantiation: descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::EnumValueDescriptor const*, google::protobuf::EnumValueDescriptor*>(google::protobuf::EnumValueDescriptor const* const&, google::protobuf::EnumValueDescriptor* const&) const descriptor.cc:bool google::protobuf::(anonymous namespace)::ParentNumberEq::operator()<google::protobuf::FieldDescriptor const*, google::protobuf::FieldDescriptor*>(google::protobuf::FieldDescriptor const* const&, google::protobuf::FieldDescriptor* const&) const Line | Count | Source | 1045 | 11 | bool operator()(const T& a, const U& b) const { | 1046 | 11 | return ObjectToParentNumber(a) == ObjectToParentNumber(b); | 1047 | 11 | } |
|
1048 | | }; |
1049 | | using FieldsByNumberSet = absl::flat_hash_set<const FieldDescriptor*, |
1050 | | ParentNumberHash, ParentNumberEq>; |
1051 | | using EnumValuesByNumberSet = |
1052 | | absl::flat_hash_set<const EnumValueDescriptor*, ParentNumberHash, |
1053 | | ParentNumberEq>; |
1054 | | |
1055 | | // This is a map rather than a hash-map, since we use it to iterate |
1056 | | // through all the extensions that extend a given Descriptor, and an |
1057 | | // ordered data structure that implements lower_bound is convenient |
1058 | | // for that. |
1059 | | using ExtensionsGroupedByDescriptorMap = |
1060 | | absl::btree_map<std::pair<const Descriptor*, int>, const FieldDescriptor*>; |
1061 | | using LocationsByPathMap = |
1062 | | absl::flat_hash_map<std::string, const SourceCodeInfo_Location*>; |
1063 | | |
1064 | 0 | absl::flat_hash_set<std::string>* NewAllowedProto3Extendee() { |
1065 | 0 | const char* kOptionNames[] = { |
1066 | 0 | "FileOptions", "MessageOptions", "FieldOptions", |
1067 | 0 | "EnumOptions", "EnumValueOptions", "ServiceOptions", |
1068 | 0 | "MethodOptions", "OneofOptions", "ExtensionRangeOptions"}; |
1069 | 0 | auto allowed_proto3_extendees = new absl::flat_hash_set<std::string>(); |
1070 | 0 | allowed_proto3_extendees->reserve(sizeof(kOptionNames) / |
1071 | 0 | sizeof(kOptionNames[0])); |
1072 | |
|
1073 | 0 | for (const char* option_name : kOptionNames) { |
1074 | | // descriptor.proto has a different package name in opensource. We allow |
1075 | | // both so the opensource protocol compiler can also compile internal |
1076 | | // proto3 files with custom options. See: b/27567912 |
1077 | 0 | allowed_proto3_extendees->insert(std::string("google.protobuf.") + |
1078 | 0 | option_name); |
1079 | | // Split the word to trick the opensource processing scripts so they |
1080 | | // will keep the original package name. |
1081 | 0 | allowed_proto3_extendees->insert(std::string("proto2.") + option_name); |
1082 | 0 | } |
1083 | 0 | return allowed_proto3_extendees; |
1084 | 0 | } |
1085 | | |
1086 | | // Checks whether the extendee type is allowed in proto3. |
1087 | | // Only extensions to descriptor options are allowed. We use name comparison |
1088 | | // instead of comparing the descriptor directly because the extensions may be |
1089 | | // defined in a different pool. |
1090 | 0 | bool AllowedExtendeeInProto3(const std::string& name) { |
1091 | 0 | static auto allowed_proto3_extendees = |
1092 | 0 | internal::OnShutdownDelete(NewAllowedProto3Extendee()); |
1093 | 0 | return allowed_proto3_extendees->find(name) != |
1094 | 0 | allowed_proto3_extendees->end(); |
1095 | 0 | } |
1096 | | } // anonymous namespace |
1097 | | |
1098 | | // Contains tables specific to a particular file. These tables are not |
1099 | | // modified once the file has been constructed, so they need not be |
1100 | | // protected by a mutex. This makes operations that depend only on the |
1101 | | // contents of a single file -- e.g. Descriptor::FindFieldByName() -- |
1102 | | // lock-free. |
1103 | | // |
1104 | | // For historical reasons, the definitions of the methods of |
1105 | | // FileDescriptorTables and DescriptorPool::Tables are interleaved below. |
1106 | | // These used to be a single class. |
1107 | | class FileDescriptorTables { |
1108 | | public: |
1109 | | FileDescriptorTables(); |
1110 | | ~FileDescriptorTables(); |
1111 | | |
1112 | | // Empty table, used with placeholder files. |
1113 | | inline static const FileDescriptorTables& GetEmptyInstance(); |
1114 | | |
1115 | | // ----------------------------------------------------------------- |
1116 | | // Finding items. |
1117 | | |
1118 | | // Returns a null Symbol (symbol.IsNull() is true) if not found. |
1119 | | // TODO(sbenza): All callers to this function know the type they are looking |
1120 | | // for. If we propagate that information statically we can make the query |
1121 | | // faster. |
1122 | | inline Symbol FindNestedSymbol(const void* parent, |
1123 | | absl::string_view name) const; |
1124 | | |
1125 | | // These return nullptr if not found. |
1126 | | inline const FieldDescriptor* FindFieldByNumber(const Descriptor* parent, |
1127 | | int number) const; |
1128 | | inline const FieldDescriptor* FindFieldByLowercaseName( |
1129 | | const void* parent, absl::string_view lowercase_name) const; |
1130 | | inline const FieldDescriptor* FindFieldByCamelcaseName( |
1131 | | const void* parent, absl::string_view camelcase_name) const; |
1132 | | inline const EnumValueDescriptor* FindEnumValueByNumber( |
1133 | | const EnumDescriptor* parent, int number) const; |
1134 | | // This creates a new EnumValueDescriptor if not found, in a thread-safe way. |
1135 | | inline const EnumValueDescriptor* FindEnumValueByNumberCreatingIfUnknown( |
1136 | | const EnumDescriptor* parent, int number) const; |
1137 | | |
1138 | | // ----------------------------------------------------------------- |
1139 | | // Adding items. |
1140 | | |
1141 | | // These add items to the corresponding tables. They return false if |
1142 | | // the key already exists in the table. |
1143 | | bool AddAliasUnderParent(const void* parent, absl::string_view name, |
1144 | | Symbol symbol); |
1145 | | bool AddFieldByNumber(FieldDescriptor* field); |
1146 | | bool AddEnumValueByNumber(EnumValueDescriptor* value); |
1147 | | |
1148 | | // Populates p->first->locations_by_path_ from p->second. |
1149 | | // Unusual signature dictated by absl::call_once. |
1150 | | static void BuildLocationsByPath( |
1151 | | std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p); |
1152 | | |
1153 | | // Returns the location denoted by the specified path through info, |
1154 | | // or nullptr if not found. |
1155 | | // The value of info must be that of the corresponding FileDescriptor. |
1156 | | // (Conceptually a pure function, but stateful as an optimisation.) |
1157 | | const SourceCodeInfo_Location* GetSourceLocation( |
1158 | | const std::vector<int>& path, const SourceCodeInfo* info) const; |
1159 | | |
1160 | | // Must be called after BuildFileImpl(), even if the build failed and |
1161 | | // we are going to roll back to the last checkpoint. |
1162 | | void FinalizeTables(); |
1163 | | |
1164 | | private: |
1165 | | const void* FindParentForFieldsByMap(const FieldDescriptor* field) const; |
1166 | | static void FieldsByLowercaseNamesLazyInitStatic( |
1167 | | const FileDescriptorTables* tables); |
1168 | | void FieldsByLowercaseNamesLazyInitInternal() const; |
1169 | | static void FieldsByCamelcaseNamesLazyInitStatic( |
1170 | | const FileDescriptorTables* tables); |
1171 | | void FieldsByCamelcaseNamesLazyInitInternal() const; |
1172 | | |
1173 | | SymbolsByParentSet symbols_by_parent_; |
1174 | | mutable absl::once_flag fields_by_lowercase_name_once_; |
1175 | | mutable absl::once_flag fields_by_camelcase_name_once_; |
1176 | | // Make these fields atomic to avoid race conditions with |
1177 | | // GetEstimatedOwnedMemoryBytesSize. Once the pointer is set the map won't |
1178 | | // change anymore. |
1179 | | mutable std::atomic<const FieldsByNameMap*> fields_by_lowercase_name_{}; |
1180 | | mutable std::atomic<const FieldsByNameMap*> fields_by_camelcase_name_{}; |
1181 | | FieldsByNumberSet fields_by_number_; // Not including extensions. |
1182 | | EnumValuesByNumberSet enum_values_by_number_; |
1183 | | mutable EnumValuesByNumberSet unknown_enum_values_by_number_ |
1184 | | PROTOBUF_GUARDED_BY(unknown_enum_values_mu_); |
1185 | | |
1186 | | // Populated on first request to save space, hence constness games. |
1187 | | mutable absl::once_flag locations_by_path_once_; |
1188 | | mutable LocationsByPathMap locations_by_path_; |
1189 | | |
1190 | | // Mutex to protect the unknown-enum-value map due to dynamic |
1191 | | // EnumValueDescriptor creation on unknown values. |
1192 | | mutable absl::Mutex unknown_enum_values_mu_; |
1193 | | }; |
1194 | | |
1195 | | namespace internal { |
1196 | | |
1197 | | // Small sequential allocator to be used within a single file. |
1198 | | // Most of the memory for a single FileDescriptor and everything under it is |
1199 | | // allocated in a single block of memory, with the FlatAllocator giving it out |
1200 | | // in parts later. |
1201 | | // The code first plans the total number of bytes needed by calling PlanArray |
1202 | | // with all the allocations that will happen afterwards, then calls |
1203 | | // FinalizePlanning passing the underlying allocator (the DescriptorPool::Tables |
1204 | | // instance), and then proceeds to get the memory via |
1205 | | // `AllocateArray`/`AllocateString` calls. The calls to PlanArray and |
1206 | | // The calls have to match between planning and allocating, though not |
1207 | | // necessarily in the same order. |
1208 | | class FlatAllocator |
1209 | | : public decltype(ApplyTypeList<FlatAllocatorImpl>( |
1210 | | SortByAlignment<char, std::string, SourceCodeInfo, |
1211 | | FileDescriptorTables, |
1212 | | // Option types |
1213 | | MessageOptions, FieldOptions, EnumOptions, |
1214 | | EnumValueOptions, ExtensionRangeOptions, OneofOptions, |
1215 | | ServiceOptions, MethodOptions, FileOptions>())) {}; |
1216 | | |
1217 | | } // namespace internal |
1218 | | |
1219 | | // =================================================================== |
1220 | | // DescriptorPool::Tables |
1221 | | |
1222 | | class DescriptorPool::Tables { |
1223 | | public: |
1224 | | Tables(); |
1225 | | ~Tables(); |
1226 | | |
1227 | | // Record the current state of the tables to the stack of checkpoints. |
1228 | | // Each call to AddCheckpoint() must be paired with exactly one call to either |
1229 | | // ClearLastCheckpoint() or RollbackToLastCheckpoint(). |
1230 | | // |
1231 | | // This is used when building files, since some kinds of validation errors |
1232 | | // cannot be detected until the file's descriptors have already been added to |
1233 | | // the tables. |
1234 | | // |
1235 | | // This supports recursive checkpoints, since building a file may trigger |
1236 | | // recursive building of other files. Note that recursive checkpoints are not |
1237 | | // normally necessary; explicit dependencies are built prior to checkpointing. |
1238 | | // So although we recursively build transitive imports, there is at most one |
1239 | | // checkpoint in the stack during dependency building. |
1240 | | // |
1241 | | // Recursive checkpoints only arise during cross-linking of the descriptors. |
1242 | | // Symbol references must be resolved, via DescriptorBuilder::FindSymbol and |
1243 | | // friends. If the pending file references an unknown symbol |
1244 | | // (e.g., it is not defined in the pending file's explicit dependencies), and |
1245 | | // the pool is using a fallback database, and that database contains a file |
1246 | | // defining that symbol, and that file has not yet been built by the pool, |
1247 | | // the pool builds the file during cross-linking, leading to another |
1248 | | // checkpoint. |
1249 | | void AddCheckpoint(); |
1250 | | |
1251 | | // Mark the last checkpoint as having cleared successfully, removing it from |
1252 | | // the stack. If the stack is empty, all pending symbols will be committed. |
1253 | | // |
1254 | | // Note that this does not guarantee that the symbols added since the last |
1255 | | // checkpoint won't be rolled back: if a checkpoint gets rolled back, |
1256 | | // everything past that point gets rolled back, including symbols added after |
1257 | | // checkpoints that were pushed onto the stack after it and marked as cleared. |
1258 | | void ClearLastCheckpoint(); |
1259 | | |
1260 | | // Roll back the Tables to the state of the checkpoint at the top of the |
1261 | | // stack, removing everything that was added after that point. |
1262 | | void RollbackToLastCheckpoint(); |
1263 | | |
1264 | | // The stack of files which are currently being built. Used to detect |
1265 | | // cyclic dependencies when loading files from a DescriptorDatabase. Not |
1266 | | // used when fallback_database_ == nullptr. |
1267 | | std::vector<std::string> pending_files_; |
1268 | | |
1269 | | // A set of files which we have tried to load from the fallback database |
1270 | | // and encountered errors. We will not attempt to load them again during |
1271 | | // execution of the current public API call, but for compatibility with |
1272 | | // legacy clients, this is cleared at the beginning of each public API call. |
1273 | | // Not used when fallback_database_ == nullptr. |
1274 | | absl::flat_hash_set<std::string> known_bad_files_; |
1275 | | |
1276 | | // A set of symbols which we have tried to load from the fallback database |
1277 | | // and encountered errors. We will not attempt to load them again during |
1278 | | // execution of the current public API call, but for compatibility with |
1279 | | // legacy clients, this is cleared at the beginning of each public API call. |
1280 | | absl::flat_hash_set<std::string> known_bad_symbols_; |
1281 | | |
1282 | | // The set of descriptors for which we've already loaded the full |
1283 | | // set of extensions numbers from fallback_database_. |
1284 | | absl::flat_hash_set<const Descriptor*> extensions_loaded_from_db_; |
1285 | | |
1286 | | // Maps type name to Descriptor::WellKnownType. This is logically global |
1287 | | // and const, but we make it a member here to simplify its construction and |
1288 | | // destruction. This only has 20-ish entries and is one per DescriptorPool, |
1289 | | // so the overhead is small. |
1290 | | absl::flat_hash_map<std::string, Descriptor::WellKnownType> well_known_types_; |
1291 | | |
1292 | | // ----------------------------------------------------------------- |
1293 | | // Finding items. |
1294 | | |
1295 | | // Find symbols. This returns a null Symbol (symbol.IsNull() is true) |
1296 | | // if not found. |
1297 | | inline Symbol FindSymbol(absl::string_view key) const; |
1298 | | |
1299 | | // This implements the body of DescriptorPool::Find*ByName(). It should |
1300 | | // really be a private method of DescriptorPool, but that would require |
1301 | | // declaring Symbol in descriptor.h, which would drag all kinds of other |
1302 | | // stuff into the header. Yay C++. |
1303 | | Symbol FindByNameHelper(const DescriptorPool* pool, absl::string_view name); |
1304 | | |
1305 | | // These return nullptr if not found. |
1306 | | inline const FileDescriptor* FindFile(absl::string_view key) const; |
1307 | | inline const FieldDescriptor* FindExtension(const Descriptor* extendee, |
1308 | | int number) const; |
1309 | | inline void FindAllExtensions(const Descriptor* extendee, |
1310 | | std::vector<const FieldDescriptor*>* out) const; |
1311 | | |
1312 | | // ----------------------------------------------------------------- |
1313 | | // Adding items. |
1314 | | |
1315 | | // These add items to the corresponding tables. They return false if |
1316 | | // the key already exists in the table. For AddSymbol(), the string passed |
1317 | | // in must be one that was constructed using AllocateString(), as it will |
1318 | | // be used as a key in the symbols_by_name_ map without copying. |
1319 | | bool AddSymbol(absl::string_view full_name, Symbol symbol); |
1320 | | bool AddFile(const FileDescriptor* file); |
1321 | | bool AddExtension(const FieldDescriptor* field); |
1322 | | |
1323 | | // ----------------------------------------------------------------- |
1324 | | // Allocating memory. |
1325 | | |
1326 | | // Allocate an object which will be reclaimed when the pool is |
1327 | | // destroyed. Note that the object's destructor will never be called, |
1328 | | // so its fields must be plain old data (primitive data types and |
1329 | | // pointers). All of the descriptor types are such objects. |
1330 | | template <typename Type> |
1331 | | Type* Allocate(); |
1332 | | |
1333 | | // Allocate some bytes which will be reclaimed when the pool is |
1334 | | // destroyed. Memory is aligned to 8 bytes. |
1335 | | void* AllocateBytes(int size); |
1336 | | |
1337 | | // Create a FlatAllocation for the corresponding sizes. |
1338 | | // All objects within it will be default constructed. |
1339 | | // The whole allocation, including the non-trivial objects within, will be |
1340 | | // destroyed with the pool. |
1341 | | template <typename... T> |
1342 | | internal::FlatAllocator::Allocation* CreateFlatAlloc( |
1343 | | const TypeMap<IntT, T...>& sizes); |
1344 | | |
1345 | | |
1346 | | private: |
1347 | | // All memory allocated in the pool. Must be first as other objects can |
1348 | | // point into these. |
1349 | | struct MiscDeleter { |
1350 | 0 | void operator()(int* p) const { internal::SizedDelete(p, *p + 8); } |
1351 | | }; |
1352 | | // Miscellaneous allocations are length prefixed. The paylaod is 8 bytes after |
1353 | | // the `int` that contains the size. This keeps the payload aligned. |
1354 | | std::vector<std::unique_ptr<int, MiscDeleter>> misc_allocs_; |
1355 | | struct FlatAllocDeleter { |
1356 | 0 | void operator()(internal::FlatAllocator::Allocation* p) const { |
1357 | 0 | p->Destroy(); |
1358 | 0 | } |
1359 | | }; |
1360 | | std::vector< |
1361 | | std::unique_ptr<internal::FlatAllocator::Allocation, FlatAllocDeleter>> |
1362 | | flat_allocs_; |
1363 | | |
1364 | | SymbolsByNameSet symbols_by_name_; |
1365 | | FilesByNameSet files_by_name_; |
1366 | | ExtensionsGroupedByDescriptorMap extensions_; |
1367 | | |
1368 | | struct CheckPoint { |
1369 | | explicit CheckPoint(const Tables* tables) |
1370 | | : flat_allocations_before_checkpoint( |
1371 | | static_cast<int>(tables->flat_allocs_.size())), |
1372 | | misc_allocations_before_checkpoint( |
1373 | | static_cast<int>(tables->misc_allocs_.size())), |
1374 | | pending_symbols_before_checkpoint( |
1375 | | tables->symbols_after_checkpoint_.size()), |
1376 | | pending_files_before_checkpoint( |
1377 | | tables->files_after_checkpoint_.size()), |
1378 | | pending_extensions_before_checkpoint( |
1379 | 6 | tables->extensions_after_checkpoint_.size()) {} |
1380 | | int flat_allocations_before_checkpoint; |
1381 | | int misc_allocations_before_checkpoint; |
1382 | | int pending_symbols_before_checkpoint; |
1383 | | int pending_files_before_checkpoint; |
1384 | | int pending_extensions_before_checkpoint; |
1385 | | }; |
1386 | | std::vector<CheckPoint> checkpoints_; |
1387 | | std::vector<Symbol> symbols_after_checkpoint_; |
1388 | | std::vector<const FileDescriptor*> files_after_checkpoint_; |
1389 | | std::vector<std::pair<const Descriptor*, int>> extensions_after_checkpoint_; |
1390 | | }; |
1391 | | |
1392 | 2 | DescriptorPool::Tables::Tables() { |
1393 | 2 | well_known_types_.insert({ |
1394 | 2 | {"google.protobuf.DoubleValue", Descriptor::WELLKNOWNTYPE_DOUBLEVALUE}, |
1395 | 2 | {"google.protobuf.FloatValue", Descriptor::WELLKNOWNTYPE_FLOATVALUE}, |
1396 | 2 | {"google.protobuf.Int64Value", Descriptor::WELLKNOWNTYPE_INT64VALUE}, |
1397 | 2 | {"google.protobuf.UInt64Value", Descriptor::WELLKNOWNTYPE_UINT64VALUE}, |
1398 | 2 | {"google.protobuf.Int32Value", Descriptor::WELLKNOWNTYPE_INT32VALUE}, |
1399 | 2 | {"google.protobuf.UInt32Value", Descriptor::WELLKNOWNTYPE_UINT32VALUE}, |
1400 | 2 | {"google.protobuf.StringValue", Descriptor::WELLKNOWNTYPE_STRINGVALUE}, |
1401 | 2 | {"google.protobuf.BytesValue", Descriptor::WELLKNOWNTYPE_BYTESVALUE}, |
1402 | 2 | {"google.protobuf.BoolValue", Descriptor::WELLKNOWNTYPE_BOOLVALUE}, |
1403 | 2 | {"google.protobuf.Any", Descriptor::WELLKNOWNTYPE_ANY}, |
1404 | 2 | {"google.protobuf.FieldMask", Descriptor::WELLKNOWNTYPE_FIELDMASK}, |
1405 | 2 | {"google.protobuf.Duration", Descriptor::WELLKNOWNTYPE_DURATION}, |
1406 | 2 | {"google.protobuf.Timestamp", Descriptor::WELLKNOWNTYPE_TIMESTAMP}, |
1407 | 2 | {"google.protobuf.Value", Descriptor::WELLKNOWNTYPE_VALUE}, |
1408 | 2 | {"google.protobuf.ListValue", Descriptor::WELLKNOWNTYPE_LISTVALUE}, |
1409 | 2 | {"google.protobuf.Struct", Descriptor::WELLKNOWNTYPE_STRUCT}, |
1410 | 2 | }); |
1411 | 2 | } |
1412 | | |
1413 | 0 | DescriptorPool::Tables::~Tables() { ABSL_DCHECK(checkpoints_.empty()); } |
1414 | | |
1415 | 6 | FileDescriptorTables::FileDescriptorTables() {} |
1416 | | |
1417 | 0 | FileDescriptorTables::~FileDescriptorTables() { |
1418 | 0 | delete fields_by_lowercase_name_.load(std::memory_order_acquire); |
1419 | 0 | delete fields_by_camelcase_name_.load(std::memory_order_acquire); |
1420 | 0 | } |
1421 | | |
1422 | 0 | inline const FileDescriptorTables& FileDescriptorTables::GetEmptyInstance() { |
1423 | 0 | static auto file_descriptor_tables = |
1424 | 0 | internal::OnShutdownDelete(new FileDescriptorTables()); |
1425 | 0 | return *file_descriptor_tables; |
1426 | 0 | } |
1427 | | |
1428 | 6 | void DescriptorPool::Tables::AddCheckpoint() { |
1429 | 6 | checkpoints_.emplace_back(this); |
1430 | 6 | } |
1431 | | |
1432 | 6 | void DescriptorPool::Tables::ClearLastCheckpoint() { |
1433 | 6 | ABSL_DCHECK(!checkpoints_.empty()); |
1434 | 6 | checkpoints_.pop_back(); |
1435 | 6 | if (checkpoints_.empty()) { |
1436 | | // All checkpoints have been cleared: we can now commit all of the pending |
1437 | | // data. |
1438 | 6 | symbols_after_checkpoint_.clear(); |
1439 | 6 | files_after_checkpoint_.clear(); |
1440 | 6 | extensions_after_checkpoint_.clear(); |
1441 | 6 | } |
1442 | 6 | } |
1443 | | |
1444 | 0 | void DescriptorPool::Tables::RollbackToLastCheckpoint() { |
1445 | 0 | ABSL_DCHECK(!checkpoints_.empty()); |
1446 | 0 | const CheckPoint& checkpoint = checkpoints_.back(); |
1447 | |
|
1448 | 0 | for (size_t i = checkpoint.pending_symbols_before_checkpoint; |
1449 | 0 | i < symbols_after_checkpoint_.size(); i++) { |
1450 | 0 | symbols_by_name_.erase(symbols_after_checkpoint_[i]); |
1451 | 0 | } |
1452 | 0 | for (size_t i = checkpoint.pending_files_before_checkpoint; |
1453 | 0 | i < files_after_checkpoint_.size(); i++) { |
1454 | 0 | files_by_name_.erase(files_after_checkpoint_[i]); |
1455 | 0 | } |
1456 | 0 | for (size_t i = checkpoint.pending_extensions_before_checkpoint; |
1457 | 0 | i < extensions_after_checkpoint_.size(); i++) { |
1458 | 0 | extensions_.erase(extensions_after_checkpoint_[i]); |
1459 | 0 | } |
1460 | |
|
1461 | 0 | symbols_after_checkpoint_.resize( |
1462 | 0 | checkpoint.pending_symbols_before_checkpoint); |
1463 | 0 | files_after_checkpoint_.resize(checkpoint.pending_files_before_checkpoint); |
1464 | 0 | extensions_after_checkpoint_.resize( |
1465 | 0 | checkpoint.pending_extensions_before_checkpoint); |
1466 | |
|
1467 | 0 | flat_allocs_.resize(checkpoint.flat_allocations_before_checkpoint); |
1468 | 0 | misc_allocs_.resize(checkpoint.misc_allocations_before_checkpoint); |
1469 | 0 | checkpoints_.pop_back(); |
1470 | 0 | } |
1471 | | |
1472 | | // ------------------------------------------------------------------- |
1473 | | |
1474 | 136 | inline Symbol DescriptorPool::Tables::FindSymbol(absl::string_view key) const { |
1475 | 136 | auto it = symbols_by_name_.find(FullNameQuery{key}); |
1476 | 136 | return it == symbols_by_name_.end() ? Symbol() : *it; |
1477 | 136 | } |
1478 | | |
1479 | | inline Symbol FileDescriptorTables::FindNestedSymbol( |
1480 | 152k | const void* parent, absl::string_view name) const { |
1481 | 152k | auto it = symbols_by_parent_.find(ParentNameQuery{{parent, name}}); |
1482 | 152k | return it == symbols_by_parent_.end() ? Symbol() : *it; |
1483 | 152k | } |
1484 | | |
1485 | | Symbol DescriptorPool::Tables::FindByNameHelper(const DescriptorPool* pool, |
1486 | 0 | absl::string_view name) { |
1487 | 0 | if (pool->mutex_ != nullptr) { |
1488 | | // Fast path: the Symbol is already cached. This is just a hash lookup. |
1489 | 0 | absl::ReaderMutexLock lock(pool->mutex_); |
1490 | 0 | if (known_bad_symbols_.empty() && known_bad_files_.empty()) { |
1491 | 0 | Symbol result = FindSymbol(name); |
1492 | 0 | if (!result.IsNull()) return result; |
1493 | 0 | } |
1494 | 0 | } |
1495 | 0 | absl::MutexLockMaybe lock(pool->mutex_); |
1496 | 0 | if (pool->fallback_database_ != nullptr) { |
1497 | 0 | known_bad_symbols_.clear(); |
1498 | 0 | known_bad_files_.clear(); |
1499 | 0 | } |
1500 | 0 | Symbol result = FindSymbol(name); |
1501 | |
|
1502 | 0 | if (result.IsNull() && pool->underlay_ != nullptr) { |
1503 | | // Symbol not found; check the underlay. |
1504 | 0 | result = pool->underlay_->tables_->FindByNameHelper(pool->underlay_, name); |
1505 | 0 | } |
1506 | |
|
1507 | 0 | if (result.IsNull()) { |
1508 | | // Symbol still not found, so check fallback database. |
1509 | 0 | if (pool->TryFindSymbolInFallbackDatabase(name)) { |
1510 | 0 | result = FindSymbol(name); |
1511 | 0 | } |
1512 | 0 | } |
1513 | |
|
1514 | 0 | return result; |
1515 | 0 | } |
1516 | | |
1517 | | inline const FileDescriptor* DescriptorPool::Tables::FindFile( |
1518 | 18 | absl::string_view key) const { |
1519 | 18 | auto it = files_by_name_.find(key); |
1520 | 18 | if (it == files_by_name_.end()) return nullptr; |
1521 | 6 | return *it; |
1522 | 18 | } |
1523 | | |
1524 | | inline const FieldDescriptor* FileDescriptorTables::FindFieldByNumber( |
1525 | 0 | const Descriptor* parent, int number) const { |
1526 | | // If `number` is within the sequential range, just index into the parent |
1527 | | // without doing a table lookup. |
1528 | 0 | if (parent != nullptr && // |
1529 | 0 | 1 <= number && number <= parent->sequential_field_limit_) { |
1530 | 0 | return parent->field(number - 1); |
1531 | 0 | } |
1532 | | |
1533 | 0 | auto it = fields_by_number_.find(ParentNumberQuery{{parent, number}}); |
1534 | 0 | return it == fields_by_number_.end() ? nullptr : *it; |
1535 | 0 | } |
1536 | | |
1537 | | const void* FileDescriptorTables::FindParentForFieldsByMap( |
1538 | 0 | const FieldDescriptor* field) const { |
1539 | 0 | if (field->is_extension()) { |
1540 | 0 | if (field->extension_scope() == nullptr) { |
1541 | 0 | return field->file(); |
1542 | 0 | } else { |
1543 | 0 | return field->extension_scope(); |
1544 | 0 | } |
1545 | 0 | } else { |
1546 | 0 | return field->containing_type(); |
1547 | 0 | } |
1548 | 0 | } |
1549 | | |
1550 | | void FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic( |
1551 | 0 | const FileDescriptorTables* tables) { |
1552 | 0 | tables->FieldsByLowercaseNamesLazyInitInternal(); |
1553 | 0 | } |
1554 | | |
1555 | 0 | void FileDescriptorTables::FieldsByLowercaseNamesLazyInitInternal() const { |
1556 | 0 | auto* map = new FieldsByNameMap; |
1557 | 0 | for (Symbol symbol : symbols_by_parent_) { |
1558 | 0 | const FieldDescriptor* field = symbol.field_descriptor(); |
1559 | 0 | if (!field) continue; |
1560 | 0 | (*map)[{FindParentForFieldsByMap(field), field->lowercase_name().c_str()}] = |
1561 | 0 | field; |
1562 | 0 | } |
1563 | 0 | fields_by_lowercase_name_.store(map, std::memory_order_release); |
1564 | 0 | } |
1565 | | |
1566 | | inline const FieldDescriptor* FileDescriptorTables::FindFieldByLowercaseName( |
1567 | 0 | const void* parent, absl::string_view lowercase_name) const { |
1568 | 0 | absl::call_once(fields_by_lowercase_name_once_, |
1569 | 0 | &FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic, |
1570 | 0 | this); |
1571 | 0 | const auto* fields = |
1572 | 0 | fields_by_lowercase_name_.load(std::memory_order_acquire); |
1573 | 0 | auto it = fields->find({parent, lowercase_name}); |
1574 | 0 | if (it == fields->end()) return nullptr; |
1575 | 0 | return it->second; |
1576 | 0 | } |
1577 | | |
1578 | | void FileDescriptorTables::FieldsByCamelcaseNamesLazyInitStatic( |
1579 | 0 | const FileDescriptorTables* tables) { |
1580 | 0 | tables->FieldsByCamelcaseNamesLazyInitInternal(); |
1581 | 0 | } |
1582 | | |
1583 | 0 | void FileDescriptorTables::FieldsByCamelcaseNamesLazyInitInternal() const { |
1584 | 0 | auto* map = new FieldsByNameMap; |
1585 | 0 | for (Symbol symbol : symbols_by_parent_) { |
1586 | 0 | const FieldDescriptor* field = symbol.field_descriptor(); |
1587 | 0 | if (!field) continue; |
1588 | 0 | (*map)[{FindParentForFieldsByMap(field), field->camelcase_name().c_str()}] = |
1589 | 0 | field; |
1590 | 0 | } |
1591 | 0 | fields_by_camelcase_name_.store(map, std::memory_order_release); |
1592 | 0 | } |
1593 | | |
1594 | | inline const FieldDescriptor* FileDescriptorTables::FindFieldByCamelcaseName( |
1595 | 0 | const void* parent, absl::string_view camelcase_name) const { |
1596 | 0 | absl::call_once(fields_by_camelcase_name_once_, |
1597 | 0 | FileDescriptorTables::FieldsByCamelcaseNamesLazyInitStatic, |
1598 | 0 | this); |
1599 | 0 | auto* fields = fields_by_camelcase_name_.load(std::memory_order_acquire); |
1600 | 0 | auto it = fields->find({parent, camelcase_name}); |
1601 | 0 | if (it == fields->end()) return nullptr; |
1602 | 0 | return it->second; |
1603 | 0 | } |
1604 | | |
1605 | | inline const EnumValueDescriptor* FileDescriptorTables::FindEnumValueByNumber( |
1606 | 0 | const EnumDescriptor* parent, int number) const { |
1607 | | // If `number` is within the sequential range, just index into the parent |
1608 | | // without doing a table lookup. |
1609 | 0 | const int base = parent->value(0)->number(); |
1610 | 0 | if (base <= number && |
1611 | 0 | number <= static_cast<int64_t>(base) + parent->sequential_value_limit_) { |
1612 | 0 | return parent->value(number - base); |
1613 | 0 | } |
1614 | | |
1615 | 0 | auto it = enum_values_by_number_.find(ParentNumberQuery{{parent, number}}); |
1616 | 0 | return it == enum_values_by_number_.end() ? nullptr : *it; |
1617 | 0 | } |
1618 | | |
1619 | | inline const EnumValueDescriptor* |
1620 | | FileDescriptorTables::FindEnumValueByNumberCreatingIfUnknown( |
1621 | 0 | const EnumDescriptor* parent, int number) const { |
1622 | | // First try, with map of compiled-in values. |
1623 | 0 | { |
1624 | 0 | const auto* value = FindEnumValueByNumber(parent, number); |
1625 | 0 | if (value != nullptr) { |
1626 | 0 | return value; |
1627 | 0 | } |
1628 | 0 | } |
1629 | | |
1630 | 0 | const ParentNumberQuery query{{parent, number}}; |
1631 | | |
1632 | | // Second try, with reader lock held on unknown enum values: common case. |
1633 | 0 | { |
1634 | 0 | absl::ReaderMutexLock l(&unknown_enum_values_mu_); |
1635 | 0 | auto it = unknown_enum_values_by_number_.find(query); |
1636 | 0 | if (it != unknown_enum_values_by_number_.end()) { |
1637 | 0 | return *it; |
1638 | 0 | } |
1639 | 0 | } |
1640 | | // If not found, try again with writer lock held, and create new descriptor if |
1641 | | // necessary. |
1642 | 0 | { |
1643 | 0 | absl::WriterMutexLock l(&unknown_enum_values_mu_); |
1644 | 0 | auto it = unknown_enum_values_by_number_.find(query); |
1645 | 0 | if (it != unknown_enum_values_by_number_.end()) { |
1646 | 0 | return *it; |
1647 | 0 | } |
1648 | | |
1649 | | // Create an EnumValueDescriptor dynamically. We don't insert it into the |
1650 | | // EnumDescriptor (it's not a part of the enum as originally defined), but |
1651 | | // we do insert it into the table so that we can return the same pointer |
1652 | | // later. |
1653 | 0 | std::string enum_value_name = absl::StrFormat( |
1654 | 0 | "UNKNOWN_ENUM_VALUE_%s_%d", parent->name().c_str(), number); |
1655 | 0 | auto* pool = DescriptorPool::generated_pool(); |
1656 | 0 | auto* tables = const_cast<DescriptorPool::Tables*>(pool->tables_.get()); |
1657 | 0 | internal::FlatAllocator alloc; |
1658 | 0 | alloc.PlanArray<EnumValueDescriptor>(1); |
1659 | 0 | alloc.PlanArray<std::string>(2); |
1660 | |
|
1661 | 0 | { |
1662 | | // Must lock the pool because we will do allocations in the shared arena. |
1663 | 0 | absl::MutexLockMaybe l2(pool->mutex_); |
1664 | 0 | alloc.FinalizePlanning(tables); |
1665 | 0 | } |
1666 | 0 | EnumValueDescriptor* result = alloc.AllocateArray<EnumValueDescriptor>(1); |
1667 | 0 | result->all_names_ = alloc.AllocateStrings( |
1668 | 0 | enum_value_name, |
1669 | 0 | absl::StrCat(parent->full_name(), ".", enum_value_name)); |
1670 | 0 | result->number_ = number; |
1671 | 0 | result->type_ = parent; |
1672 | 0 | result->options_ = &EnumValueOptions::default_instance(); |
1673 | 0 | unknown_enum_values_by_number_.insert(result); |
1674 | 0 | return result; |
1675 | 0 | } |
1676 | 0 | } |
1677 | | |
1678 | | inline const FieldDescriptor* DescriptorPool::Tables::FindExtension( |
1679 | 0 | const Descriptor* extendee, int number) const { |
1680 | 0 | auto it = extensions_.find({extendee, number}); |
1681 | 0 | if (it == extensions_.end()) return nullptr; |
1682 | 0 | return it->second; |
1683 | 0 | } |
1684 | | |
1685 | | inline void DescriptorPool::Tables::FindAllExtensions( |
1686 | | const Descriptor* extendee, |
1687 | 0 | std::vector<const FieldDescriptor*>* out) const { |
1688 | 0 | ExtensionsGroupedByDescriptorMap::const_iterator it = |
1689 | 0 | extensions_.lower_bound(std::make_pair(extendee, 0)); |
1690 | 0 | for (; it != extensions_.end() && it->first.first == extendee; ++it) { |
1691 | 0 | out->push_back(it->second); |
1692 | 0 | } |
1693 | 0 | } |
1694 | | |
1695 | | // ------------------------------------------------------------------- |
1696 | | |
1697 | | bool DescriptorPool::Tables::AddSymbol(absl::string_view full_name, |
1698 | 534 | Symbol symbol) { |
1699 | 534 | ABSL_DCHECK_EQ(full_name, symbol.full_name()); |
1700 | 534 | if (symbols_by_name_.insert(symbol).second) { |
1701 | 534 | symbols_after_checkpoint_.push_back(symbol); |
1702 | 534 | return true; |
1703 | 534 | } else { |
1704 | 0 | return false; |
1705 | 0 | } |
1706 | 534 | } |
1707 | | |
1708 | | bool FileDescriptorTables::AddAliasUnderParent(const void* parent, |
1709 | | absl::string_view name, |
1710 | 624 | Symbol symbol) { |
1711 | 624 | ABSL_DCHECK_EQ(name, symbol.parent_name_key().second); |
1712 | 624 | ABSL_DCHECK_EQ(parent, symbol.parent_name_key().first); |
1713 | 624 | return symbols_by_parent_.insert(symbol).second; |
1714 | 624 | } |
1715 | | |
1716 | 6 | bool DescriptorPool::Tables::AddFile(const FileDescriptor* file) { |
1717 | 6 | if (files_by_name_.insert(file).second) { |
1718 | 6 | files_after_checkpoint_.push_back(file); |
1719 | 6 | return true; |
1720 | 6 | } else { |
1721 | 0 | return false; |
1722 | 0 | } |
1723 | 6 | } |
1724 | | |
1725 | 6 | void FileDescriptorTables::FinalizeTables() {} |
1726 | | |
1727 | 330 | bool FileDescriptorTables::AddFieldByNumber(FieldDescriptor* field) { |
1728 | | // Skip fields that are at the start of the sequence. |
1729 | 330 | if (field->containing_type() != nullptr && field->number() >= 1 && |
1730 | 330 | field->number() <= field->containing_type()->sequential_field_limit_) { |
1731 | 170 | if (field->is_extension()) { |
1732 | | // Conflicts with the field that already exists in the sequential range. |
1733 | 0 | return false; |
1734 | 0 | } |
1735 | | // Only return true if the field at that index matches. Otherwise it |
1736 | | // conflicts with the existing field in the sequential range. |
1737 | 170 | return field->containing_type()->field(field->number() - 1) == field; |
1738 | 170 | } |
1739 | | |
1740 | 160 | return fields_by_number_.insert(field).second; |
1741 | 330 | } |
1742 | | |
1743 | 98 | bool FileDescriptorTables::AddEnumValueByNumber(EnumValueDescriptor* value) { |
1744 | | // Skip values that are at the start of the sequence. |
1745 | 98 | const int base = value->type()->value(0)->number(); |
1746 | 98 | if (base <= value->number() && |
1747 | 98 | value->number() <= |
1748 | 98 | static_cast<int64_t>(base) + value->type()->sequential_value_limit_) |
1749 | 98 | return true; |
1750 | 0 | return enum_values_by_number_.insert(value).second; |
1751 | 98 | } |
1752 | | |
1753 | 0 | bool DescriptorPool::Tables::AddExtension(const FieldDescriptor* field) { |
1754 | 0 | auto it_inserted = |
1755 | 0 | extensions_.insert({{field->containing_type(), field->number()}, field}); |
1756 | 0 | if (it_inserted.second) { |
1757 | 0 | extensions_after_checkpoint_.push_back(it_inserted.first->first); |
1758 | 0 | return true; |
1759 | 0 | } else { |
1760 | 0 | return false; |
1761 | 0 | } |
1762 | 0 | } |
1763 | | |
1764 | | // ------------------------------------------------------------------- |
1765 | | |
1766 | | template <typename Type> |
1767 | 4 | Type* DescriptorPool::Tables::Allocate() { |
1768 | 4 | static_assert(std::is_trivially_destructible<Type>::value, ""); |
1769 | 4 | static_assert(alignof(Type) <= 8, ""); |
1770 | 4 | return ::new (AllocateBytes(sizeof(Type))) Type{}; |
1771 | 4 | } |
1772 | | |
1773 | 4 | void* DescriptorPool::Tables::AllocateBytes(int size) { |
1774 | 4 | if (size == 0) return nullptr; |
1775 | 4 | void* p = ::operator new(size + RoundUpTo<8>(sizeof(int))); |
1776 | 4 | int* sizep = static_cast<int*>(p); |
1777 | 4 | misc_allocs_.emplace_back(sizep); |
1778 | 4 | *sizep = size; |
1779 | 4 | return static_cast<char*>(p) + RoundUpTo<8>(sizeof(int)); |
1780 | 4 | } |
1781 | | |
1782 | | template <typename... T> |
1783 | | internal::FlatAllocator::Allocation* DescriptorPool::Tables::CreateFlatAlloc( |
1784 | 6 | const TypeMap<IntT, T...>& sizes) { |
1785 | 6 | auto ends = CalculateEnds(sizes); |
1786 | 6 | using FlatAlloc = internal::FlatAllocator::Allocation; |
1787 | | |
1788 | 6 | int last_end = ends.template Get< |
1789 | 6 | typename std::tuple_element<sizeof...(T) - 1, std::tuple<T...>>::type>(); |
1790 | 6 | size_t total_size = |
1791 | 6 | last_end + RoundUpTo<FlatAlloc::kMaxAlign>(sizeof(FlatAlloc)); |
1792 | 6 | char* data = static_cast<char*>(::operator new(total_size)); |
1793 | 6 | auto* res = ::new (data) FlatAlloc(ends); |
1794 | 6 | flat_allocs_.emplace_back(res); |
1795 | | |
1796 | 6 | return res; |
1797 | 6 | } |
1798 | | |
1799 | | void FileDescriptorTables::BuildLocationsByPath( |
1800 | 0 | std::pair<const FileDescriptorTables*, const SourceCodeInfo*>* p) { |
1801 | 0 | for (int i = 0, len = p->second->location_size(); i < len; ++i) { |
1802 | 0 | const SourceCodeInfo_Location* loc = &p->second->location().Get(i); |
1803 | 0 | p->first->locations_by_path_[absl::StrJoin(loc->path(), ",")] = loc; |
1804 | 0 | } |
1805 | 0 | } |
1806 | | |
1807 | | const SourceCodeInfo_Location* FileDescriptorTables::GetSourceLocation( |
1808 | 0 | const std::vector<int>& path, const SourceCodeInfo* info) const { |
1809 | 0 | std::pair<const FileDescriptorTables*, const SourceCodeInfo*> p( |
1810 | 0 | std::make_pair(this, info)); |
1811 | 0 | absl::call_once(locations_by_path_once_, |
1812 | 0 | FileDescriptorTables::BuildLocationsByPath, &p); |
1813 | 0 | auto it = locations_by_path_.find(absl::StrJoin(path, ",")); |
1814 | 0 | if (it == locations_by_path_.end()) return nullptr; |
1815 | 0 | return it->second; |
1816 | 0 | } |
1817 | | |
1818 | | // =================================================================== |
1819 | | // DescriptorPool |
1820 | | |
1821 | 0 | DescriptorPool::ErrorCollector::~ErrorCollector() {} |
1822 | | |
1823 | | DescriptorPool::DescriptorPool() |
1824 | | : mutex_(nullptr), |
1825 | | fallback_database_(nullptr), |
1826 | | default_error_collector_(nullptr), |
1827 | | underlay_(nullptr), |
1828 | | tables_(new Tables), |
1829 | | enforce_dependencies_(true), |
1830 | | lazily_build_dependencies_(false), |
1831 | | allow_unknown_(false), |
1832 | | enforce_weak_(false), |
1833 | | disallow_enforce_utf8_(false), |
1834 | 0 | deprecated_legacy_json_field_conflicts_(false) {} |
1835 | | |
1836 | | DescriptorPool::DescriptorPool(DescriptorDatabase* fallback_database, |
1837 | | ErrorCollector* error_collector) |
1838 | | : mutex_(new absl::Mutex), |
1839 | | fallback_database_(fallback_database), |
1840 | | default_error_collector_(error_collector), |
1841 | | underlay_(nullptr), |
1842 | | tables_(new Tables), |
1843 | | enforce_dependencies_(true), |
1844 | | lazily_build_dependencies_(false), |
1845 | | allow_unknown_(false), |
1846 | | enforce_weak_(false), |
1847 | | disallow_enforce_utf8_(false), |
1848 | 2 | deprecated_legacy_json_field_conflicts_(false) {} |
1849 | | |
1850 | | DescriptorPool::DescriptorPool(const DescriptorPool* underlay) |
1851 | | : mutex_(nullptr), |
1852 | | fallback_database_(nullptr), |
1853 | | default_error_collector_(nullptr), |
1854 | | underlay_(underlay), |
1855 | | tables_(new Tables), |
1856 | | enforce_dependencies_(true), |
1857 | | lazily_build_dependencies_(false), |
1858 | | allow_unknown_(false), |
1859 | | enforce_weak_(false), |
1860 | | disallow_enforce_utf8_(false), |
1861 | 0 | deprecated_legacy_json_field_conflicts_(false) {} |
1862 | | |
1863 | 0 | DescriptorPool::~DescriptorPool() { |
1864 | 0 | if (mutex_ != nullptr) delete mutex_; |
1865 | 0 | } |
1866 | | |
1867 | | // DescriptorPool::BuildFile() defined later. |
1868 | | // DescriptorPool::BuildFileCollectingErrors() defined later. |
1869 | | |
1870 | 2 | void DescriptorPool::InternalDontEnforceDependencies() { |
1871 | 2 | enforce_dependencies_ = false; |
1872 | 2 | } |
1873 | | |
1874 | | void DescriptorPool::AddUnusedImportTrackFile(absl::string_view file_name, |
1875 | 0 | bool is_error) { |
1876 | 0 | unused_import_track_files_[file_name] = is_error; |
1877 | 0 | } |
1878 | | |
1879 | | |
1880 | 0 | void DescriptorPool::ClearUnusedImportTrackFiles() { |
1881 | 0 | unused_import_track_files_.clear(); |
1882 | 0 | } |
1883 | | |
1884 | 0 | bool DescriptorPool::InternalIsFileLoaded(absl::string_view filename) const { |
1885 | 0 | absl::MutexLockMaybe lock(mutex_); |
1886 | 0 | return tables_->FindFile(filename) != nullptr; |
1887 | 0 | } |
1888 | | |
1889 | | // generated_pool ==================================================== |
1890 | | |
1891 | | namespace { |
1892 | | |
1893 | | |
1894 | 14 | EncodedDescriptorDatabase* GeneratedDatabase() { |
1895 | 14 | static auto generated_database = |
1896 | 14 | internal::OnShutdownDelete(new EncodedDescriptorDatabase()); |
1897 | 14 | return generated_database; |
1898 | 14 | } |
1899 | | |
1900 | 2 | DescriptorPool* NewGeneratedPool() { |
1901 | 2 | auto generated_pool = new DescriptorPool(GeneratedDatabase()); |
1902 | 2 | generated_pool->InternalSetLazilyBuildDependencies(); |
1903 | 2 | return generated_pool; |
1904 | 2 | } |
1905 | | |
1906 | | } // anonymous namespace |
1907 | | |
1908 | 0 | DescriptorDatabase* DescriptorPool::internal_generated_database() { |
1909 | 0 | return GeneratedDatabase(); |
1910 | 0 | } |
1911 | | |
1912 | 84 | DescriptorPool* DescriptorPool::internal_generated_pool() { |
1913 | 84 | static DescriptorPool* generated_pool = |
1914 | 84 | internal::OnShutdownDelete(NewGeneratedPool()); |
1915 | 84 | return generated_pool; |
1916 | 84 | } |
1917 | | |
1918 | 2 | const DescriptorPool* DescriptorPool::generated_pool() { |
1919 | 2 | const DescriptorPool* pool = internal_generated_pool(); |
1920 | | // Ensure that descriptor.proto gets registered in the generated pool. It is a |
1921 | | // special case because it is included in the full runtime. We have to avoid |
1922 | | // registering it pre-main, because we need to ensure that the linker |
1923 | | // --gc-sections step can strip out the full runtime if it is unused. |
1924 | 2 | DescriptorProto::descriptor(); |
1925 | 2 | return pool; |
1926 | 2 | } |
1927 | | |
1928 | | |
1929 | | void DescriptorPool::InternalAddGeneratedFile( |
1930 | 12 | const void* encoded_file_descriptor, int size) { |
1931 | | // So, this function is called in the process of initializing the |
1932 | | // descriptors for generated proto classes. Each generated .pb.cc file |
1933 | | // has an internal procedure called AddDescriptors() which is called at |
1934 | | // process startup, and that function calls this one in order to register |
1935 | | // the raw bytes of the FileDescriptorProto representing the file. |
1936 | | // |
1937 | | // We do not actually construct the descriptor objects right away. We just |
1938 | | // hang on to the bytes until they are actually needed. We actually construct |
1939 | | // the descriptor the first time one of the following things happens: |
1940 | | // * Someone calls a method like descriptor(), GetDescriptor(), or |
1941 | | // GetReflection() on the generated types, which requires returning the |
1942 | | // descriptor or an object based on it. |
1943 | | // * Someone looks up the descriptor in DescriptorPool::generated_pool(). |
1944 | | // |
1945 | | // Once one of these happens, the DescriptorPool actually parses the |
1946 | | // FileDescriptorProto and generates a FileDescriptor (and all its children) |
1947 | | // based on it. |
1948 | | // |
1949 | | // Note that FileDescriptorProto is itself a generated protocol message. |
1950 | | // Therefore, when we parse one, we have to be very careful to avoid using |
1951 | | // any descriptor-based operations, since this might cause infinite recursion |
1952 | | // or deadlock. |
1953 | 12 | ABSL_CHECK(GeneratedDatabase()->Add(encoded_file_descriptor, size)); |
1954 | 12 | } |
1955 | | |
1956 | | |
1957 | | // Find*By* methods ================================================== |
1958 | | |
1959 | | // TODO(kenton): There's a lot of repeated code here, but I'm not sure if |
1960 | | // there's any good way to factor it out. Think about this some time when |
1961 | | // there's nothing more important to do (read: never). |
1962 | | |
1963 | | const FileDescriptor* DescriptorPool::FindFileByName( |
1964 | 6 | absl::string_view name) const { |
1965 | 6 | absl::MutexLockMaybe lock(mutex_); |
1966 | 6 | if (fallback_database_ != nullptr) { |
1967 | 6 | tables_->known_bad_symbols_.clear(); |
1968 | 6 | tables_->known_bad_files_.clear(); |
1969 | 6 | } |
1970 | 6 | const FileDescriptor* result = tables_->FindFile(name); |
1971 | 6 | if (result != nullptr) return result; |
1972 | 6 | if (underlay_ != nullptr) { |
1973 | 0 | result = underlay_->FindFileByName(name); |
1974 | 0 | if (result != nullptr) return result; |
1975 | 0 | } |
1976 | 6 | if (TryFindFileInFallbackDatabase(name)) { |
1977 | 6 | result = tables_->FindFile(name); |
1978 | 6 | if (result != nullptr) return result; |
1979 | 6 | } |
1980 | 0 | return nullptr; |
1981 | 6 | } |
1982 | | |
1983 | | const FileDescriptor* DescriptorPool::FindFileContainingSymbol( |
1984 | 0 | absl::string_view symbol_name) const { |
1985 | 0 | absl::MutexLockMaybe lock(mutex_); |
1986 | 0 | if (fallback_database_ != nullptr) { |
1987 | 0 | tables_->known_bad_symbols_.clear(); |
1988 | 0 | tables_->known_bad_files_.clear(); |
1989 | 0 | } |
1990 | 0 | Symbol result = tables_->FindSymbol(symbol_name); |
1991 | 0 | if (!result.IsNull()) return result.GetFile(); |
1992 | 0 | if (underlay_ != nullptr) { |
1993 | 0 | const FileDescriptor* file_result = |
1994 | 0 | underlay_->FindFileContainingSymbol(symbol_name); |
1995 | 0 | if (file_result != nullptr) return file_result; |
1996 | 0 | } |
1997 | 0 | if (TryFindSymbolInFallbackDatabase(symbol_name)) { |
1998 | 0 | result = tables_->FindSymbol(symbol_name); |
1999 | 0 | if (!result.IsNull()) return result.GetFile(); |
2000 | 0 | } |
2001 | 0 | return nullptr; |
2002 | 0 | } |
2003 | | |
2004 | | const Descriptor* DescriptorPool::FindMessageTypeByName( |
2005 | 0 | absl::string_view name) const { |
2006 | 0 | return tables_->FindByNameHelper(this, name).descriptor(); |
2007 | 0 | } |
2008 | | |
2009 | | const FieldDescriptor* DescriptorPool::FindFieldByName( |
2010 | 0 | absl::string_view name) const { |
2011 | 0 | if (const FieldDescriptor* field = |
2012 | 0 | tables_->FindByNameHelper(this, name).field_descriptor()) { |
2013 | 0 | if (!field->is_extension()) { |
2014 | 0 | return field; |
2015 | 0 | } |
2016 | 0 | } |
2017 | 0 | return nullptr; |
2018 | 0 | } |
2019 | | |
2020 | | const FieldDescriptor* DescriptorPool::FindExtensionByName( |
2021 | 0 | absl::string_view name) const { |
2022 | 0 | if (const FieldDescriptor* field = |
2023 | 0 | tables_->FindByNameHelper(this, name).field_descriptor()) { |
2024 | 0 | if (field->is_extension()) { |
2025 | 0 | return field; |
2026 | 0 | } |
2027 | 0 | } |
2028 | 0 | return nullptr; |
2029 | 0 | } |
2030 | | |
2031 | | const OneofDescriptor* DescriptorPool::FindOneofByName( |
2032 | 0 | absl::string_view name) const { |
2033 | 0 | return tables_->FindByNameHelper(this, name).oneof_descriptor(); |
2034 | 0 | } |
2035 | | |
2036 | | const EnumDescriptor* DescriptorPool::FindEnumTypeByName( |
2037 | 0 | absl::string_view name) const { |
2038 | 0 | return tables_->FindByNameHelper(this, name).enum_descriptor(); |
2039 | 0 | } |
2040 | | |
2041 | | const EnumValueDescriptor* DescriptorPool::FindEnumValueByName( |
2042 | 0 | absl::string_view name) const { |
2043 | 0 | return tables_->FindByNameHelper(this, name).enum_value_descriptor(); |
2044 | 0 | } |
2045 | | |
2046 | | const ServiceDescriptor* DescriptorPool::FindServiceByName( |
2047 | 0 | absl::string_view name) const { |
2048 | 0 | return tables_->FindByNameHelper(this, name).service_descriptor(); |
2049 | 0 | } |
2050 | | |
2051 | | const MethodDescriptor* DescriptorPool::FindMethodByName( |
2052 | 0 | absl::string_view name) const { |
2053 | 0 | return tables_->FindByNameHelper(this, name).method_descriptor(); |
2054 | 0 | } |
2055 | | |
2056 | | const FieldDescriptor* DescriptorPool::FindExtensionByNumber( |
2057 | 0 | const Descriptor* extendee, int number) const { |
2058 | 0 | if (extendee->extension_range_count() == 0) return nullptr; |
2059 | | // A faster path to reduce lock contention in finding extensions, assuming |
2060 | | // most extensions will be cache hit. |
2061 | 0 | if (mutex_ != nullptr) { |
2062 | 0 | absl::ReaderMutexLock lock(mutex_); |
2063 | 0 | const FieldDescriptor* result = tables_->FindExtension(extendee, number); |
2064 | 0 | if (result != nullptr) { |
2065 | 0 | return result; |
2066 | 0 | } |
2067 | 0 | } |
2068 | 0 | absl::MutexLockMaybe lock(mutex_); |
2069 | 0 | if (fallback_database_ != nullptr) { |
2070 | 0 | tables_->known_bad_symbols_.clear(); |
2071 | 0 | tables_->known_bad_files_.clear(); |
2072 | 0 | } |
2073 | 0 | const FieldDescriptor* result = tables_->FindExtension(extendee, number); |
2074 | 0 | if (result != nullptr) { |
2075 | 0 | return result; |
2076 | 0 | } |
2077 | 0 | if (underlay_ != nullptr) { |
2078 | 0 | result = underlay_->FindExtensionByNumber(extendee, number); |
2079 | 0 | if (result != nullptr) return result; |
2080 | 0 | } |
2081 | 0 | if (TryFindExtensionInFallbackDatabase(extendee, number)) { |
2082 | 0 | result = tables_->FindExtension(extendee, number); |
2083 | 0 | if (result != nullptr) { |
2084 | 0 | return result; |
2085 | 0 | } |
2086 | 0 | } |
2087 | 0 | return nullptr; |
2088 | 0 | } |
2089 | | |
2090 | | const FieldDescriptor* DescriptorPool::InternalFindExtensionByNumberNoLock( |
2091 | 0 | const Descriptor* extendee, int number) const { |
2092 | 0 | if (extendee->extension_range_count() == 0) return nullptr; |
2093 | | |
2094 | 0 | const FieldDescriptor* result = tables_->FindExtension(extendee, number); |
2095 | 0 | if (result != nullptr) { |
2096 | 0 | return result; |
2097 | 0 | } |
2098 | | |
2099 | 0 | if (underlay_ != nullptr) { |
2100 | 0 | result = underlay_->InternalFindExtensionByNumberNoLock(extendee, number); |
2101 | 0 | if (result != nullptr) return result; |
2102 | 0 | } |
2103 | | |
2104 | 0 | return nullptr; |
2105 | 0 | } |
2106 | | |
2107 | | const FieldDescriptor* DescriptorPool::FindExtensionByPrintableName( |
2108 | 0 | const Descriptor* extendee, absl::string_view printable_name) const { |
2109 | 0 | if (extendee->extension_range_count() == 0) return nullptr; |
2110 | 0 | const FieldDescriptor* result = FindExtensionByName(printable_name); |
2111 | 0 | if (result != nullptr && result->containing_type() == extendee) { |
2112 | 0 | return result; |
2113 | 0 | } |
2114 | 0 | if (extendee->options().message_set_wire_format()) { |
2115 | | // MessageSet extensions may be identified by type name. |
2116 | 0 | const Descriptor* type = FindMessageTypeByName(printable_name); |
2117 | 0 | if (type != nullptr) { |
2118 | | // Look for a matching extension in the foreign type's scope. |
2119 | 0 | const int type_extension_count = type->extension_count(); |
2120 | 0 | for (int i = 0; i < type_extension_count; i++) { |
2121 | 0 | const FieldDescriptor* extension = type->extension(i); |
2122 | 0 | if (extension->containing_type() == extendee && |
2123 | 0 | extension->type() == FieldDescriptor::TYPE_MESSAGE && |
2124 | 0 | extension->is_optional() && extension->message_type() == type) { |
2125 | | // Found it. |
2126 | 0 | return extension; |
2127 | 0 | } |
2128 | 0 | } |
2129 | 0 | } |
2130 | 0 | } |
2131 | 0 | return nullptr; |
2132 | 0 | } |
2133 | | |
2134 | | void DescriptorPool::FindAllExtensions( |
2135 | | const Descriptor* extendee, |
2136 | 0 | std::vector<const FieldDescriptor*>* out) const { |
2137 | 0 | absl::MutexLockMaybe lock(mutex_); |
2138 | 0 | if (fallback_database_ != nullptr) { |
2139 | 0 | tables_->known_bad_symbols_.clear(); |
2140 | 0 | tables_->known_bad_files_.clear(); |
2141 | 0 | } |
2142 | | |
2143 | | // Initialize tables_->extensions_ from the fallback database first |
2144 | | // (but do this only once per descriptor). |
2145 | 0 | if (fallback_database_ != nullptr && |
2146 | 0 | tables_->extensions_loaded_from_db_.count(extendee) == 0) { |
2147 | 0 | std::vector<int> numbers; |
2148 | 0 | if (fallback_database_->FindAllExtensionNumbers(extendee->full_name(), |
2149 | 0 | &numbers)) { |
2150 | 0 | for (int number : numbers) { |
2151 | 0 | if (tables_->FindExtension(extendee, number) == nullptr) { |
2152 | 0 | TryFindExtensionInFallbackDatabase(extendee, number); |
2153 | 0 | } |
2154 | 0 | } |
2155 | 0 | tables_->extensions_loaded_from_db_.insert(extendee); |
2156 | 0 | } |
2157 | 0 | } |
2158 | |
|
2159 | 0 | tables_->FindAllExtensions(extendee, out); |
2160 | 0 | if (underlay_ != nullptr) { |
2161 | 0 | underlay_->FindAllExtensions(extendee, out); |
2162 | 0 | } |
2163 | 0 | } |
2164 | | |
2165 | | |
2166 | | // ------------------------------------------------------------------- |
2167 | | |
2168 | 0 | const FieldDescriptor* Descriptor::FindFieldByNumber(int key) const { |
2169 | 0 | const FieldDescriptor* result = file()->tables_->FindFieldByNumber(this, key); |
2170 | 0 | if (result == nullptr || result->is_extension()) { |
2171 | 0 | return nullptr; |
2172 | 0 | } else { |
2173 | 0 | return result; |
2174 | 0 | } |
2175 | 0 | } |
2176 | | |
2177 | | const FieldDescriptor* Descriptor::FindFieldByLowercaseName( |
2178 | 0 | absl::string_view key) const { |
2179 | 0 | const FieldDescriptor* result = |
2180 | 0 | file()->tables_->FindFieldByLowercaseName(this, key); |
2181 | 0 | if (result == nullptr || result->is_extension()) { |
2182 | 0 | return nullptr; |
2183 | 0 | } else { |
2184 | 0 | return result; |
2185 | 0 | } |
2186 | 0 | } |
2187 | | |
2188 | | const FieldDescriptor* Descriptor::FindFieldByCamelcaseName( |
2189 | 0 | absl::string_view key) const { |
2190 | 0 | const FieldDescriptor* result = |
2191 | 0 | file()->tables_->FindFieldByCamelcaseName(this, key); |
2192 | 0 | if (result == nullptr || result->is_extension()) { |
2193 | 0 | return nullptr; |
2194 | 0 | } else { |
2195 | 0 | return result; |
2196 | 0 | } |
2197 | 0 | } |
2198 | | |
2199 | | const FieldDescriptor* Descriptor::FindFieldByName( |
2200 | 152k | absl::string_view key) const { |
2201 | 152k | const FieldDescriptor* field = |
2202 | 152k | file()->tables_->FindNestedSymbol(this, key).field_descriptor(); |
2203 | 152k | return field != nullptr && !field->is_extension() ? field : nullptr; |
2204 | 152k | } |
2205 | | |
2206 | | const OneofDescriptor* Descriptor::FindOneofByName( |
2207 | 0 | absl::string_view key) const { |
2208 | 0 | return file()->tables_->FindNestedSymbol(this, key).oneof_descriptor(); |
2209 | 0 | } |
2210 | | |
2211 | | const FieldDescriptor* Descriptor::FindExtensionByName( |
2212 | 0 | absl::string_view key) const { |
2213 | 0 | const FieldDescriptor* field = |
2214 | 0 | file()->tables_->FindNestedSymbol(this, key).field_descriptor(); |
2215 | 0 | return field != nullptr && field->is_extension() ? field : nullptr; |
2216 | 0 | } |
2217 | | |
2218 | | const FieldDescriptor* Descriptor::FindExtensionByLowercaseName( |
2219 | 0 | absl::string_view key) const { |
2220 | 0 | const FieldDescriptor* result = |
2221 | 0 | file()->tables_->FindFieldByLowercaseName(this, key); |
2222 | 0 | if (result == nullptr || !result->is_extension()) { |
2223 | 0 | return nullptr; |
2224 | 0 | } else { |
2225 | 0 | return result; |
2226 | 0 | } |
2227 | 0 | } |
2228 | | |
2229 | | const FieldDescriptor* Descriptor::FindExtensionByCamelcaseName( |
2230 | 0 | absl::string_view key) const { |
2231 | 0 | const FieldDescriptor* result = |
2232 | 0 | file()->tables_->FindFieldByCamelcaseName(this, key); |
2233 | 0 | if (result == nullptr || !result->is_extension()) { |
2234 | 0 | return nullptr; |
2235 | 0 | } else { |
2236 | 0 | return result; |
2237 | 0 | } |
2238 | 0 | } |
2239 | | |
2240 | | const Descriptor* Descriptor::FindNestedTypeByName( |
2241 | 0 | absl::string_view key) const { |
2242 | 0 | return file()->tables_->FindNestedSymbol(this, key).descriptor(); |
2243 | 0 | } |
2244 | | |
2245 | | const EnumDescriptor* Descriptor::FindEnumTypeByName( |
2246 | 0 | absl::string_view key) const { |
2247 | 0 | return file()->tables_->FindNestedSymbol(this, key).enum_descriptor(); |
2248 | 0 | } |
2249 | | |
2250 | | const EnumValueDescriptor* Descriptor::FindEnumValueByName( |
2251 | 0 | absl::string_view key) const { |
2252 | 0 | return file()->tables_->FindNestedSymbol(this, key).enum_value_descriptor(); |
2253 | 0 | } |
2254 | | |
2255 | 0 | const FieldDescriptor* Descriptor::map_key() const { |
2256 | 0 | if (!options().map_entry()) return nullptr; |
2257 | 0 | ABSL_DCHECK_EQ(field_count(), 2); |
2258 | 0 | return field(0); |
2259 | 0 | } |
2260 | | |
2261 | 0 | const FieldDescriptor* Descriptor::map_value() const { |
2262 | 0 | if (!options().map_entry()) return nullptr; |
2263 | 0 | ABSL_DCHECK_EQ(field_count(), 2); |
2264 | 0 | return field(1); |
2265 | 0 | } |
2266 | | |
2267 | | const EnumValueDescriptor* EnumDescriptor::FindValueByName( |
2268 | 0 | absl::string_view key) const { |
2269 | 0 | return file()->tables_->FindNestedSymbol(this, key).enum_value_descriptor(); |
2270 | 0 | } |
2271 | | |
2272 | 0 | const EnumValueDescriptor* EnumDescriptor::FindValueByNumber(int key) const { |
2273 | 0 | return file()->tables_->FindEnumValueByNumber(this, key); |
2274 | 0 | } |
2275 | | |
2276 | | const EnumValueDescriptor* EnumDescriptor::FindValueByNumberCreatingIfUnknown( |
2277 | 0 | int key) const { |
2278 | 0 | return file()->tables_->FindEnumValueByNumberCreatingIfUnknown(this, key); |
2279 | 0 | } |
2280 | | |
2281 | | const MethodDescriptor* ServiceDescriptor::FindMethodByName( |
2282 | 0 | absl::string_view key) const { |
2283 | 0 | return file()->tables_->FindNestedSymbol(this, key).method_descriptor(); |
2284 | 0 | } |
2285 | | |
2286 | | const Descriptor* FileDescriptor::FindMessageTypeByName( |
2287 | 0 | absl::string_view key) const { |
2288 | 0 | return tables_->FindNestedSymbol(this, key).descriptor(); |
2289 | 0 | } |
2290 | | |
2291 | | const EnumDescriptor* FileDescriptor::FindEnumTypeByName( |
2292 | 0 | absl::string_view key) const { |
2293 | 0 | return tables_->FindNestedSymbol(this, key).enum_descriptor(); |
2294 | 0 | } |
2295 | | |
2296 | | const EnumValueDescriptor* FileDescriptor::FindEnumValueByName( |
2297 | 0 | absl::string_view key) const { |
2298 | 0 | return tables_->FindNestedSymbol(this, key).enum_value_descriptor(); |
2299 | 0 | } |
2300 | | |
2301 | | const ServiceDescriptor* FileDescriptor::FindServiceByName( |
2302 | 0 | absl::string_view key) const { |
2303 | 0 | return tables_->FindNestedSymbol(this, key).service_descriptor(); |
2304 | 0 | } |
2305 | | |
2306 | | const FieldDescriptor* FileDescriptor::FindExtensionByName( |
2307 | 0 | absl::string_view key) const { |
2308 | 0 | const FieldDescriptor* field = |
2309 | 0 | tables_->FindNestedSymbol(this, key).field_descriptor(); |
2310 | 0 | return field != nullptr && field->is_extension() ? field : nullptr; |
2311 | 0 | } |
2312 | | |
2313 | | const FieldDescriptor* FileDescriptor::FindExtensionByLowercaseName( |
2314 | 0 | absl::string_view key) const { |
2315 | 0 | const FieldDescriptor* result = tables_->FindFieldByLowercaseName(this, key); |
2316 | 0 | if (result == nullptr || !result->is_extension()) { |
2317 | 0 | return nullptr; |
2318 | 0 | } else { |
2319 | 0 | return result; |
2320 | 0 | } |
2321 | 0 | } |
2322 | | |
2323 | | const FieldDescriptor* FileDescriptor::FindExtensionByCamelcaseName( |
2324 | 0 | absl::string_view key) const { |
2325 | 0 | const FieldDescriptor* result = tables_->FindFieldByCamelcaseName(this, key); |
2326 | 0 | if (result == nullptr || !result->is_extension()) { |
2327 | 0 | return nullptr; |
2328 | 0 | } else { |
2329 | 0 | return result; |
2330 | 0 | } |
2331 | 0 | } |
2332 | | |
2333 | | void Descriptor::ExtensionRange::CopyTo( |
2334 | 0 | DescriptorProto_ExtensionRange* proto) const { |
2335 | 0 | proto->set_start(this->start); |
2336 | 0 | proto->set_end(this->end); |
2337 | 0 | if (options_ != &ExtensionRangeOptions::default_instance()) { |
2338 | 0 | *proto->mutable_options() = *options_; |
2339 | 0 | } |
2340 | 0 | } |
2341 | | |
2342 | | const Descriptor::ExtensionRange* |
2343 | 0 | Descriptor::FindExtensionRangeContainingNumber(int number) const { |
2344 | | // Linear search should be fine because we don't expect a message to have |
2345 | | // more than a couple extension ranges. |
2346 | 0 | for (int i = 0; i < extension_range_count(); i++) { |
2347 | 0 | if (number >= extension_range(i)->start && |
2348 | 0 | number < extension_range(i)->end) { |
2349 | 0 | return extension_range(i); |
2350 | 0 | } |
2351 | 0 | } |
2352 | 0 | return nullptr; |
2353 | 0 | } |
2354 | | |
2355 | | const Descriptor::ReservedRange* Descriptor::FindReservedRangeContainingNumber( |
2356 | 0 | int number) const { |
2357 | | // TODO(chrisn): Consider a non-linear search. |
2358 | 0 | for (int i = 0; i < reserved_range_count(); i++) { |
2359 | 0 | if (number >= reserved_range(i)->start && number < reserved_range(i)->end) { |
2360 | 0 | return reserved_range(i); |
2361 | 0 | } |
2362 | 0 | } |
2363 | 0 | return nullptr; |
2364 | 0 | } |
2365 | | |
2366 | | const EnumDescriptor::ReservedRange* |
2367 | 0 | EnumDescriptor::FindReservedRangeContainingNumber(int number) const { |
2368 | | // TODO(chrisn): Consider a non-linear search. |
2369 | 0 | for (int i = 0; i < reserved_range_count(); i++) { |
2370 | 0 | if (number >= reserved_range(i)->start && |
2371 | 0 | number <= reserved_range(i)->end) { |
2372 | 0 | return reserved_range(i); |
2373 | 0 | } |
2374 | 0 | } |
2375 | 0 | return nullptr; |
2376 | 0 | } |
2377 | | |
2378 | | // ------------------------------------------------------------------- |
2379 | | |
2380 | | bool DescriptorPool::TryFindFileInFallbackDatabase( |
2381 | 6 | absl::string_view name) const { |
2382 | 6 | if (fallback_database_ == nullptr) return false; |
2383 | | |
2384 | 6 | if (tables_->known_bad_files_.contains(name)) return false; |
2385 | | |
2386 | | // NOINLINE to reduce the stack cost of the operation in the caller. |
2387 | 6 | const auto find_file = [](DescriptorDatabase& database, |
2388 | 6 | absl::string_view filename, |
2389 | 6 | FileDescriptorProto& output) PROTOBUF_NOINLINE { |
2390 | 6 | return database.FindFileByName(std::string(filename), &output); |
2391 | 6 | }; |
2392 | | |
2393 | 6 | auto file_proto = absl::make_unique<FileDescriptorProto>(); |
2394 | 6 | if (!find_file(*fallback_database_, name, *file_proto) || |
2395 | 6 | BuildFileFromDatabase(*file_proto) == nullptr) { |
2396 | 0 | tables_->known_bad_files_.emplace(name); |
2397 | 0 | return false; |
2398 | 0 | } |
2399 | 6 | return true; |
2400 | 6 | } |
2401 | | |
2402 | 0 | bool DescriptorPool::IsSubSymbolOfBuiltType(absl::string_view name) const { |
2403 | 0 | auto prefix = std::string(name); |
2404 | 0 | for (;;) { |
2405 | 0 | std::string::size_type dot_pos = prefix.find_last_of('.'); |
2406 | 0 | if (dot_pos == std::string::npos) { |
2407 | 0 | break; |
2408 | 0 | } |
2409 | 0 | prefix = prefix.substr(0, dot_pos); |
2410 | 0 | Symbol symbol = tables_->FindSymbol(prefix); |
2411 | | // If the symbol type is anything other than PACKAGE, then its complete |
2412 | | // definition is already known. |
2413 | 0 | if (!symbol.IsNull() && !symbol.IsPackage()) { |
2414 | 0 | return true; |
2415 | 0 | } |
2416 | 0 | } |
2417 | 0 | if (underlay_ != nullptr) { |
2418 | | // Check to see if any prefix of this symbol exists in the underlay. |
2419 | 0 | return underlay_->IsSubSymbolOfBuiltType(name); |
2420 | 0 | } |
2421 | 0 | return false; |
2422 | 0 | } |
2423 | | |
2424 | | bool DescriptorPool::TryFindSymbolInFallbackDatabase( |
2425 | 0 | absl::string_view name) const { |
2426 | 0 | if (fallback_database_ == nullptr) return false; |
2427 | | |
2428 | 0 | if (tables_->known_bad_symbols_.contains(name)) return false; |
2429 | | |
2430 | 0 | std::string name_string(name); |
2431 | 0 | auto file_proto = absl::make_unique<FileDescriptorProto>(); |
2432 | 0 | if ( // We skip looking in the fallback database if the name is a sub-symbol |
2433 | | // of any descriptor that already exists in the descriptor pool (except |
2434 | | // for package descriptors). This is valid because all symbols except |
2435 | | // for packages are defined in a single file, so if the symbol exists |
2436 | | // then we should already have its definition. |
2437 | | // |
2438 | | // The other reason to do this is to support "overriding" type |
2439 | | // definitions by merging two databases that define the same type. (Yes, |
2440 | | // people do this.) The main difficulty with making this work is that |
2441 | | // FindFileContainingSymbol() is allowed to return both false positives |
2442 | | // (e.g., SimpleDescriptorDatabase, UpgradedDescriptorDatabase) and |
2443 | | // false negatives (e.g. ProtoFileParser, SourceTreeDescriptorDatabase). |
2444 | | // When two such databases are merged, looking up a non-existent |
2445 | | // sub-symbol of a type that already exists in the descriptor pool can |
2446 | | // result in an attempt to load multiple definitions of the same type. |
2447 | | // The check below avoids this. |
2448 | 0 | IsSubSymbolOfBuiltType(name) |
2449 | | |
2450 | | // Look up file containing this symbol in fallback database. |
2451 | 0 | || !fallback_database_->FindFileContainingSymbol(name_string, |
2452 | 0 | file_proto.get()) |
2453 | | |
2454 | | // Check if we've already built this file. If so, it apparently doesn't |
2455 | | // contain the symbol we're looking for. Some DescriptorDatabases |
2456 | | // return false positives. |
2457 | 0 | || tables_->FindFile(file_proto->name()) != nullptr |
2458 | | |
2459 | | // Build the file. |
2460 | 0 | || BuildFileFromDatabase(*file_proto) == nullptr) { |
2461 | 0 | tables_->known_bad_symbols_.insert(std::move(name_string)); |
2462 | 0 | return false; |
2463 | 0 | } |
2464 | | |
2465 | 0 | return true; |
2466 | 0 | } |
2467 | | |
2468 | | bool DescriptorPool::TryFindExtensionInFallbackDatabase( |
2469 | 0 | const Descriptor* containing_type, int field_number) const { |
2470 | 0 | if (fallback_database_ == nullptr) return false; |
2471 | | |
2472 | 0 | auto file_proto = absl::make_unique<FileDescriptorProto>(); |
2473 | 0 | if (!fallback_database_->FindFileContainingExtension( |
2474 | 0 | containing_type->full_name(), field_number, file_proto.get())) { |
2475 | 0 | return false; |
2476 | 0 | } |
2477 | | |
2478 | 0 | if (tables_->FindFile(file_proto->name()) != nullptr) { |
2479 | | // We've already loaded this file, and it apparently doesn't contain the |
2480 | | // extension we're looking for. Some DescriptorDatabases return false |
2481 | | // positives. |
2482 | 0 | return false; |
2483 | 0 | } |
2484 | | |
2485 | 0 | if (BuildFileFromDatabase(*file_proto) == nullptr) { |
2486 | 0 | return false; |
2487 | 0 | } |
2488 | | |
2489 | 0 | return true; |
2490 | 0 | } |
2491 | | |
2492 | | // =================================================================== |
2493 | | |
2494 | 237k | bool FieldDescriptor::is_map_message_type() const { |
2495 | 237k | return type_descriptor_.message_type->options().map_entry(); |
2496 | 237k | } |
2497 | | |
2498 | | std::string FieldDescriptor::DefaultValueAsString( |
2499 | 0 | bool quote_string_type) const { |
2500 | 0 | ABSL_CHECK(has_default_value()) << "No default value"; |
2501 | 0 | switch (cpp_type()) { |
2502 | 0 | case CPPTYPE_INT32: |
2503 | 0 | return absl::StrCat(default_value_int32_t()); |
2504 | 0 | case CPPTYPE_INT64: |
2505 | 0 | return absl::StrCat(default_value_int64_t()); |
2506 | 0 | case CPPTYPE_UINT32: |
2507 | 0 | return absl::StrCat(default_value_uint32_t()); |
2508 | 0 | case CPPTYPE_UINT64: |
2509 | 0 | return absl::StrCat(default_value_uint64_t()); |
2510 | 0 | case CPPTYPE_FLOAT: |
2511 | 0 | return io::SimpleFtoa(default_value_float()); |
2512 | 0 | case CPPTYPE_DOUBLE: |
2513 | 0 | return io::SimpleDtoa(default_value_double()); |
2514 | 0 | case CPPTYPE_BOOL: |
2515 | 0 | return default_value_bool() ? "true" : "false"; |
2516 | 0 | case CPPTYPE_STRING: |
2517 | 0 | if (quote_string_type) { |
2518 | 0 | return absl::StrCat("\"", absl::CEscape(default_value_string()), "\""); |
2519 | 0 | } else { |
2520 | 0 | if (type() == TYPE_BYTES) { |
2521 | 0 | return absl::CEscape(default_value_string()); |
2522 | 0 | } else { |
2523 | 0 | return default_value_string(); |
2524 | 0 | } |
2525 | 0 | } |
2526 | 0 | case CPPTYPE_ENUM: |
2527 | 0 | return default_value_enum()->name(); |
2528 | 0 | case CPPTYPE_MESSAGE: |
2529 | 0 | ABSL_DLOG(FATAL) << "Messages can't have default values!"; |
2530 | 0 | break; |
2531 | 0 | } |
2532 | 0 | ABSL_LOG(FATAL) << "Can't get here: failed to get default value as string"; |
2533 | 0 | return ""; |
2534 | 0 | } |
2535 | | |
2536 | | // CopyTo methods ==================================================== |
2537 | | |
2538 | 0 | void FileDescriptor::CopyTo(FileDescriptorProto* proto) const { |
2539 | 0 | CopyHeadingTo(proto); |
2540 | |
|
2541 | 0 | for (int i = 0; i < dependency_count(); i++) { |
2542 | 0 | proto->add_dependency(dependency(i)->name()); |
2543 | 0 | } |
2544 | |
|
2545 | 0 | for (int i = 0; i < public_dependency_count(); i++) { |
2546 | 0 | proto->add_public_dependency(public_dependencies_[i]); |
2547 | 0 | } |
2548 | |
|
2549 | 0 | for (int i = 0; i < weak_dependency_count(); i++) { |
2550 | 0 | proto->add_weak_dependency(weak_dependencies_[i]); |
2551 | 0 | } |
2552 | |
|
2553 | 0 | for (int i = 0; i < message_type_count() |