/proc/self/cwd/common/values/value_variant.h
Line | Count | Source |
1 | | // Copyright 2025 Google LLC |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | // you may not use this file except in compliance with the License. |
5 | | // You may obtain a copy of the License at |
6 | | // |
7 | | // https://www.apache.org/licenses/LICENSE-2.0 |
8 | | // |
9 | | // Unless required by applicable law or agreed to in writing, software |
10 | | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | // See the License for the specific language governing permissions and |
13 | | // limitations under the License. |
14 | | |
15 | | #ifndef THIRD_PARTY_CEL_CPP_COMMON_VALUES_VALUE_VARIANT_H_ |
16 | | #define THIRD_PARTY_CEL_CPP_COMMON_VALUES_VALUE_VARIANT_H_ |
17 | | |
18 | | #include <cstddef> |
19 | | #include <cstdint> |
20 | | #include <cstring> |
21 | | #include <memory> |
22 | | #include <new> |
23 | | #include <type_traits> |
24 | | #include <utility> |
25 | | |
26 | | #include "absl/base/attributes.h" |
27 | | #include "absl/base/nullability.h" |
28 | | #include "absl/log/absl_check.h" |
29 | | #include "absl/meta/type_traits.h" |
30 | | #include "absl/utility/utility.h" |
31 | | #include "common/arena.h" |
32 | | #include "common/value_kind.h" |
33 | | #include "common/values/bool_value.h" |
34 | | #include "common/values/bytes_value.h" |
35 | | #include "common/values/custom_list_value.h" |
36 | | #include "common/values/custom_map_value.h" |
37 | | #include "common/values/custom_struct_value.h" |
38 | | #include "common/values/double_value.h" |
39 | | #include "common/values/duration_value.h" |
40 | | #include "common/values/error_value.h" |
41 | | #include "common/values/int_value.h" |
42 | | #include "common/values/legacy_list_value.h" |
43 | | #include "common/values/legacy_map_value.h" |
44 | | #include "common/values/legacy_struct_value.h" |
45 | | #include "common/values/list_value.h" |
46 | | #include "common/values/map_value.h" |
47 | | #include "common/values/null_value.h" |
48 | | #include "common/values/opaque_value.h" |
49 | | #include "common/values/parsed_json_list_value.h" |
50 | | #include "common/values/parsed_json_map_value.h" |
51 | | #include "common/values/parsed_map_field_value.h" |
52 | | #include "common/values/parsed_message_value.h" |
53 | | #include "common/values/parsed_repeated_field_value.h" |
54 | | #include "common/values/string_value.h" |
55 | | #include "common/values/timestamp_value.h" |
56 | | #include "common/values/type_value.h" |
57 | | #include "common/values/uint_value.h" |
58 | | #include "common/values/unknown_value.h" |
59 | | #include "common/values/values.h" |
60 | | |
61 | | namespace cel { |
62 | | |
63 | | class Value; |
64 | | |
65 | | namespace common_internal { |
66 | | |
67 | | // Used by ValueVariant to indicate the active alternative. |
68 | | enum class ValueIndex : uint8_t { |
69 | | kNull = 0, |
70 | | kBool, |
71 | | kInt, |
72 | | kUint, |
73 | | kDouble, |
74 | | kDuration, |
75 | | kTimestamp, |
76 | | kType, |
77 | | kLegacyList, |
78 | | kParsedJsonList, |
79 | | kParsedRepeatedField, |
80 | | kCustomList, |
81 | | kLegacyMap, |
82 | | kParsedJsonMap, |
83 | | kParsedMapField, |
84 | | kCustomMap, |
85 | | kLegacyStruct, |
86 | | kParsedMessage, |
87 | | kCustomStruct, |
88 | | kOpaque, |
89 | | kBytes, |
90 | | kString, |
91 | | kError, |
92 | | // Keep non-trivial alternatives together to aid in compiling optimizations. |
93 | | kUnknown, |
94 | | }; |
95 | | |
96 | | // Used by ValueVariant to indicate pre-computed behaviors. |
97 | | enum class ValueFlags : uint32_t { |
98 | | kNone = 0, |
99 | | kNonTrivial = 1, |
100 | | }; |
101 | | |
102 | | ABSL_ATTRIBUTE_ALWAYS_INLINE inline constexpr ValueFlags operator&( |
103 | 253M | ValueFlags lhs, ValueFlags rhs) { |
104 | 253M | return static_cast<ValueFlags>( |
105 | 253M | static_cast<std::underlying_type_t<ValueFlags>>(lhs) & |
106 | 253M | static_cast<std::underlying_type_t<ValueFlags>>(rhs)); |
107 | 253M | } |
108 | | |
109 | | // Traits specialized by each alternative. |
110 | | // |
111 | | // ValueIndex ValueAlternative<T>::kIndex |
112 | | // |
113 | | // Indicates the alternative index corresponding to T. |
114 | | // |
115 | | // ValueKind ValueAlternative<T>::kKind |
116 | | // |
117 | | // Indicatates the kind corresponding to T. |
118 | | // |
119 | | // bool ValueAlternative<T>::kAlwaysTrivial |
120 | | // |
121 | | // True if T is trivially_copyable, false otherwise. |
122 | | // |
123 | | // ValueFlags ValueAlternative<T>::Flags(const T* absl_nonnull ) |
124 | | // |
125 | | // Returns the flags for the corresponding instance of T. |
126 | | template <typename T> |
127 | | struct ValueAlternative; |
128 | | |
129 | | template <> |
130 | | struct ValueAlternative<NullValue> { |
131 | | static constexpr ValueIndex kIndex = ValueIndex::kNull; |
132 | | static constexpr ValueKind kKind = NullValue::kKind; |
133 | | static constexpr bool kAlwaysTrivial = true; |
134 | | |
135 | 10.1M | static constexpr ValueFlags Flags(const NullValue* absl_nonnull) { |
136 | 10.1M | return ValueFlags::kNone; |
137 | 10.1M | } |
138 | | }; |
139 | | |
140 | | template <> |
141 | | struct ValueAlternative<BoolValue> { |
142 | | static constexpr ValueIndex kIndex = ValueIndex::kBool; |
143 | | static constexpr ValueKind kKind = BoolValue::kKind; |
144 | | static constexpr bool kAlwaysTrivial = true; |
145 | | |
146 | 2.72M | static constexpr ValueFlags Flags(const BoolValue* absl_nonnull) { |
147 | 2.72M | return ValueFlags::kNone; |
148 | 2.72M | } |
149 | | }; |
150 | | |
151 | | template <> |
152 | | struct ValueAlternative<IntValue> { |
153 | | static constexpr ValueIndex kIndex = ValueIndex::kInt; |
154 | | static constexpr ValueKind kKind = IntValue::kKind; |
155 | | static constexpr bool kAlwaysTrivial = true; |
156 | | |
157 | 15.8M | static constexpr ValueFlags Flags(const IntValue* absl_nonnull) { |
158 | 15.8M | return ValueFlags::kNone; |
159 | 15.8M | } |
160 | | }; |
161 | | |
162 | | template <> |
163 | | struct ValueAlternative<UintValue> { |
164 | | static constexpr ValueIndex kIndex = ValueIndex::kUint; |
165 | | static constexpr ValueKind kKind = UintValue::kKind; |
166 | | static constexpr bool kAlwaysTrivial = true; |
167 | | |
168 | 5.14M | static constexpr ValueFlags Flags(const UintValue* absl_nonnull) { |
169 | 5.14M | return ValueFlags::kNone; |
170 | 5.14M | } |
171 | | }; |
172 | | |
173 | | template <> |
174 | | struct ValueAlternative<DoubleValue> { |
175 | | static constexpr ValueIndex kIndex = ValueIndex::kDouble; |
176 | | static constexpr ValueKind kKind = DoubleValue::kKind; |
177 | | static constexpr bool kAlwaysTrivial = true; |
178 | | |
179 | 1.11M | static constexpr ValueFlags Flags(const DoubleValue* absl_nonnull) { |
180 | 1.11M | return ValueFlags::kNone; |
181 | 1.11M | } |
182 | | }; |
183 | | |
184 | | template <> |
185 | | struct ValueAlternative<DurationValue> { |
186 | | static constexpr ValueIndex kIndex = ValueIndex::kDuration; |
187 | | static constexpr ValueKind kKind = DurationValue::kKind; |
188 | | static constexpr bool kAlwaysTrivial = true; |
189 | | |
190 | 42.9k | static constexpr ValueFlags Flags(const DurationValue* absl_nonnull) { |
191 | 42.9k | return ValueFlags::kNone; |
192 | 42.9k | } |
193 | | }; |
194 | | |
195 | | template <> |
196 | | struct ValueAlternative<TimestampValue> { |
197 | | static constexpr ValueIndex kIndex = ValueIndex::kTimestamp; |
198 | | static constexpr ValueKind kKind = TimestampValue::kKind; |
199 | | static constexpr bool kAlwaysTrivial = true; |
200 | | |
201 | 20.6k | static constexpr ValueFlags Flags(const TimestampValue* absl_nonnull) { |
202 | 20.6k | return ValueFlags::kNone; |
203 | 20.6k | } |
204 | | }; |
205 | | |
206 | | template <> |
207 | | struct ValueAlternative<TypeValue> { |
208 | | static constexpr ValueIndex kIndex = ValueIndex::kType; |
209 | | static constexpr ValueKind kKind = TypeValue::kKind; |
210 | | static constexpr bool kAlwaysTrivial = true; |
211 | | |
212 | 4.48k | static constexpr ValueFlags Flags(const TypeValue* absl_nonnull) { |
213 | 4.48k | return ValueFlags::kNone; |
214 | 4.48k | } |
215 | | }; |
216 | | |
217 | | template <> |
218 | | struct ValueAlternative<LegacyListValue> { |
219 | | static constexpr ValueIndex kIndex = ValueIndex::kLegacyList; |
220 | | static constexpr ValueKind kKind = LegacyListValue::kKind; |
221 | | static constexpr bool kAlwaysTrivial = true; |
222 | | |
223 | 0 | static constexpr ValueFlags Flags(const LegacyListValue* absl_nonnull) { |
224 | 0 | return ValueFlags::kNone; |
225 | 0 | } |
226 | | }; |
227 | | |
228 | | template <> |
229 | | struct ValueAlternative<ParsedJsonListValue> { |
230 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedJsonList; |
231 | | static constexpr ValueKind kKind = ParsedJsonListValue::kKind; |
232 | | static constexpr bool kAlwaysTrivial = true; |
233 | | |
234 | 404k | static constexpr ValueFlags Flags(const ParsedJsonListValue* absl_nonnull) { |
235 | 404k | return ValueFlags::kNone; |
236 | 404k | } |
237 | | }; |
238 | | |
239 | | template <> |
240 | | struct ValueAlternative<ParsedRepeatedFieldValue> { |
241 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedRepeatedField; |
242 | | static constexpr ValueKind kKind = ParsedRepeatedFieldValue::kKind; |
243 | | static constexpr bool kAlwaysTrivial = true; |
244 | | |
245 | | static constexpr ValueFlags Flags( |
246 | 0 | const ParsedRepeatedFieldValue* absl_nonnull) { |
247 | 0 | return ValueFlags::kNone; |
248 | 0 | } |
249 | | }; |
250 | | |
251 | | template <> |
252 | | struct ValueAlternative<CustomListValue> { |
253 | | static constexpr ValueIndex kIndex = ValueIndex::kCustomList; |
254 | | static constexpr ValueKind kKind = CustomListValue::kKind; |
255 | | static constexpr bool kAlwaysTrivial = true; |
256 | | |
257 | 2.49M | static constexpr ValueFlags Flags(const CustomListValue* absl_nonnull) { |
258 | 2.49M | return ValueFlags::kNone; |
259 | 2.49M | } |
260 | | }; |
261 | | |
262 | | template <> |
263 | | struct ValueAlternative<LegacyMapValue> { |
264 | | static constexpr ValueIndex kIndex = ValueIndex::kLegacyMap; |
265 | | static constexpr ValueKind kKind = LegacyMapValue::kKind; |
266 | | static constexpr bool kAlwaysTrivial = true; |
267 | | |
268 | 0 | static constexpr ValueFlags Flags(const LegacyMapValue* absl_nonnull) { |
269 | 0 | return ValueFlags::kNone; |
270 | 0 | } |
271 | | }; |
272 | | |
273 | | template <> |
274 | | struct ValueAlternative<ParsedJsonMapValue> { |
275 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedJsonMap; |
276 | | static constexpr ValueKind kKind = ParsedJsonMapValue::kKind; |
277 | | static constexpr bool kAlwaysTrivial = true; |
278 | | |
279 | 11.0k | static constexpr ValueFlags Flags(const ParsedJsonMapValue* absl_nonnull) { |
280 | 11.0k | return ValueFlags::kNone; |
281 | 11.0k | } |
282 | | }; |
283 | | |
284 | | template <> |
285 | | struct ValueAlternative<ParsedMapFieldValue> { |
286 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedMapField; |
287 | | static constexpr ValueKind kKind = ParsedMapFieldValue::kKind; |
288 | | static constexpr bool kAlwaysTrivial = true; |
289 | | |
290 | 0 | static constexpr ValueFlags Flags(const ParsedMapFieldValue* absl_nonnull) { |
291 | 0 | return ValueFlags::kNone; |
292 | 0 | } |
293 | | }; |
294 | | |
295 | | template <> |
296 | | struct ValueAlternative<CustomMapValue> { |
297 | | static constexpr ValueIndex kIndex = ValueIndex::kCustomMap; |
298 | | static constexpr ValueKind kKind = CustomMapValue::kKind; |
299 | | static constexpr bool kAlwaysTrivial = true; |
300 | | |
301 | 573k | static constexpr ValueFlags Flags(const CustomMapValue* absl_nonnull) { |
302 | 573k | return ValueFlags::kNone; |
303 | 573k | } |
304 | | }; |
305 | | |
306 | | template <> |
307 | | struct ValueAlternative<LegacyStructValue> { |
308 | | static constexpr ValueIndex kIndex = ValueIndex::kLegacyStruct; |
309 | | static constexpr ValueKind kKind = LegacyStructValue::kKind; |
310 | | static constexpr bool kAlwaysTrivial = true; |
311 | | |
312 | 467k | static constexpr ValueFlags Flags(const LegacyStructValue* absl_nonnull) { |
313 | 467k | return ValueFlags::kNone; |
314 | 467k | } |
315 | | }; |
316 | | |
317 | | template <> |
318 | | struct ValueAlternative<ParsedMessageValue> { |
319 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedMessage; |
320 | | static constexpr ValueKind kKind = ParsedMessageValue::kKind; |
321 | | static constexpr bool kAlwaysTrivial = true; |
322 | | |
323 | 495k | static constexpr ValueFlags Flags(const ParsedMessageValue* absl_nonnull) { |
324 | 495k | return ValueFlags::kNone; |
325 | 495k | } |
326 | | }; |
327 | | |
328 | | template <> |
329 | | struct ValueAlternative<CustomStructValue> { |
330 | | static constexpr ValueIndex kIndex = ValueIndex::kCustomStruct; |
331 | | static constexpr ValueKind kKind = CustomStructValue::kKind; |
332 | | static constexpr bool kAlwaysTrivial = true; |
333 | | |
334 | 0 | static constexpr ValueFlags Flags(const CustomStructValue* absl_nonnull) { |
335 | 0 | return ValueFlags::kNone; |
336 | 0 | } |
337 | | }; |
338 | | |
339 | | template <> |
340 | | struct ValueAlternative<OpaqueValue> { |
341 | | static constexpr ValueIndex kIndex = ValueIndex::kOpaque; |
342 | | static constexpr ValueKind kKind = OpaqueValue::kKind; |
343 | | static constexpr bool kAlwaysTrivial = true; |
344 | | |
345 | 0 | static constexpr ValueFlags Flags(const OpaqueValue* absl_nonnull) { |
346 | 0 | return ValueFlags::kNone; |
347 | 0 | } |
348 | | }; |
349 | | |
350 | | template <> |
351 | | struct ValueAlternative<BytesValue> { |
352 | | static constexpr ValueIndex kIndex = ValueIndex::kBytes; |
353 | | static constexpr ValueKind kKind = BytesValue::kKind; |
354 | | static constexpr bool kAlwaysTrivial = true; |
355 | | |
356 | 27.6k | static ValueFlags Flags(const BytesValue* absl_nonnull alternative) { |
357 | 27.6k | return ValueFlags::kNone; |
358 | 27.6k | } |
359 | | }; |
360 | | |
361 | | template <> |
362 | | struct ValueAlternative<StringValue> { |
363 | | static constexpr ValueIndex kIndex = ValueIndex::kString; |
364 | | static constexpr ValueKind kKind = StringValue::kKind; |
365 | | static constexpr bool kAlwaysTrivial = true; |
366 | | |
367 | 63.7k | static ValueFlags Flags(const StringValue* absl_nonnull alternative) { |
368 | 63.7k | return ValueFlags::kNone; |
369 | 63.7k | } |
370 | | }; |
371 | | |
372 | | template <> |
373 | | struct ValueAlternative<ErrorValue> { |
374 | | static constexpr ValueIndex kIndex = ValueIndex::kError; |
375 | | static constexpr ValueKind kKind = ErrorValue::kKind; |
376 | | static constexpr bool kAlwaysTrivial = true; |
377 | | |
378 | 10.9M | static ValueFlags Flags(const ErrorValue* absl_nonnull alternative) { |
379 | 10.9M | return ValueFlags::kNone; |
380 | 10.9M | } |
381 | | }; |
382 | | |
383 | | template <> |
384 | | struct ValueAlternative<UnknownValue> { |
385 | | static constexpr ValueIndex kIndex = ValueIndex::kUnknown; |
386 | | static constexpr ValueKind kKind = UnknownValue::kKind; |
387 | | static constexpr bool kAlwaysTrivial = false; |
388 | | |
389 | 0 | static constexpr ValueFlags Flags(const UnknownValue* absl_nonnull) { |
390 | 0 | return ValueFlags::kNonTrivial; |
391 | 0 | } |
392 | | }; |
393 | | |
394 | | template <typename T, typename = void> |
395 | | struct IsValueAlternative : std::false_type {}; |
396 | | |
397 | | template <typename T> |
398 | | struct IsValueAlternative<T, std::void_t<decltype(ValueAlternative<T>{})>> |
399 | | : std::true_type {}; |
400 | | |
401 | | template <typename T> |
402 | | inline constexpr bool IsValueAlternativeV = IsValueAlternative<T>::value; |
403 | | |
404 | | // Alignment and size of the storage inside ValueVariant, not for ValueVariant |
405 | | // itself. |
406 | | inline constexpr size_t kValueVariantAlign = 8; |
407 | | inline constexpr size_t kValueVariantSize = 24; |
408 | | |
409 | | // Hand-rolled variant used by cel::Value which exhibits up to a 25% performance |
410 | | // improvement compared to using std::variant. |
411 | | // |
412 | | // The implementation abuses the fact that most alternatives are trivially |
413 | | // copyable and some are conditionally trivially copyable at runtime. For the |
414 | | // fast path, we perform raw byte copying. For the slow path, we fallback to a |
415 | | // non-inlined function. The compiler is typically smart enough to inline the |
416 | | // fast path and emit efficient instructions for the raw byte copying (usually |
417 | | // two instructions). It also uses switch for visiting, which most compilers can |
418 | | // optimize better compared to a function pointer table (which libc++ currently |
419 | | // uses and Clang currently does not optimize well). |
420 | | class alignas(kValueVariantAlign) CEL_COMMON_INTERNAL_VALUE_VARIANT_TRIVIAL_ABI |
421 | | ValueVariant final { |
422 | | public: |
423 | 7.12M | ValueVariant() = default; |
424 | | |
425 | | ValueVariant(const ValueVariant& other) noexcept |
426 | 29.4M | : index_(other.index_), kind_(other.kind_), flags_(other.flags_) { |
427 | 29.4M | if ((flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone) { |
428 | 29.4M | std::memcpy(raw_, other.raw_, sizeof(raw_)); |
429 | 29.4M | } else { |
430 | 0 | SlowCopyConstruct(other); |
431 | 0 | } |
432 | 29.4M | } |
433 | | |
434 | | ValueVariant(ValueVariant&& other) noexcept |
435 | 38.5M | : index_(other.index_), kind_(other.kind_), flags_(other.flags_) { |
436 | 38.5M | if ((flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone) { |
437 | 38.5M | std::memcpy(raw_, other.raw_, sizeof(raw_)); |
438 | 38.5M | } else { |
439 | 0 | SlowMoveConstruct(other); |
440 | 0 | } |
441 | 38.5M | } |
442 | | |
443 | 102M | ~ValueVariant() { |
444 | 102M | if ((flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNonTrivial) { |
445 | 0 | SlowDestruct(); |
446 | 0 | } |
447 | 102M | } |
448 | | |
449 | 5.11M | ValueVariant& operator=(const ValueVariant& other) noexcept { |
450 | 5.11M | if (this != &other) { |
451 | 5.11M | const bool trivial = |
452 | 5.11M | (flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
453 | 5.11M | const bool other_trivial = |
454 | 5.11M | (other.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
455 | 5.11M | if (trivial && other_trivial) { |
456 | 5.11M | FastCopyAssign(other); |
457 | 5.11M | } else { |
458 | 0 | SlowCopyAssign(other, trivial, other_trivial); |
459 | 0 | } |
460 | 5.11M | } |
461 | 5.11M | return *this; |
462 | 5.11M | } |
463 | | |
464 | 29.8M | ValueVariant& operator=(ValueVariant&& other) noexcept { |
465 | 29.8M | if (this != &other) { |
466 | 29.8M | const bool trivial = |
467 | 29.8M | (flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
468 | 29.8M | const bool other_trivial = |
469 | 29.8M | (other.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
470 | 29.8M | if (trivial && other_trivial) { |
471 | 29.8M | FastMoveAssign(other); |
472 | 29.8M | } else { |
473 | 0 | SlowMoveAssign(other, trivial, other_trivial); |
474 | 0 | } |
475 | 29.8M | } |
476 | 29.8M | return *this; |
477 | 29.8M | } |
478 | | |
479 | | template <typename T, typename... Args> |
480 | | explicit ValueVariant(absl::in_place_type_t<T>, Args&&... args) |
481 | 37.6M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { |
482 | 37.6M | static_assert(alignof(T) <= kValueVariantAlign); |
483 | 37.6M | static_assert(sizeof(T) <= kValueVariantSize); |
484 | | |
485 | 37.6M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) |
486 | 37.6M | T(std::forward<Args>(args)...)); |
487 | 37.6M | } cel::common_internal::ValueVariant::ValueVariant<cel::BoolValue, cel::BoolValue>(std::__1::in_place_type_t<cel::BoolValue>, cel::BoolValue&&) Line | Count | Source | 481 | 2.36M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 2.36M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 2.36M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 2.36M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 2.36M | T(std::forward<Args>(args)...)); | 487 | 2.36M | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::UnknownValue, cel::UnknownValue>(std::__1::in_place_type_t<cel::UnknownValue>, cel::UnknownValue&&) cel::common_internal::ValueVariant::ValueVariant<cel::ErrorValue, cel::ErrorValue>(std::__1::in_place_type_t<cel::ErrorValue>, cel::ErrorValue&&) Line | Count | Source | 481 | 2.06M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 2.06M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 2.06M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 2.06M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 2.06M | T(std::forward<Args>(args)...)); | 487 | 2.06M | } |
cel::common_internal::ValueVariant::ValueVariant<cel::IntValue, cel::IntValue>(std::__1::in_place_type_t<cel::IntValue>, cel::IntValue&&) Line | Count | Source | 481 | 15.7M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 15.7M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 15.7M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 15.7M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 15.7M | T(std::forward<Args>(args)...)); | 487 | 15.7M | } |
cel::common_internal::ValueVariant::ValueVariant<cel::UintValue, cel::UintValue>(std::__1::in_place_type_t<cel::UintValue>, cel::UintValue&&) Line | Count | Source | 481 | 5.14M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 5.14M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 5.14M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 5.14M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 5.14M | T(std::forward<Args>(args)...)); | 487 | 5.14M | } |
cel::common_internal::ValueVariant::ValueVariant<cel::StringValue, cel::StringValue>(std::__1::in_place_type_t<cel::StringValue>, cel::StringValue&&) Line | Count | Source | 481 | 18.2k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 18.2k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 18.2k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 18.2k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 18.2k | T(std::forward<Args>(args)...)); | 487 | 18.2k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::TypeValue, cel::TypeValue>(std::__1::in_place_type_t<cel::TypeValue>, cel::TypeValue&&) Line | Count | Source | 481 | 4.48k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 4.48k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 4.48k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 4.48k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 4.48k | T(std::forward<Args>(args)...)); | 487 | 4.48k | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::UnknownValue, cel::UnknownValue&>(std::__1::in_place_type_t<cel::UnknownValue>, cel::UnknownValue&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue, cel::CustomMapValue>(std::__1::in_place_type_t<cel::CustomMapValue>, cel::CustomMapValue&&) cel::common_internal::ValueVariant::ValueVariant<cel::StringValue, cel::StringValue const&>(std::__1::in_place_type_t<cel::StringValue>, cel::StringValue const&) Line | Count | Source | 481 | 45.5k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 45.5k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 45.5k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 45.5k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 45.5k | T(std::forward<Args>(args)...)); | 487 | 45.5k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::NullValue, cel::NullValue>(std::__1::in_place_type_t<cel::NullValue>, cel::NullValue&&) Line | Count | Source | 481 | 7.04M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 7.04M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 7.04M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 7.04M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 7.04M | T(std::forward<Args>(args)...)); | 487 | 7.04M | } |
cel::common_internal::ValueVariant::ValueVariant<cel::DoubleValue, cel::DoubleValue>(std::__1::in_place_type_t<cel::DoubleValue>, cel::DoubleValue&&) Line | Count | Source | 481 | 1.11M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 1.11M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 1.11M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 1.11M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 1.11M | T(std::forward<Args>(args)...)); | 487 | 1.11M | } |
cel::common_internal::ValueVariant::ValueVariant<cel::BytesValue, cel::BytesValue>(std::__1::in_place_type_t<cel::BytesValue>, cel::BytesValue&&) Line | Count | Source | 481 | 27.6k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 27.6k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 27.6k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 27.6k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 27.6k | T(std::forward<Args>(args)...)); | 487 | 27.6k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::DurationValue, cel::DurationValue>(std::__1::in_place_type_t<cel::DurationValue>, cel::DurationValue&&) Line | Count | Source | 481 | 42.9k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 42.9k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 42.9k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 42.9k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 42.9k | T(std::forward<Args>(args)...)); | 487 | 42.9k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::TimestampValue, cel::TimestampValue>(std::__1::in_place_type_t<cel::TimestampValue>, cel::TimestampValue&&) Line | Count | Source | 481 | 20.6k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 20.6k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 20.6k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 20.6k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 20.6k | T(std::forward<Args>(args)...)); | 487 | 20.6k | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomListValue, cel::CustomListValue>(std::__1::in_place_type_t<cel::CustomListValue>, cel::CustomListValue&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::OpaqueValue, cel::OpaqueValue const&>(std::__1::in_place_type_t<cel::OpaqueValue>, cel::OpaqueValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomListValue, cel::CustomListValue const&>(std::__1::in_place_type_t<cel::CustomListValue>, cel::CustomListValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedRepeatedFieldValue, cel::ParsedRepeatedFieldValue const&>(std::__1::in_place_type_t<cel::ParsedRepeatedFieldValue>, cel::ParsedRepeatedFieldValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonListValue, cel::ParsedJsonListValue const&>(std::__1::in_place_type_t<cel::ParsedJsonListValue>, cel::ParsedJsonListValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyListValue, cel::common_internal::LegacyListValue const&>(std::__1::in_place_type_t<cel::common_internal::LegacyListValue>, cel::common_internal::LegacyListValue const&) cel::common_internal::ValueVariant::ValueVariant<cel::CustomListValue, cel::CustomListValue const>(std::__1::in_place_type_t<cel::CustomListValue>, cel::CustomListValue const&&) Line | Count | Source | 481 | 2.49M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 2.49M | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 2.49M | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 2.49M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 2.49M | T(std::forward<Args>(args)...)); | 487 | 2.49M | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedRepeatedFieldValue, cel::ParsedRepeatedFieldValue const>(std::__1::in_place_type_t<cel::ParsedRepeatedFieldValue>, cel::ParsedRepeatedFieldValue const&&) cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonListValue, cel::ParsedJsonListValue const>(std::__1::in_place_type_t<cel::ParsedJsonListValue>, cel::ParsedJsonListValue const&&) Line | Count | Source | 481 | 467 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 467 | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 467 | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 467 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 467 | T(std::forward<Args>(args)...)); | 487 | 467 | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyListValue, cel::common_internal::LegacyListValue const>(std::__1::in_place_type_t<cel::common_internal::LegacyListValue>, cel::common_internal::LegacyListValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue, cel::CustomMapValue const&>(std::__1::in_place_type_t<cel::CustomMapValue>, cel::CustomMapValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMapFieldValue, cel::ParsedMapFieldValue const&>(std::__1::in_place_type_t<cel::ParsedMapFieldValue>, cel::ParsedMapFieldValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonMapValue, cel::ParsedJsonMapValue const&>(std::__1::in_place_type_t<cel::ParsedJsonMapValue>, cel::ParsedJsonMapValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyMapValue, cel::common_internal::LegacyMapValue const&>(std::__1::in_place_type_t<cel::common_internal::LegacyMapValue>, cel::common_internal::LegacyMapValue const&) cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue, cel::CustomMapValue const>(std::__1::in_place_type_t<cel::CustomMapValue>, cel::CustomMapValue const&&) Line | Count | Source | 481 | 573k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 573k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 573k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 573k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 573k | T(std::forward<Args>(args)...)); | 487 | 573k | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMapFieldValue, cel::ParsedMapFieldValue const>(std::__1::in_place_type_t<cel::ParsedMapFieldValue>, cel::ParsedMapFieldValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonMapValue, cel::ParsedJsonMapValue const>(std::__1::in_place_type_t<cel::ParsedJsonMapValue>, cel::ParsedJsonMapValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyMapValue, cel::common_internal::LegacyMapValue const>(std::__1::in_place_type_t<cel::common_internal::LegacyMapValue>, cel::common_internal::LegacyMapValue const&&) cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonListValue, cel::ParsedJsonListValue>(std::__1::in_place_type_t<cel::ParsedJsonListValue>, cel::ParsedJsonListValue&&) Line | Count | Source | 481 | 404k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 404k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 404k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 404k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 404k | T(std::forward<Args>(args)...)); | 487 | 404k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonMapValue, cel::ParsedJsonMapValue>(std::__1::in_place_type_t<cel::ParsedJsonMapValue>, cel::ParsedJsonMapValue&&) Line | Count | Source | 481 | 11.0k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 11.0k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 11.0k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 11.0k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 11.0k | T(std::forward<Args>(args)...)); | 487 | 11.0k | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomStructValue, cel::CustomStructValue const&>(std::__1::in_place_type_t<cel::CustomStructValue>, cel::CustomStructValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue, cel::ParsedMessageValue const&>(std::__1::in_place_type_t<cel::ParsedMessageValue>, cel::ParsedMessageValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyStructValue, cel::common_internal::LegacyStructValue const&>(std::__1::in_place_type_t<cel::common_internal::LegacyStructValue>, cel::common_internal::LegacyStructValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomStructValue, cel::CustomStructValue const>(std::__1::in_place_type_t<cel::CustomStructValue>, cel::CustomStructValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue, cel::ParsedMessageValue const>(std::__1::in_place_type_t<cel::ParsedMessageValue>, cel::ParsedMessageValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyStructValue, cel::common_internal::LegacyStructValue const>(std::__1::in_place_type_t<cel::common_internal::LegacyStructValue>, cel::common_internal::LegacyStructValue const&&) cel::common_internal::ValueVariant::ValueVariant<cel::CustomListValue, cel::CustomListValue&>(std::__1::in_place_type_t<cel::CustomListValue>, cel::CustomListValue&) Line | Count | Source | 481 | 21 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 21 | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 21 | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 21 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 21 | T(std::forward<Args>(args)...)); | 487 | 21 | } |
cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue, cel::CustomMapValue&>(std::__1::in_place_type_t<cel::CustomMapValue>, cel::CustomMapValue&) Line | Count | Source | 481 | 1 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 1 | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 1 | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 1 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 1 | T(std::forward<Args>(args)...)); | 487 | 1 | } |
cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue, cel::ParsedMessageValue&>(std::__1::in_place_type_t<cel::ParsedMessageValue>, cel::ParsedMessageValue&) Line | Count | Source | 481 | 28.5k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 28.5k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 28.5k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 28.5k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 28.5k | T(std::forward<Args>(args)...)); | 487 | 28.5k | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyStructValue, cel::common_internal::LegacyStructValue>(std::__1::in_place_type_t<cel::common_internal::LegacyStructValue>, cel::common_internal::LegacyStructValue&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::NullValue, cel::NullValue const&>(std::__1::in_place_type_t<cel::NullValue>, cel::NullValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::BoolValue, cel::BoolValue const&>(std::__1::in_place_type_t<cel::BoolValue>, cel::BoolValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::IntValue, cel::IntValue const&>(std::__1::in_place_type_t<cel::IntValue>, cel::IntValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::UintValue, cel::UintValue const&>(std::__1::in_place_type_t<cel::UintValue>, cel::UintValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::DoubleValue, cel::DoubleValue const&>(std::__1::in_place_type_t<cel::DoubleValue>, cel::DoubleValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::DurationValue, cel::DurationValue const&>(std::__1::in_place_type_t<cel::DurationValue>, cel::DurationValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::TimestampValue, cel::TimestampValue const&>(std::__1::in_place_type_t<cel::TimestampValue>, cel::TimestampValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::TypeValue, cel::TypeValue const&>(std::__1::in_place_type_t<cel::TypeValue>, cel::TypeValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedRepeatedFieldValue, cel::ParsedRepeatedFieldValue>(std::__1::in_place_type_t<cel::ParsedRepeatedFieldValue>, cel::ParsedRepeatedFieldValue&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMapFieldValue, cel::ParsedMapFieldValue>(std::__1::in_place_type_t<cel::ParsedMapFieldValue>, cel::ParsedMapFieldValue&&) cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue, cel::ParsedMessageValue>(std::__1::in_place_type_t<cel::ParsedMessageValue>, cel::ParsedMessageValue&&) Line | Count | Source | 481 | 467k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 482 | 467k | static_assert(alignof(T) <= kValueVariantAlign); | 483 | 467k | static_assert(sizeof(T) <= kValueVariantSize); | 484 | | | 485 | 467k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 486 | 467k | T(std::forward<Args>(args)...)); | 487 | 467k | } |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomStructValue, cel::CustomStructValue>(std::__1::in_place_type_t<cel::CustomStructValue>, cel::CustomStructValue&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::OpaqueValue, cel::OpaqueValue>(std::__1::in_place_type_t<cel::OpaqueValue>, cel::OpaqueValue&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::UnknownValue, cel::UnknownValue const&>(std::__1::in_place_type_t<cel::UnknownValue>, cel::UnknownValue const&) |
488 | | |
489 | | template <typename T, typename = std::enable_if_t< |
490 | | IsValueAlternativeV<absl::remove_cvref_t<T>>>> |
491 | | explicit ValueVariant(T&& value) |
492 | 3.06M | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, |
493 | 3.06M | std::forward<T>(value)) {}Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomListValue const&, void>(cel::CustomListValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedRepeatedFieldValue const&, void>(cel::ParsedRepeatedFieldValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonListValue const&, void>(cel::ParsedJsonListValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyListValue const&, void>(cel::common_internal::LegacyListValue const&) cel::common_internal::ValueVariant::ValueVariant<cel::CustomListValue const, void>(cel::CustomListValue const&&) Line | Count | Source | 492 | 2.49M | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, | 493 | 2.49M | std::forward<T>(value)) {} |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedRepeatedFieldValue const, void>(cel::ParsedRepeatedFieldValue const&&) cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonListValue const, void>(cel::ParsedJsonListValue const&&) Line | Count | Source | 492 | 467 | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, | 493 | 467 | std::forward<T>(value)) {} |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyListValue const, void>(cel::common_internal::LegacyListValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue const&, void>(cel::CustomMapValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMapFieldValue const&, void>(cel::ParsedMapFieldValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonMapValue const&, void>(cel::ParsedJsonMapValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyMapValue const&, void>(cel::common_internal::LegacyMapValue const&) cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue const, void>(cel::CustomMapValue const&&) Line | Count | Source | 492 | 573k | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, | 493 | 573k | std::forward<T>(value)) {} |
Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMapFieldValue const, void>(cel::ParsedMapFieldValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonMapValue const, void>(cel::ParsedJsonMapValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyMapValue const, void>(cel::common_internal::LegacyMapValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomStructValue const&, void>(cel::CustomStructValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue const&, void>(cel::ParsedMessageValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyStructValue const&, void>(cel::common_internal::LegacyStructValue const&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::CustomStructValue const, void>(cel::CustomStructValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue const, void>(cel::ParsedMessageValue const&&) Unexecuted instantiation: cel::common_internal::ValueVariant::ValueVariant<cel::common_internal::LegacyStructValue const, void>(cel::common_internal::LegacyStructValue const&&) |
494 | | |
495 | 137M | ValueKind kind() const { return kind_; } |
496 | | |
497 | | template <typename T> |
498 | 12.7M | void Assign(T&& value) { |
499 | 12.7M | using U = absl::remove_cvref_t<T>; |
500 | | |
501 | 12.7M | static_assert(alignof(U) <= kValueVariantAlign); |
502 | 12.7M | static_assert(sizeof(U) <= kValueVariantSize); |
503 | | |
504 | 12.7M | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { |
505 | 12.7M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { |
506 | 0 | SlowDestruct(); |
507 | 0 | } |
508 | 12.7M | index_ = ValueAlternative<U>::kIndex; |
509 | 12.7M | kind_ = ValueAlternative<U>::kKind; |
510 | 12.7M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) |
511 | 12.7M | U(std::forward<T>(value))); |
512 | 12.7M | } else { |
513 | | // U is not always trivial. See if the current active alternative is U. If |
514 | | // it is, we can just do a simple assignment without having to destruct |
515 | | // first. Otherwise fallback to destruct and construct. |
516 | 0 | if (index_ == ValueAlternative<U>::kIndex) { |
517 | 0 | *At<U>() = std::forward<T>(value); |
518 | 0 | flags_ = ValueAlternative<U>::Flags(At<U>()); |
519 | 0 | } else { |
520 | 0 | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { |
521 | 0 | SlowDestruct(); |
522 | 0 | } |
523 | 0 | index_ = ValueAlternative<U>::kIndex; |
524 | 0 | kind_ = ValueAlternative<U>::kKind; |
525 | 0 | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) |
526 | 0 | U(std::forward<T>(value))); |
527 | 0 | } |
528 | 0 | } |
529 | 12.7M | } Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::OpaqueValue const&>(cel::OpaqueValue const&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::OpaqueValue>(cel::OpaqueValue&&) void cel::common_internal::ValueVariant::Assign<cel::ErrorValue>(cel::ErrorValue&&) Line | Count | Source | 498 | 8.84M | void Assign(T&& value) { | 499 | 8.84M | using U = absl::remove_cvref_t<T>; | 500 | | | 501 | 8.84M | static_assert(alignof(U) <= kValueVariantAlign); | 502 | 8.84M | static_assert(sizeof(U) <= kValueVariantSize); | 503 | | | 504 | 8.84M | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 505 | 8.84M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 506 | 0 | SlowDestruct(); | 507 | 0 | } | 508 | 8.84M | index_ = ValueAlternative<U>::kIndex; | 509 | 8.84M | kind_ = ValueAlternative<U>::kKind; | 510 | 8.84M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 511 | 8.84M | U(std::forward<T>(value))); | 512 | | } else { | 513 | | // U is not always trivial. See if the current active alternative is U. If | 514 | | // it is, we can just do a simple assignment without having to destruct | 515 | | // first. Otherwise fallback to destruct and construct. | 516 | | if (index_ == ValueAlternative<U>::kIndex) { | 517 | | *At<U>() = std::forward<T>(value); | 518 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 519 | | } else { | 520 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 521 | | SlowDestruct(); | 522 | | } | 523 | | index_ = ValueAlternative<U>::kIndex; | 524 | | kind_ = ValueAlternative<U>::kKind; | 525 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 526 | | U(std::forward<T>(value))); | 527 | | } | 528 | | } | 529 | 8.84M | } |
void cel::common_internal::ValueVariant::Assign<cel::NullValue>(cel::NullValue&&) Line | Count | Source | 498 | 3.09M | void Assign(T&& value) { | 499 | 3.09M | using U = absl::remove_cvref_t<T>; | 500 | | | 501 | 3.09M | static_assert(alignof(U) <= kValueVariantAlign); | 502 | 3.09M | static_assert(sizeof(U) <= kValueVariantSize); | 503 | | | 504 | 3.09M | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 505 | 3.09M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 506 | 0 | SlowDestruct(); | 507 | 0 | } | 508 | 3.09M | index_ = ValueAlternative<U>::kIndex; | 509 | 3.09M | kind_ = ValueAlternative<U>::kKind; | 510 | 3.09M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 511 | 3.09M | U(std::forward<T>(value))); | 512 | | } else { | 513 | | // U is not always trivial. See if the current active alternative is U. If | 514 | | // it is, we can just do a simple assignment without having to destruct | 515 | | // first. Otherwise fallback to destruct and construct. | 516 | | if (index_ == ValueAlternative<U>::kIndex) { | 517 | | *At<U>() = std::forward<T>(value); | 518 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 519 | | } else { | 520 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 521 | | SlowDestruct(); | 522 | | } | 523 | | index_ = ValueAlternative<U>::kIndex; | 524 | | kind_ = ValueAlternative<U>::kKind; | 525 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 526 | | U(std::forward<T>(value))); | 527 | | } | 528 | | } | 529 | 3.09M | } |
Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::UnknownValue>(cel::UnknownValue&&) void cel::common_internal::ValueVariant::Assign<cel::BoolValue>(cel::BoolValue&&) Line | Count | Source | 498 | 359k | void Assign(T&& value) { | 499 | 359k | using U = absl::remove_cvref_t<T>; | 500 | | | 501 | 359k | static_assert(alignof(U) <= kValueVariantAlign); | 502 | 359k | static_assert(sizeof(U) <= kValueVariantSize); | 503 | | | 504 | 359k | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 505 | 359k | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 506 | 0 | SlowDestruct(); | 507 | 0 | } | 508 | 359k | index_ = ValueAlternative<U>::kIndex; | 509 | 359k | kind_ = ValueAlternative<U>::kKind; | 510 | 359k | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 511 | 359k | U(std::forward<T>(value))); | 512 | | } else { | 513 | | // U is not always trivial. See if the current active alternative is U. If | 514 | | // it is, we can just do a simple assignment without having to destruct | 515 | | // first. Otherwise fallback to destruct and construct. | 516 | | if (index_ == ValueAlternative<U>::kIndex) { | 517 | | *At<U>() = std::forward<T>(value); | 518 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 519 | | } else { | 520 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 521 | | SlowDestruct(); | 522 | | } | 523 | | index_ = ValueAlternative<U>::kIndex; | 524 | | kind_ = ValueAlternative<U>::kKind; | 525 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 526 | | U(std::forward<T>(value))); | 527 | | } | 528 | | } | 529 | 359k | } |
void cel::common_internal::ValueVariant::Assign<cel::IntValue>(cel::IntValue&&) Line | Count | Source | 498 | 17.9k | void Assign(T&& value) { | 499 | 17.9k | using U = absl::remove_cvref_t<T>; | 500 | | | 501 | 17.9k | static_assert(alignof(U) <= kValueVariantAlign); | 502 | 17.9k | static_assert(sizeof(U) <= kValueVariantSize); | 503 | | | 504 | 17.9k | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 505 | 17.9k | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 506 | 0 | SlowDestruct(); | 507 | 0 | } | 508 | 17.9k | index_ = ValueAlternative<U>::kIndex; | 509 | 17.9k | kind_ = ValueAlternative<U>::kKind; | 510 | 17.9k | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 511 | 17.9k | U(std::forward<T>(value))); | 512 | | } else { | 513 | | // U is not always trivial. See if the current active alternative is U. If | 514 | | // it is, we can just do a simple assignment without having to destruct | 515 | | // first. Otherwise fallback to destruct and construct. | 516 | | if (index_ == ValueAlternative<U>::kIndex) { | 517 | | *At<U>() = std::forward<T>(value); | 518 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 519 | | } else { | 520 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 521 | | SlowDestruct(); | 522 | | } | 523 | | index_ = ValueAlternative<U>::kIndex; | 524 | | kind_ = ValueAlternative<U>::kKind; | 525 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 526 | | U(std::forward<T>(value))); | 527 | | } | 528 | | } | 529 | 17.9k | } |
Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::DoubleValue>(cel::DoubleValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::UintValue>(cel::UintValue&&) void cel::common_internal::ValueVariant::Assign<cel::common_internal::LegacyStructValue>(cel::common_internal::LegacyStructValue&&) Line | Count | Source | 498 | 467k | void Assign(T&& value) { | 499 | 467k | using U = absl::remove_cvref_t<T>; | 500 | | | 501 | 467k | static_assert(alignof(U) <= kValueVariantAlign); | 502 | 467k | static_assert(sizeof(U) <= kValueVariantSize); | 503 | | | 504 | 467k | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 505 | 467k | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 506 | 0 | SlowDestruct(); | 507 | 0 | } | 508 | 467k | index_ = ValueAlternative<U>::kIndex; | 509 | 467k | kind_ = ValueAlternative<U>::kKind; | 510 | 467k | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 511 | 467k | U(std::forward<T>(value))); | 512 | | } else { | 513 | | // U is not always trivial. See if the current active alternative is U. If | 514 | | // it is, we can just do a simple assignment without having to destruct | 515 | | // first. Otherwise fallback to destruct and construct. | 516 | | if (index_ == ValueAlternative<U>::kIndex) { | 517 | | *At<U>() = std::forward<T>(value); | 518 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 519 | | } else { | 520 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 521 | | SlowDestruct(); | 522 | | } | 523 | | index_ = ValueAlternative<U>::kIndex; | 524 | | kind_ = ValueAlternative<U>::kKind; | 525 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 526 | | U(std::forward<T>(value))); | 527 | | } | 528 | | } | 529 | 467k | } |
Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::DurationValue>(cel::DurationValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::TimestampValue>(cel::TimestampValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::StringValue>(cel::StringValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::StringValue const&>(cel::StringValue const&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::BytesValue>(cel::BytesValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::TypeValue>(cel::TypeValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::CustomListValue>(cel::CustomListValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::CustomMapValue>(cel::CustomMapValue&&) |
530 | | |
531 | | template <typename T> |
532 | 99.6M | bool Is() const { |
533 | 99.6M | return index_ == ValueAlternative<T>::kIndex; |
534 | 99.6M | } bool cel::common_internal::ValueVariant::Is<cel::BoolValue>() const Line | Count | Source | 532 | 625k | bool Is() const { | 533 | 625k | return index_ == ValueAlternative<T>::kIndex; | 534 | 625k | } |
bool cel::common_internal::ValueVariant::Is<cel::BytesValue>() const Line | Count | Source | 532 | 11.9k | bool Is() const { | 533 | 11.9k | return index_ == ValueAlternative<T>::kIndex; | 534 | 11.9k | } |
bool cel::common_internal::ValueVariant::Is<cel::DoubleValue>() const Line | Count | Source | 532 | 638k | bool Is() const { | 533 | 638k | return index_ == ValueAlternative<T>::kIndex; | 534 | 638k | } |
bool cel::common_internal::ValueVariant::Is<cel::DurationValue>() const Line | Count | Source | 532 | 11.5k | bool Is() const { | 533 | 11.5k | return index_ == ValueAlternative<T>::kIndex; | 534 | 11.5k | } |
bool cel::common_internal::ValueVariant::Is<cel::ErrorValue>() const Line | Count | Source | 532 | 53.4M | bool Is() const { | 533 | 53.4M | return index_ == ValueAlternative<T>::kIndex; | 534 | 53.4M | } |
bool cel::common_internal::ValueVariant::Is<cel::IntValue>() const Line | Count | Source | 532 | 2.37M | bool Is() const { | 533 | 2.37M | return index_ == ValueAlternative<T>::kIndex; | 534 | 2.37M | } |
bool cel::common_internal::ValueVariant::Is<cel::common_internal::LegacyListValue>() const Line | Count | Source | 532 | 2.90M | bool Is() const { | 533 | 2.90M | return index_ == ValueAlternative<T>::kIndex; | 534 | 2.90M | } |
bool cel::common_internal::ValueVariant::Is<cel::CustomListValue>() const Line | Count | Source | 532 | 2.90M | bool Is() const { | 533 | 2.90M | return index_ == ValueAlternative<T>::kIndex; | 534 | 2.90M | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedRepeatedFieldValue>() const Line | Count | Source | 532 | 121k | bool Is() const { | 533 | 121k | return index_ == ValueAlternative<T>::kIndex; | 534 | 121k | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedJsonListValue>() const Line | Count | Source | 532 | 121k | bool Is() const { | 533 | 121k | return index_ == ValueAlternative<T>::kIndex; | 534 | 121k | } |
bool cel::common_internal::ValueVariant::Is<cel::common_internal::LegacyMapValue>() const Line | Count | Source | 532 | 1.80M | bool Is() const { | 533 | 1.80M | return index_ == ValueAlternative<T>::kIndex; | 534 | 1.80M | } |
bool cel::common_internal::ValueVariant::Is<cel::CustomMapValue>() const Line | Count | Source | 532 | 1.80M | bool Is() const { | 533 | 1.80M | return index_ == ValueAlternative<T>::kIndex; | 534 | 1.80M | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedMapFieldValue>() const Line | Count | Source | 532 | 1.35M | bool Is() const { | 533 | 1.35M | return index_ == ValueAlternative<T>::kIndex; | 534 | 1.35M | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedJsonMapValue>() const Line | Count | Source | 532 | 1.35M | bool Is() const { | 533 | 1.35M | return index_ == ValueAlternative<T>::kIndex; | 534 | 1.35M | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedMessageValue>() const Line | Count | Source | 532 | 2.37M | bool Is() const { | 533 | 2.37M | return index_ == ValueAlternative<T>::kIndex; | 534 | 2.37M | } |
bool cel::common_internal::ValueVariant::Is<cel::NullValue>() const Line | Count | Source | 532 | 6.04k | bool Is() const { | 533 | 6.04k | return index_ == ValueAlternative<T>::kIndex; | 534 | 6.04k | } |
Unexecuted instantiation: bool cel::common_internal::ValueVariant::Is<cel::OpaqueValue>() const bool cel::common_internal::ValueVariant::Is<cel::CustomStructValue>() const Line | Count | Source | 532 | 956k | bool Is() const { | 533 | 956k | return index_ == ValueAlternative<T>::kIndex; | 534 | 956k | } |
bool cel::common_internal::ValueVariant::Is<cel::StringValue>() const Line | Count | Source | 532 | 213k | bool Is() const { | 533 | 213k | return index_ == ValueAlternative<T>::kIndex; | 534 | 213k | } |
bool cel::common_internal::ValueVariant::Is<cel::common_internal::LegacyStructValue>() const Line | Count | Source | 532 | 2.26M | bool Is() const { | 533 | 2.26M | return index_ == ValueAlternative<T>::kIndex; | 534 | 2.26M | } |
bool cel::common_internal::ValueVariant::Is<cel::TimestampValue>() const Line | Count | Source | 532 | 6.32k | bool Is() const { | 533 | 6.32k | return index_ == ValueAlternative<T>::kIndex; | 534 | 6.32k | } |
bool cel::common_internal::ValueVariant::Is<cel::TypeValue>() const Line | Count | Source | 532 | 346 | bool Is() const { | 533 | 346 | return index_ == ValueAlternative<T>::kIndex; | 534 | 346 | } |
bool cel::common_internal::ValueVariant::Is<cel::UintValue>() const Line | Count | Source | 532 | 4.08M | bool Is() const { | 533 | 4.08M | return index_ == ValueAlternative<T>::kIndex; | 534 | 4.08M | } |
bool cel::common_internal::ValueVariant::Is<cel::UnknownValue>() const Line | Count | Source | 532 | 20.2M | bool Is() const { | 533 | 20.2M | return index_ == ValueAlternative<T>::kIndex; | 534 | 20.2M | } |
|
535 | | |
536 | | template <typename T> |
537 | | T& Get() & ABSL_ATTRIBUTE_LIFETIME_BOUND { |
538 | | ABSL_DCHECK(Is<T>()); |
539 | | |
540 | | return *At<T>(); |
541 | | } |
542 | | |
543 | | template <typename T> |
544 | 26.6M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { |
545 | 26.6M | ABSL_DCHECK(Is<T>()); |
546 | | |
547 | 26.6M | return *At<T>(); |
548 | 26.6M | } cel::BoolValue const& cel::common_internal::ValueVariant::Get<cel::BoolValue>() const & Line | Count | Source | 544 | 2.79M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 2.79M | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 2.79M | return *At<T>(); | 548 | 2.79M | } |
cel::NullValue const& cel::common_internal::ValueVariant::Get<cel::NullValue>() const & Line | Count | Source | 544 | 2.84k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 2.84k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 2.84k | return *At<T>(); | 548 | 2.84k | } |
cel::IntValue const& cel::common_internal::ValueVariant::Get<cel::IntValue>() const & Line | Count | Source | 544 | 17.0M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 17.0M | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 17.0M | return *At<T>(); | 548 | 17.0M | } |
cel::UintValue const& cel::common_internal::ValueVariant::Get<cel::UintValue>() const & Line | Count | Source | 544 | 4.04M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 4.04M | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 4.04M | return *At<T>(); | 548 | 4.04M | } |
cel::DoubleValue const& cel::common_internal::ValueVariant::Get<cel::DoubleValue>() const & Line | Count | Source | 544 | 930k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 930k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 930k | return *At<T>(); | 548 | 930k | } |
cel::DurationValue const& cel::common_internal::ValueVariant::Get<cel::DurationValue>() const & Line | Count | Source | 544 | 65.7k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 65.7k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 65.7k | return *At<T>(); | 548 | 65.7k | } |
cel::TimestampValue const& cel::common_internal::ValueVariant::Get<cel::TimestampValue>() const & Line | Count | Source | 544 | 11.9k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 11.9k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 11.9k | return *At<T>(); | 548 | 11.9k | } |
cel::TypeValue const& cel::common_internal::ValueVariant::Get<cel::TypeValue>() const & Line | Count | Source | 544 | 8.95k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 8.95k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 8.95k | return *At<T>(); | 548 | 8.95k | } |
Unexecuted instantiation: cel::common_internal::LegacyListValue const& cel::common_internal::ValueVariant::Get<cel::common_internal::LegacyListValue>() const & cel::ParsedJsonListValue const& cel::common_internal::ValueVariant::Get<cel::ParsedJsonListValue>() const & Line | Count | Source | 544 | 5.28k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 5.28k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 5.28k | return *At<T>(); | 548 | 5.28k | } |
Unexecuted instantiation: cel::ParsedRepeatedFieldValue const& cel::common_internal::ValueVariant::Get<cel::ParsedRepeatedFieldValue>() const & cel::CustomListValue const& cel::common_internal::ValueVariant::Get<cel::CustomListValue>() const & Line | Count | Source | 544 | 486k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 486k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 486k | return *At<T>(); | 548 | 486k | } |
Unexecuted instantiation: cel::common_internal::LegacyMapValue const& cel::common_internal::ValueVariant::Get<cel::common_internal::LegacyMapValue>() const & cel::ParsedJsonMapValue const& cel::common_internal::ValueVariant::Get<cel::ParsedJsonMapValue>() const & Line | Count | Source | 544 | 1.04k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 1.04k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 1.04k | return *At<T>(); | 548 | 1.04k | } |
Unexecuted instantiation: cel::ParsedMapFieldValue const& cel::common_internal::ValueVariant::Get<cel::ParsedMapFieldValue>() const & cel::CustomMapValue const& cel::common_internal::ValueVariant::Get<cel::CustomMapValue>() const & Line | Count | Source | 544 | 153k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 153k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 153k | return *At<T>(); | 548 | 153k | } |
cel::common_internal::LegacyStructValue const& cel::common_internal::ValueVariant::Get<cel::common_internal::LegacyStructValue>() const & Line | Count | Source | 544 | 87.2k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 87.2k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 87.2k | return *At<T>(); | 548 | 87.2k | } |
Unexecuted instantiation: cel::ParsedMessageValue const& cel::common_internal::ValueVariant::Get<cel::ParsedMessageValue>() const & Unexecuted instantiation: cel::CustomStructValue const& cel::common_internal::ValueVariant::Get<cel::CustomStructValue>() const & Unexecuted instantiation: cel::OpaqueValue const& cel::common_internal::ValueVariant::Get<cel::OpaqueValue>() const & cel::BytesValue const& cel::common_internal::ValueVariant::Get<cel::BytesValue>() const & Line | Count | Source | 544 | 21.2k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 21.2k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 21.2k | return *At<T>(); | 548 | 21.2k | } |
cel::StringValue const& cel::common_internal::ValueVariant::Get<cel::StringValue>() const & Line | Count | Source | 544 | 1.02M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 1.02M | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 1.02M | return *At<T>(); | 548 | 1.02M | } |
cel::ErrorValue const& cel::common_internal::ValueVariant::Get<cel::ErrorValue>() const & Line | Count | Source | 544 | 9.49k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 545 | 9.49k | ABSL_DCHECK(Is<T>()); | 546 | | | 547 | 9.49k | return *At<T>(); | 548 | 9.49k | } |
Unexecuted instantiation: cel::UnknownValue const& cel::common_internal::ValueVariant::Get<cel::UnknownValue>() const & |
549 | | |
550 | | template <typename T> |
551 | 0 | T&& Get() && ABSL_ATTRIBUTE_LIFETIME_BOUND { |
552 | 0 | ABSL_DCHECK(Is<T>()); |
553 | 0 |
|
554 | 0 | return std::move(*At<T>()); |
555 | 0 | } Unexecuted instantiation: cel::BytesValue&& cel::common_internal::ValueVariant::Get<cel::BytesValue>() && Unexecuted instantiation: cel::ErrorValue&& cel::common_internal::ValueVariant::Get<cel::ErrorValue>() && Unexecuted instantiation: cel::ParsedMessageValue&& cel::common_internal::ValueVariant::Get<cel::ParsedMessageValue>() && Unexecuted instantiation: cel::OpaqueValue&& cel::common_internal::ValueVariant::Get<cel::OpaqueValue>() && Unexecuted instantiation: cel::ParsedJsonListValue&& cel::common_internal::ValueVariant::Get<cel::ParsedJsonListValue>() && Unexecuted instantiation: cel::ParsedJsonMapValue&& cel::common_internal::ValueVariant::Get<cel::ParsedJsonMapValue>() && Unexecuted instantiation: cel::CustomListValue&& cel::common_internal::ValueVariant::Get<cel::CustomListValue>() && Unexecuted instantiation: cel::CustomMapValue&& cel::common_internal::ValueVariant::Get<cel::CustomMapValue>() && Unexecuted instantiation: cel::ParsedMapFieldValue&& cel::common_internal::ValueVariant::Get<cel::ParsedMapFieldValue>() && Unexecuted instantiation: cel::ParsedRepeatedFieldValue&& cel::common_internal::ValueVariant::Get<cel::ParsedRepeatedFieldValue>() && Unexecuted instantiation: cel::CustomStructValue&& cel::common_internal::ValueVariant::Get<cel::CustomStructValue>() && Unexecuted instantiation: cel::StringValue&& cel::common_internal::ValueVariant::Get<cel::StringValue>() && Unexecuted instantiation: cel::TypeValue&& cel::common_internal::ValueVariant::Get<cel::TypeValue>() && Unexecuted instantiation: cel::UnknownValue&& cel::common_internal::ValueVariant::Get<cel::UnknownValue>() && |
556 | | |
557 | | template <typename T> |
558 | | const T&& Get() const&& ABSL_ATTRIBUTE_LIFETIME_BOUND { |
559 | | ABSL_DCHECK(Is<T>()); |
560 | | |
561 | | return std::move(*At<T>()); |
562 | | } |
563 | | |
564 | | template <typename T> |
565 | 0 | T* absl_nullable As() ABSL_ATTRIBUTE_LIFETIME_BOUND { |
566 | 0 | if (Is<T>()) { |
567 | 0 | return At<T>(); |
568 | 0 | } |
569 | 0 | return nullptr; |
570 | 0 | } Unexecuted instantiation: cel::BytesValue* cel::common_internal::ValueVariant::As<cel::BytesValue>() Unexecuted instantiation: cel::ErrorValue* cel::common_internal::ValueVariant::As<cel::ErrorValue>() Unexecuted instantiation: cel::ParsedMessageValue* cel::common_internal::ValueVariant::As<cel::ParsedMessageValue>() Unexecuted instantiation: cel::OpaqueValue* cel::common_internal::ValueVariant::As<cel::OpaqueValue>() Unexecuted instantiation: cel::ParsedJsonListValue* cel::common_internal::ValueVariant::As<cel::ParsedJsonListValue>() Unexecuted instantiation: cel::ParsedJsonMapValue* cel::common_internal::ValueVariant::As<cel::ParsedJsonMapValue>() Unexecuted instantiation: cel::CustomListValue* cel::common_internal::ValueVariant::As<cel::CustomListValue>() Unexecuted instantiation: cel::CustomMapValue* cel::common_internal::ValueVariant::As<cel::CustomMapValue>() Unexecuted instantiation: cel::ParsedMapFieldValue* cel::common_internal::ValueVariant::As<cel::ParsedMapFieldValue>() Unexecuted instantiation: cel::ParsedRepeatedFieldValue* cel::common_internal::ValueVariant::As<cel::ParsedRepeatedFieldValue>() Unexecuted instantiation: cel::CustomStructValue* cel::common_internal::ValueVariant::As<cel::CustomStructValue>() Unexecuted instantiation: cel::StringValue* cel::common_internal::ValueVariant::As<cel::StringValue>() Unexecuted instantiation: cel::TypeValue* cel::common_internal::ValueVariant::As<cel::TypeValue>() Unexecuted instantiation: cel::UnknownValue* cel::common_internal::ValueVariant::As<cel::UnknownValue>() Unexecuted instantiation: cel::common_internal::LegacyListValue* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyListValue>() Unexecuted instantiation: cel::common_internal::LegacyMapValue* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyMapValue>() Unexecuted instantiation: cel::common_internal::LegacyStructValue* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyStructValue>() |
571 | | |
572 | | template <typename T> |
573 | 25.6M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { |
574 | 25.6M | if (Is<T>()) { |
575 | 3.45M | return At<T>(); |
576 | 3.45M | } |
577 | 22.1M | return nullptr; |
578 | 25.6M | } Unexecuted instantiation: cel::OpaqueValue const* cel::common_internal::ValueVariant::As<cel::OpaqueValue>() const cel::BoolValue const* cel::common_internal::ValueVariant::As<cel::BoolValue>() const Line | Count | Source | 573 | 296k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 296k | if (Is<T>()) { | 575 | 270k | return At<T>(); | 576 | 270k | } | 577 | 25.8k | return nullptr; | 578 | 296k | } |
cel::BytesValue const* cel::common_internal::ValueVariant::As<cel::BytesValue>() const Line | Count | Source | 573 | 1.13k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 1.13k | if (Is<T>()) { | 575 | 1.05k | return At<T>(); | 576 | 1.05k | } | 577 | 75 | return nullptr; | 578 | 1.13k | } |
cel::DoubleValue const* cel::common_internal::ValueVariant::As<cel::DoubleValue>() const Line | Count | Source | 573 | 214k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 214k | if (Is<T>()) { | 575 | 199k | return At<T>(); | 576 | 199k | } | 577 | 15.9k | return nullptr; | 578 | 214k | } |
cel::DurationValue const* cel::common_internal::ValueVariant::As<cel::DurationValue>() const Line | Count | Source | 573 | 432 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 432 | if (Is<T>()) { | 575 | 271 | return At<T>(); | 576 | 271 | } | 577 | 161 | return nullptr; | 578 | 432 | } |
cel::ErrorValue const* cel::common_internal::ValueVariant::As<cel::ErrorValue>() const Line | Count | Source | 573 | 9.76M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 9.76M | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 9.76M | return nullptr; | 578 | 9.76M | } |
cel::IntValue const* cel::common_internal::ValueVariant::As<cel::IntValue>() const Line | Count | Source | 573 | 43.4k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 43.4k | if (Is<T>()) { | 575 | 5.97k | return At<T>(); | 576 | 5.97k | } | 577 | 37.4k | return nullptr; | 578 | 43.4k | } |
cel::ParsedMessageValue const* cel::common_internal::ValueVariant::As<cel::ParsedMessageValue>() const Line | Count | Source | 573 | 496k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 496k | if (Is<T>()) { | 575 | 495k | return At<T>(); | 576 | 495k | } | 577 | 444 | return nullptr; | 578 | 496k | } |
Unexecuted instantiation: cel::NullValue const* cel::common_internal::ValueVariant::As<cel::NullValue>() const cel::ParsedJsonListValue const* cel::common_internal::ValueVariant::As<cel::ParsedJsonListValue>() const Line | Count | Source | 573 | 114k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 114k | if (Is<T>()) { | 575 | 111k | return At<T>(); | 576 | 111k | } | 577 | 2.28k | return nullptr; | 578 | 114k | } |
cel::ParsedJsonMapValue const* cel::common_internal::ValueVariant::As<cel::ParsedJsonMapValue>() const Line | Count | Source | 573 | 15.9k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 15.9k | if (Is<T>()) { | 575 | 9.91k | return At<T>(); | 576 | 9.91k | } | 577 | 6.08k | return nullptr; | 578 | 15.9k | } |
cel::CustomListValue const* cel::common_internal::ValueVariant::As<cel::CustomListValue>() const Line | Count | Source | 573 | 1.65M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 1.65M | if (Is<T>()) { | 575 | 1.53M | return At<T>(); | 576 | 1.53M | } | 577 | 111k | return nullptr; | 578 | 1.65M | } |
cel::CustomMapValue const* cel::common_internal::ValueVariant::As<cel::CustomMapValue>() const Line | Count | Source | 573 | 419k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 419k | if (Is<T>()) { | 575 | 403k | return At<T>(); | 576 | 403k | } | 577 | 15.4k | return nullptr; | 578 | 419k | } |
cel::ParsedMapFieldValue const* cel::common_internal::ValueVariant::As<cel::ParsedMapFieldValue>() const Line | Count | Source | 573 | 15.8k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 15.8k | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 15.8k | return nullptr; | 578 | 15.8k | } |
cel::ParsedRepeatedFieldValue const* cel::common_internal::ValueVariant::As<cel::ParsedRepeatedFieldValue>() const Line | Count | Source | 573 | 113k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 113k | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 113k | return nullptr; | 578 | 113k | } |
cel::CustomStructValue const* cel::common_internal::ValueVariant::As<cel::CustomStructValue>() const Line | Count | Source | 573 | 222 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 222 | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 222 | return nullptr; | 578 | 222 | } |
cel::StringValue const* cel::common_internal::ValueVariant::As<cel::StringValue>() const Line | Count | Source | 573 | 20.1k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 20.1k | if (Is<T>()) { | 575 | 4.12k | return At<T>(); | 576 | 4.12k | } | 577 | 15.9k | return nullptr; | 578 | 20.1k | } |
cel::TimestampValue const* cel::common_internal::ValueVariant::As<cel::TimestampValue>() const Line | Count | Source | 573 | 18 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 18 | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 18 | return nullptr; | 578 | 18 | } |
cel::TypeValue const* cel::common_internal::ValueVariant::As<cel::TypeValue>() const Line | Count | Source | 573 | 346 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 346 | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 346 | return nullptr; | 578 | 346 | } |
cel::UintValue const* cel::common_internal::ValueVariant::As<cel::UintValue>() const Line | Count | Source | 573 | 188k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 188k | if (Is<T>()) { | 575 | 7.15k | return At<T>(); | 576 | 7.15k | } | 577 | 180k | return nullptr; | 578 | 188k | } |
cel::UnknownValue const* cel::common_internal::ValueVariant::As<cel::UnknownValue>() const Line | Count | Source | 573 | 9.76M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 9.76M | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 9.76M | return nullptr; | 578 | 9.76M | } |
cel::common_internal::LegacyListValue const* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyListValue>() const Line | Count | Source | 573 | 1.65M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 1.65M | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 1.65M | return nullptr; | 578 | 1.65M | } |
cel::common_internal::LegacyMapValue const* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyMapValue>() const Line | Count | Source | 573 | 419k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 419k | if (Is<T>()) { | 575 | 0 | return At<T>(); | 576 | 0 | } | 577 | 419k | return nullptr; | 578 | 419k | } |
cel::common_internal::LegacyStructValue const* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyStructValue>() const Line | Count | Source | 573 | 407k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 574 | 407k | if (Is<T>()) { | 575 | 407k | return At<T>(); | 576 | 407k | } | 577 | 222 | return nullptr; | 578 | 407k | } |
|
579 | | |
580 | | template <typename Visitor> |
581 | | ABSL_ATTRIBUTE_ALWAYS_INLINE decltype(auto) Visit(Visitor&& visitor) & { |
582 | | return std::as_const(*this).Visit(std::forward<Visitor>(visitor)); |
583 | | } |
584 | | |
585 | | template <typename Visitor> |
586 | 16.8M | decltype(auto) Visit(Visitor&& visitor) const& { |
587 | 16.8M | switch (index_) { |
588 | 2.84k | case ValueIndex::kNull: |
589 | 2.84k | return std::forward<Visitor>(visitor)(Get<NullValue>()); |
590 | 882k | case ValueIndex::kBool: |
591 | 882k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); |
592 | 13.9M | case ValueIndex::kInt: |
593 | 13.9M | return std::forward<Visitor>(visitor)(Get<IntValue>()); |
594 | 462k | case ValueIndex::kUint: |
595 | 462k | return std::forward<Visitor>(visitor)(Get<UintValue>()); |
596 | 414k | case ValueIndex::kDouble: |
597 | 414k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); |
598 | 53.9k | case ValueIndex::kDuration: |
599 | 53.9k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); |
600 | 4.31k | case ValueIndex::kTimestamp: |
601 | 4.31k | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); |
602 | 5.43k | case ValueIndex::kType: |
603 | 5.43k | return std::forward<Visitor>(visitor)(Get<TypeValue>()); |
604 | 0 | case ValueIndex::kLegacyList: |
605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); |
606 | 5.28k | case ValueIndex::kParsedJsonList: |
607 | 5.28k | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); |
608 | 0 | case ValueIndex::kParsedRepeatedField: |
609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); |
610 | 486k | case ValueIndex::kCustomList: |
611 | 486k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); |
612 | 0 | case ValueIndex::kLegacyMap: |
613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); |
614 | 1.04k | case ValueIndex::kParsedJsonMap: |
615 | 1.04k | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); |
616 | 0 | case ValueIndex::kParsedMapField: |
617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); |
618 | 153k | case ValueIndex::kCustomMap: |
619 | 153k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); |
620 | 58.6k | case ValueIndex::kLegacyStruct: |
621 | 58.6k | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); |
622 | 0 | case ValueIndex::kParsedMessage: |
623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); |
624 | 0 | case ValueIndex::kCustomStruct: |
625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); |
626 | 0 | case ValueIndex::kOpaque: |
627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); |
628 | 8.93k | case ValueIndex::kBytes: |
629 | 8.93k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); |
630 | 374k | case ValueIndex::kString: |
631 | 374k | return std::forward<Visitor>(visitor)(Get<StringValue>()); |
632 | 0 | case ValueIndex::kError: |
633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); |
634 | 0 | case ValueIndex::kUnknown: |
635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); |
636 | 16.8M | } |
637 | 16.8M | } Unexecuted instantiation: decltype(auto) cel::common_internal::ValueVariant::Visit<cel::NativeTypeTraits<cel::Value, void>::Id(cel::Value const&)::{lambda(auto:1 const&)#1}>(cel::NativeTypeTraits<cel::Value, void>::Id(cel::Value const&)::{lambda(auto:1 const&)#1}&&) const &decltype(auto) cel::common_internal::ValueVariant::Visit<cel::ArenaTraits<cel::Value>::trivially_destructible(cel::Value const&)::{lambda(auto:1 const&)#1}>(cel::ArenaTraits<cel::Value>::trivially_destructible(cel::Value const&)::{lambda(auto:1 const&)#1}&&) const &Line | Count | Source | 586 | 10.1M | decltype(auto) Visit(Visitor&& visitor) const& { | 587 | 10.1M | switch (index_) { | 588 | 1.92k | case ValueIndex::kNull: | 589 | 1.92k | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 590 | 630k | case ValueIndex::kBool: | 591 | 630k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 592 | 8.32M | case ValueIndex::kInt: | 593 | 8.32M | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 594 | 254k | case ValueIndex::kUint: | 595 | 254k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 596 | 354k | case ValueIndex::kDouble: | 597 | 354k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 598 | 27.7k | case ValueIndex::kDuration: | 599 | 27.7k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 600 | 2.45k | case ValueIndex::kTimestamp: | 601 | 2.45k | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 602 | 4.49k | case ValueIndex::kType: | 603 | 4.49k | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 604 | 0 | case ValueIndex::kLegacyList: | 605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 606 | 2.64k | case ValueIndex::kParsedJsonList: | 607 | 2.64k | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 608 | 0 | case ValueIndex::kParsedRepeatedField: | 609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 610 | 57.2k | case ValueIndex::kCustomList: | 611 | 57.2k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 612 | 0 | case ValueIndex::kLegacyMap: | 613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 614 | 535 | case ValueIndex::kParsedJsonMap: | 615 | 535 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 616 | 0 | case ValueIndex::kParsedMapField: | 617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 618 | 114k | case ValueIndex::kCustomMap: | 619 | 114k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 620 | 29.3k | case ValueIndex::kLegacyStruct: | 621 | 29.3k | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 622 | 0 | case ValueIndex::kParsedMessage: | 623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 624 | 0 | case ValueIndex::kCustomStruct: | 625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 626 | 0 | case ValueIndex::kOpaque: | 627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 628 | 5.29k | case ValueIndex::kBytes: | 629 | 5.29k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 630 | 321k | case ValueIndex::kString: | 631 | 321k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 632 | 0 | case ValueIndex::kError: | 633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 634 | 0 | case ValueIndex::kUnknown: | 635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 636 | 10.1M | } | 637 | 10.1M | } |
value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::GetTypeName() const::$_0>(cel::Value::GetTypeName() const::$_0&&) const & Line | Count | Source | 586 | 29.5k | decltype(auto) Visit(Visitor&& visitor) const& { | 587 | 29.5k | switch (index_) { | 588 | 0 | case ValueIndex::kNull: | 589 | 0 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 590 | 872 | case ValueIndex::kBool: | 591 | 872 | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 592 | 327 | case ValueIndex::kInt: | 593 | 327 | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 594 | 3.62k | case ValueIndex::kUint: | 595 | 3.62k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 596 | 197 | case ValueIndex::kDouble: | 597 | 197 | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 598 | 0 | case ValueIndex::kDuration: | 599 | 0 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 600 | 0 | case ValueIndex::kTimestamp: | 601 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 602 | 581 | case ValueIndex::kType: | 603 | 581 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 604 | 0 | case ValueIndex::kLegacyList: | 605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 606 | 0 | case ValueIndex::kParsedJsonList: | 607 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 608 | 0 | case ValueIndex::kParsedRepeatedField: | 609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 610 | 23.7k | case ValueIndex::kCustomList: | 611 | 23.7k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 612 | 0 | case ValueIndex::kLegacyMap: | 613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 614 | 0 | case ValueIndex::kParsedJsonMap: | 615 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 616 | 0 | case ValueIndex::kParsedMapField: | 617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 618 | 0 | case ValueIndex::kCustomMap: | 619 | 0 | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 620 | 0 | case ValueIndex::kLegacyStruct: | 621 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 622 | 0 | case ValueIndex::kParsedMessage: | 623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 624 | 0 | case ValueIndex::kCustomStruct: | 625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 626 | 0 | case ValueIndex::kOpaque: | 627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 628 | 0 | case ValueIndex::kBytes: | 629 | 0 | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 630 | 196 | case ValueIndex::kString: | 631 | 196 | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 632 | 0 | case ValueIndex::kError: | 633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 634 | 0 | case ValueIndex::kUnknown: | 635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 636 | 29.5k | } | 637 | 29.5k | } |
value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::DebugString() const::$_0>(cel::Value::DebugString() const::$_0&&) const & Line | Count | Source | 586 | 332k | decltype(auto) Visit(Visitor&& visitor) const& { | 587 | 332k | switch (index_) { | 588 | 0 | case ValueIndex::kNull: | 589 | 0 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 590 | 491 | case ValueIndex::kBool: | 591 | 491 | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 592 | 254k | case ValueIndex::kInt: | 593 | 254k | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 594 | 465 | case ValueIndex::kUint: | 595 | 465 | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 596 | 29.9k | case ValueIndex::kDouble: | 597 | 29.9k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 598 | 0 | case ValueIndex::kDuration: | 599 | 0 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 600 | 0 | case ValueIndex::kTimestamp: | 601 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 602 | 0 | case ValueIndex::kType: | 603 | 0 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 604 | 0 | case ValueIndex::kLegacyList: | 605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 606 | 0 | case ValueIndex::kParsedJsonList: | 607 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 608 | 0 | case ValueIndex::kParsedRepeatedField: | 609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 610 | 0 | case ValueIndex::kCustomList: | 611 | 0 | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 612 | 0 | case ValueIndex::kLegacyMap: | 613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 614 | 0 | case ValueIndex::kParsedJsonMap: | 615 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 616 | 0 | case ValueIndex::kParsedMapField: | 617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 618 | 0 | case ValueIndex::kCustomMap: | 619 | 0 | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 620 | 0 | case ValueIndex::kLegacyStruct: | 621 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 622 | 0 | case ValueIndex::kParsedMessage: | 623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 624 | 0 | case ValueIndex::kCustomStruct: | 625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 626 | 0 | case ValueIndex::kOpaque: | 627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 628 | 0 | case ValueIndex::kBytes: | 629 | 0 | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 630 | 47.0k | case ValueIndex::kString: | 631 | 47.0k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 632 | 0 | case ValueIndex::kError: | 633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 634 | 0 | case ValueIndex::kUnknown: | 635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 636 | 332k | } | 637 | 332k | } |
Unexecuted instantiation: value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::SerializeTo(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::io::ZeroCopyOutputStream*) const::$_0>(cel::Value::SerializeTo(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::io::ZeroCopyOutputStream*) const::$_0&&) const & value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::ConvertToJson(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_0>(cel::Value::ConvertToJson(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_0&&) const & Line | Count | Source | 586 | 5.69M | decltype(auto) Visit(Visitor&& visitor) const& { | 587 | 5.69M | switch (index_) { | 588 | 666 | case ValueIndex::kNull: | 589 | 666 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 590 | 247k | case ValueIndex::kBool: | 591 | 247k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 592 | 5.33M | case ValueIndex::kInt: | 593 | 5.33M | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 594 | 28.7k | case ValueIndex::kUint: | 595 | 28.7k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 596 | 23.6k | case ValueIndex::kDouble: | 597 | 23.6k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 598 | 25.8k | case ValueIndex::kDuration: | 599 | 25.8k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 600 | 1.84k | case ValueIndex::kTimestamp: | 601 | 1.84k | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 602 | 16 | case ValueIndex::kType: | 603 | 16 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 604 | 0 | case ValueIndex::kLegacyList: | 605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 606 | 472 | case ValueIndex::kParsedJsonList: | 607 | 472 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 608 | 0 | case ValueIndex::kParsedRepeatedField: | 609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 610 | 1.92k | case ValueIndex::kCustomList: | 611 | 1.92k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 612 | 0 | case ValueIndex::kLegacyMap: | 613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 614 | 0 | case ValueIndex::kParsedJsonMap: | 615 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 616 | 0 | case ValueIndex::kParsedMapField: | 617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 618 | 27.6k | case ValueIndex::kCustomMap: | 619 | 27.6k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 620 | 539 | case ValueIndex::kLegacyStruct: | 621 | 539 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 622 | 0 | case ValueIndex::kParsedMessage: | 623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 624 | 0 | case ValueIndex::kCustomStruct: | 625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 626 | 0 | case ValueIndex::kOpaque: | 627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 628 | 2.50k | case ValueIndex::kBytes: | 629 | 2.50k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 630 | 2.53k | case ValueIndex::kString: | 631 | 2.53k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 632 | 0 | case ValueIndex::kError: | 633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 634 | 0 | case ValueIndex::kUnknown: | 635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 636 | 5.69M | } | 637 | 5.69M | } |
value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<absl::lts_20260526::Overload<cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_0, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_1, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_2, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_3, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_4, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_5> >(absl::lts_20260526::Overload<cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_0, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_1, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_2, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_3, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_4, cel::Value::ConvertToJsonArray(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_5>&&) const & Line | Count | Source | 586 | 401k | decltype(auto) Visit(Visitor&& visitor) const& { | 587 | 401k | switch (index_) { | 588 | 0 | case ValueIndex::kNull: | 589 | 0 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 590 | 1 | case ValueIndex::kBool: | 591 | 1 | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 592 | 5 | case ValueIndex::kInt: | 593 | 5 | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 594 | 1 | case ValueIndex::kUint: | 595 | 1 | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 596 | 1 | case ValueIndex::kDouble: | 597 | 1 | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 598 | 0 | case ValueIndex::kDuration: | 599 | 0 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 600 | 0 | case ValueIndex::kTimestamp: | 601 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 602 | 1 | case ValueIndex::kType: | 603 | 1 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 604 | 0 | case ValueIndex::kLegacyList: | 605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 606 | 0 | case ValueIndex::kParsedJsonList: | 607 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 608 | 0 | case ValueIndex::kParsedRepeatedField: | 609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 610 | 401k | case ValueIndex::kCustomList: | 611 | 401k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 612 | 0 | case ValueIndex::kLegacyMap: | 613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 614 | 0 | case ValueIndex::kParsedJsonMap: | 615 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 616 | 0 | case ValueIndex::kParsedMapField: | 617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 618 | 2 | case ValueIndex::kCustomMap: | 619 | 2 | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 620 | 0 | case ValueIndex::kLegacyStruct: | 621 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 622 | 0 | case ValueIndex::kParsedMessage: | 623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 624 | 0 | case ValueIndex::kCustomStruct: | 625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 626 | 0 | case ValueIndex::kOpaque: | 627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 628 | 0 | case ValueIndex::kBytes: | 629 | 0 | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 630 | 1 | case ValueIndex::kString: | 631 | 1 | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 632 | 0 | case ValueIndex::kError: | 633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 634 | 0 | case ValueIndex::kUnknown: | 635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 636 | 401k | } | 637 | 401k | } |
Unexecuted instantiation: value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<absl::lts_20260526::Overload<cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_0, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_1, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_2, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_3, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_4, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_5, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_6, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_7, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_8> >(absl::lts_20260526::Overload<cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_0, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_1, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_2, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_3, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_4, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_5, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_6, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_7, cel::Value::ConvertToJsonObject(google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Message*) const::$_8>&&) const & value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::Equal(cel::Value const&, google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Arena*, cel::Value*) const::$_0>(cel::Value::Equal(cel::Value const&, google::protobuf::DescriptorPool const*, google::protobuf::MessageFactory*, google::protobuf::Arena*, cel::Value*) const::$_0&&) const & Line | Count | Source | 586 | 270k | decltype(auto) Visit(Visitor&& visitor) const& { | 587 | 270k | switch (index_) { | 588 | 256 | case ValueIndex::kNull: | 589 | 256 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 590 | 2.44k | case ValueIndex::kBool: | 591 | 2.44k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 592 | 36.9k | case ValueIndex::kInt: | 593 | 36.9k | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 594 | 175k | case ValueIndex::kUint: | 595 | 175k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 596 | 5.26k | case ValueIndex::kDouble: | 597 | 5.26k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 598 | 432 | case ValueIndex::kDuration: | 599 | 432 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 600 | 18 | case ValueIndex::kTimestamp: | 601 | 18 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 602 | 346 | case ValueIndex::kType: | 603 | 346 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 604 | 0 | case ValueIndex::kLegacyList: | 605 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 606 | 2.17k | case ValueIndex::kParsedJsonList: | 607 | 2.17k | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 608 | 0 | case ValueIndex::kParsedRepeatedField: | 609 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 610 | 2.49k | case ValueIndex::kCustomList: | 611 | 2.49k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 612 | 0 | case ValueIndex::kLegacyMap: | 613 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 614 | 511 | case ValueIndex::kParsedJsonMap: | 615 | 511 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 616 | 0 | case ValueIndex::kParsedMapField: | 617 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 618 | 11.3k | case ValueIndex::kCustomMap: | 619 | 11.3k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 620 | 28.7k | case ValueIndex::kLegacyStruct: | 621 | 28.7k | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 622 | 0 | case ValueIndex::kParsedMessage: | 623 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 624 | 0 | case ValueIndex::kCustomStruct: | 625 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 626 | 0 | case ValueIndex::kOpaque: | 627 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 628 | 1.13k | case ValueIndex::kBytes: | 629 | 1.13k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 630 | 2.89k | case ValueIndex::kString: | 631 | 2.89k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 632 | 0 | case ValueIndex::kError: | 633 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 634 | 0 | case ValueIndex::kUnknown: | 635 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 636 | 270k | } | 637 | 270k | } |
Unexecuted instantiation: value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::IsZeroValue() const::$_0>(cel::Value::IsZeroValue() const::$_0&&) const & Unexecuted instantiation: value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::Clone(google::protobuf::Arena*) const::$_0>(cel::Value::Clone(google::protobuf::Arena*) const::$_0&&) const & Unexecuted instantiation: value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, cel::Value const&)::$_0>(cel::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, cel::Value const&)::$_0&&) const & |
638 | | |
639 | | template <typename Visitor> |
640 | | decltype(auto) Visit(Visitor&& visitor) && { |
641 | | switch (index_) { |
642 | | case ValueIndex::kNull: |
643 | | return std::forward<Visitor>(visitor)( |
644 | | std::move(*this).Get<NullValue>()); |
645 | | case ValueIndex::kBool: |
646 | | return std::forward<Visitor>(visitor)( |
647 | | std::move(*this).Get<BoolValue>()); |
648 | | case ValueIndex::kInt: |
649 | | return std::forward<Visitor>(visitor)(std::move(*this).Get<IntValue>()); |
650 | | case ValueIndex::kUint: |
651 | | return std::forward<Visitor>(visitor)( |
652 | | std::move(*this).Get<UintValue>()); |
653 | | case ValueIndex::kDouble: |
654 | | return std::forward<Visitor>(visitor)( |
655 | | std::move(*this).Get<DoubleValue>()); |
656 | | case ValueIndex::kDuration: |
657 | | return std::forward<Visitor>(visitor)( |
658 | | std::move(*this).Get<DurationValue>()); |
659 | | case ValueIndex::kTimestamp: |
660 | | return std::forward<Visitor>(visitor)( |
661 | | std::move(*this).Get<TimestampValue>()); |
662 | | case ValueIndex::kType: |
663 | | return std::forward<Visitor>(visitor)( |
664 | | std::move(*this).Get<TypeValue>()); |
665 | | case ValueIndex::kLegacyList: |
666 | | return std::forward<Visitor>(visitor)( |
667 | | std::move(*this).Get<LegacyListValue>()); |
668 | | case ValueIndex::kParsedJsonList: |
669 | | return std::forward<Visitor>(visitor)( |
670 | | std::move(*this).Get<ParsedJsonListValue>()); |
671 | | case ValueIndex::kParsedRepeatedField: |
672 | | return std::forward<Visitor>(visitor)( |
673 | | std::move(*this).Get<ParsedRepeatedFieldValue>()); |
674 | | case ValueIndex::kCustomList: |
675 | | return std::forward<Visitor>(visitor)( |
676 | | std::move(*this).Get<CustomListValue>()); |
677 | | case ValueIndex::kLegacyMap: |
678 | | return std::forward<Visitor>(visitor)( |
679 | | std::move(*this).Get<LegacyMapValue>()); |
680 | | case ValueIndex::kParsedJsonMap: |
681 | | return std::forward<Visitor>(visitor)( |
682 | | std::move(*this).Get<ParsedJsonMapValue>()); |
683 | | case ValueIndex::kParsedMapField: |
684 | | return std::forward<Visitor>(visitor)( |
685 | | std::move(*this).Get<ParsedMapFieldValue>()); |
686 | | case ValueIndex::kCustomMap: |
687 | | return std::forward<Visitor>(visitor)( |
688 | | std::move(*this).Get<CustomMapValue>()); |
689 | | case ValueIndex::kLegacyStruct: |
690 | | return std::forward<Visitor>(visitor)( |
691 | | std::move(*this).Get<LegacyStructValue>()); |
692 | | case ValueIndex::kParsedMessage: |
693 | | return std::forward<Visitor>(visitor)( |
694 | | std::move(*this).Get<ParsedMessageValue>()); |
695 | | case ValueIndex::kCustomStruct: |
696 | | return std::forward<Visitor>(visitor)( |
697 | | std::move(*this).Get<CustomStructValue>()); |
698 | | case ValueIndex::kOpaque: |
699 | | return std::forward<Visitor>(visitor)( |
700 | | std::move(*this).Get<OpaqueValue>()); |
701 | | case ValueIndex::kBytes: |
702 | | return std::forward<Visitor>(visitor)( |
703 | | std::move(*this).Get<BytesValue>()); |
704 | | case ValueIndex::kString: |
705 | | return std::forward<Visitor>(visitor)( |
706 | | std::move(*this).Get<StringValue>()); |
707 | | case ValueIndex::kError: |
708 | | return std::forward<Visitor>(visitor)( |
709 | | std::move(*this).Get<ErrorValue>()); |
710 | | case ValueIndex::kUnknown: |
711 | | return std::forward<Visitor>(visitor)( |
712 | | std::move(*this).Get<UnknownValue>()); |
713 | | } |
714 | | } |
715 | | |
716 | | template <typename Visitor> |
717 | | ABSL_ATTRIBUTE_ALWAYS_INLINE decltype(auto) Visit(Visitor&& visitor) const&& { |
718 | | return Visit(std::forward<Visitor>(visitor)); |
719 | | } |
720 | | |
721 | 280k | friend void swap(ValueVariant& lhs, ValueVariant& rhs) noexcept { |
722 | 280k | if (&lhs != &rhs) { |
723 | 280k | const bool lhs_trivial = |
724 | 280k | (lhs.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
725 | 280k | const bool rhs_trivial = |
726 | 280k | (rhs.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
727 | 280k | if (lhs_trivial && rhs_trivial) { |
728 | | // We validated the instances can be copied byte-wise at runtime, but compilers |
729 | | // warn since this is not safe in the general case. |
730 | | #if defined(__GNUC__) && !defined(__clang__) |
731 | | #pragma GCC diagnostic push |
732 | | #pragma GCC diagnostic ignored "-Wclass-memaccess" |
733 | | #elif defined(__clang__) && __clang_major__ >= 20 |
734 | | #pragma clang diagnostic push |
735 | 280k | #pragma clang diagnostic ignored "-Wnontrivial-memcall" |
736 | 280k | #endif |
737 | 280k | alignas(ValueVariant) std::byte tmp[sizeof(ValueVariant)]; |
738 | | // NOLINTNEXTLINE(bugprone-undefined-memory-manipulation) |
739 | 280k | std::memcpy(tmp, std::addressof(lhs), sizeof(ValueVariant)); |
740 | | // NOLINTNEXTLINE(bugprone-undefined-memory-manipulation) |
741 | 280k | std::memcpy(std::addressof(lhs), std::addressof(rhs), |
742 | 280k | sizeof(ValueVariant)); |
743 | | // NOLINTNEXTLINE(bugprone-undefined-memory-manipulation) |
744 | 280k | std::memcpy(std::addressof(rhs), tmp, sizeof(ValueVariant)); |
745 | | #if defined(__GNUC__) && !defined(__clang__) |
746 | | #pragma GCC diagnostic pop |
747 | | #elif defined(__clang__) && __clang_major__ >= 20 |
748 | | #pragma clang diagnostic pop |
749 | 280k | #endif |
750 | 280k | } else { |
751 | 0 | SlowSwap(lhs, rhs, lhs_trivial, rhs_trivial); |
752 | 0 | } |
753 | 280k | } |
754 | 280k | } |
755 | | |
756 | | private: |
757 | | friend struct cel::ArenaTraits<ValueVariant>; |
758 | | |
759 | | template <typename T> |
760 | | ABSL_ATTRIBUTE_ALWAYS_INLINE T* absl_nonnull At() |
761 | 0 | ABSL_ATTRIBUTE_LIFETIME_BOUND { |
762 | 0 | static_assert(alignof(T) <= kValueVariantAlign); |
763 | 0 | static_assert(sizeof(T) <= kValueVariantSize); |
764 | |
|
765 | 0 | return std::launder(reinterpret_cast<T*>(&raw_[0])); |
766 | 0 | } Unexecuted instantiation: cel::BytesValue* cel::common_internal::ValueVariant::At<cel::BytesValue>() Unexecuted instantiation: cel::ErrorValue* cel::common_internal::ValueVariant::At<cel::ErrorValue>() Unexecuted instantiation: cel::ParsedMessageValue* cel::common_internal::ValueVariant::At<cel::ParsedMessageValue>() Unexecuted instantiation: cel::OpaqueValue* cel::common_internal::ValueVariant::At<cel::OpaqueValue>() Unexecuted instantiation: cel::ParsedJsonListValue* cel::common_internal::ValueVariant::At<cel::ParsedJsonListValue>() Unexecuted instantiation: cel::ParsedJsonMapValue* cel::common_internal::ValueVariant::At<cel::ParsedJsonMapValue>() Unexecuted instantiation: cel::CustomListValue* cel::common_internal::ValueVariant::At<cel::CustomListValue>() Unexecuted instantiation: cel::CustomMapValue* cel::common_internal::ValueVariant::At<cel::CustomMapValue>() Unexecuted instantiation: cel::ParsedMapFieldValue* cel::common_internal::ValueVariant::At<cel::ParsedMapFieldValue>() Unexecuted instantiation: cel::ParsedRepeatedFieldValue* cel::common_internal::ValueVariant::At<cel::ParsedRepeatedFieldValue>() Unexecuted instantiation: cel::CustomStructValue* cel::common_internal::ValueVariant::At<cel::CustomStructValue>() Unexecuted instantiation: cel::StringValue* cel::common_internal::ValueVariant::At<cel::StringValue>() Unexecuted instantiation: cel::TypeValue* cel::common_internal::ValueVariant::At<cel::TypeValue>() Unexecuted instantiation: cel::UnknownValue* cel::common_internal::ValueVariant::At<cel::UnknownValue>() Unexecuted instantiation: cel::common_internal::LegacyListValue* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyListValue>() Unexecuted instantiation: cel::common_internal::LegacyMapValue* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyMapValue>() Unexecuted instantiation: cel::common_internal::LegacyStructValue* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyStructValue>() |
767 | | |
768 | | template <typename T> |
769 | | ABSL_ATTRIBUTE_ALWAYS_INLINE const T* absl_nonnull At() const |
770 | 30.1M | ABSL_ATTRIBUTE_LIFETIME_BOUND { |
771 | 30.1M | static_assert(alignof(T) <= kValueVariantAlign); |
772 | 30.1M | static_assert(sizeof(T) <= kValueVariantSize); |
773 | | |
774 | 30.1M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); |
775 | 30.1M | } Unexecuted instantiation: cel::OpaqueValue const* cel::common_internal::ValueVariant::At<cel::OpaqueValue>() const cel::BoolValue const* cel::common_internal::ValueVariant::At<cel::BoolValue>() const Line | Count | Source | 770 | 3.06M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 3.06M | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 3.06M | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 3.06M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 3.06M | } |
cel::NullValue const* cel::common_internal::ValueVariant::At<cel::NullValue>() const Line | Count | Source | 770 | 2.84k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 2.84k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 2.84k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 2.84k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 2.84k | } |
cel::IntValue const* cel::common_internal::ValueVariant::At<cel::IntValue>() const Line | Count | Source | 770 | 17.0M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 17.0M | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 17.0M | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 17.0M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 17.0M | } |
cel::UintValue const* cel::common_internal::ValueVariant::At<cel::UintValue>() const Line | Count | Source | 770 | 4.04M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 4.04M | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 4.04M | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 4.04M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 4.04M | } |
cel::DoubleValue const* cel::common_internal::ValueVariant::At<cel::DoubleValue>() const Line | Count | Source | 770 | 1.12M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 1.12M | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 1.12M | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 1.12M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 1.12M | } |
cel::DurationValue const* cel::common_internal::ValueVariant::At<cel::DurationValue>() const Line | Count | Source | 770 | 66.0k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 66.0k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 66.0k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 66.0k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 66.0k | } |
cel::TimestampValue const* cel::common_internal::ValueVariant::At<cel::TimestampValue>() const Line | Count | Source | 770 | 11.9k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 11.9k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 11.9k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 11.9k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 11.9k | } |
cel::TypeValue const* cel::common_internal::ValueVariant::At<cel::TypeValue>() const Line | Count | Source | 770 | 8.95k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 8.95k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 8.95k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 8.95k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 8.95k | } |
Unexecuted instantiation: cel::common_internal::LegacyListValue const* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyListValue>() const cel::ParsedJsonListValue const* cel::common_internal::ValueVariant::At<cel::ParsedJsonListValue>() const Line | Count | Source | 770 | 117k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 117k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 117k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 117k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 117k | } |
Unexecuted instantiation: cel::ParsedRepeatedFieldValue const* cel::common_internal::ValueVariant::At<cel::ParsedRepeatedFieldValue>() const cel::CustomListValue const* cel::common_internal::ValueVariant::At<cel::CustomListValue>() const Line | Count | Source | 770 | 2.02M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 2.02M | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 2.02M | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 2.02M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 2.02M | } |
Unexecuted instantiation: cel::common_internal::LegacyMapValue const* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyMapValue>() const cel::ParsedJsonMapValue const* cel::common_internal::ValueVariant::At<cel::ParsedJsonMapValue>() const Line | Count | Source | 770 | 10.9k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 10.9k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 10.9k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 10.9k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 10.9k | } |
Unexecuted instantiation: cel::ParsedMapFieldValue const* cel::common_internal::ValueVariant::At<cel::ParsedMapFieldValue>() const cel::CustomMapValue const* cel::common_internal::ValueVariant::At<cel::CustomMapValue>() const Line | Count | Source | 770 | 556k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 556k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 556k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 556k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 556k | } |
cel::common_internal::LegacyStructValue const* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyStructValue>() const Line | Count | Source | 770 | 494k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 494k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 494k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 494k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 494k | } |
cel::ParsedMessageValue const* cel::common_internal::ValueVariant::At<cel::ParsedMessageValue>() const Line | Count | Source | 770 | 495k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 495k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 495k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 495k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 495k | } |
Unexecuted instantiation: cel::CustomStructValue const* cel::common_internal::ValueVariant::At<cel::CustomStructValue>() const cel::BytesValue const* cel::common_internal::ValueVariant::At<cel::BytesValue>() const Line | Count | Source | 770 | 22.2k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 22.2k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 22.2k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 22.2k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 22.2k | } |
cel::StringValue const* cel::common_internal::ValueVariant::At<cel::StringValue>() const Line | Count | Source | 770 | 1.02M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 1.02M | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 1.02M | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 1.02M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 1.02M | } |
cel::ErrorValue const* cel::common_internal::ValueVariant::At<cel::ErrorValue>() const Line | Count | Source | 770 | 9.49k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 771 | 9.49k | static_assert(alignof(T) <= kValueVariantAlign); | 772 | 9.49k | static_assert(sizeof(T) <= kValueVariantSize); | 773 | | | 774 | 9.49k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 775 | 9.49k | } |
Unexecuted instantiation: cel::UnknownValue const* cel::common_internal::ValueVariant::At<cel::UnknownValue>() const |
776 | | |
777 | | ABSL_ATTRIBUTE_ALWAYS_INLINE void FastCopyAssign( |
778 | 34.9M | const ValueVariant& other) noexcept { |
779 | 34.9M | index_ = other.index_; |
780 | 34.9M | kind_ = other.kind_; |
781 | 34.9M | flags_ = other.flags_; |
782 | 34.9M | std::memcpy(raw_, other.raw_, sizeof(raw_)); |
783 | 34.9M | } |
784 | | |
785 | | ABSL_ATTRIBUTE_ALWAYS_INLINE void FastMoveAssign( |
786 | 29.8M | ValueVariant& other) noexcept { |
787 | 29.8M | FastCopyAssign(other); |
788 | 29.8M | } |
789 | | |
790 | | void SlowCopyConstruct(const ValueVariant& other) noexcept; |
791 | | |
792 | | void SlowMoveConstruct(ValueVariant& other) noexcept; |
793 | | |
794 | | void SlowDestruct() noexcept; |
795 | | |
796 | | void SlowCopyAssign(const ValueVariant& other, bool trivial, |
797 | | bool other_trivial) noexcept; |
798 | | |
799 | | void SlowMoveAssign(ValueVariant& other, bool ntrivial, |
800 | | bool other_trivial) noexcept; |
801 | | |
802 | | static void SlowSwap(ValueVariant& lhs, ValueVariant& rhs, bool lhs_trivial, |
803 | | bool rhs_trivial) noexcept; |
804 | | |
805 | | ValueIndex index_ = ValueIndex::kNull; |
806 | | ValueKind kind_ = ValueKind::kNull; |
807 | | ValueFlags flags_ = ValueFlags::kNone; |
808 | | alignas(kValueVariantAlign) std::byte raw_[kValueVariantSize]; |
809 | | }; |
810 | | |
811 | | } // namespace common_internal |
812 | | |
813 | | template <> |
814 | | struct ArenaTraits<common_internal::ValueVariant> { |
815 | | static bool trivially_destructible( |
816 | 0 | const common_internal::ValueVariant& value) { |
817 | 0 | return (value.flags_ & common_internal::ValueFlags::kNonTrivial) == |
818 | 0 | common_internal::ValueFlags::kNone; |
819 | 0 | } |
820 | | }; |
821 | | |
822 | | } // namespace cel |
823 | | |
824 | | #endif // THIRD_PARTY_CEL_CPP_COMMON_VALUES_VALUE_VARIANT_H_ |