/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 | | |
90 | | // Keep non-trivial alternatives together to aid in compiling optimizations. |
91 | | kBytes, |
92 | | kString, |
93 | | kError, |
94 | | kUnknown, |
95 | | }; |
96 | | |
97 | | // Used by ValueVariant to indicate pre-computed behaviors. |
98 | | enum class ValueFlags : uint32_t { |
99 | | kNone = 0, |
100 | | kNonTrivial = 1, |
101 | | }; |
102 | | |
103 | | ABSL_ATTRIBUTE_ALWAYS_INLINE inline constexpr ValueFlags operator&( |
104 | 300M | ValueFlags lhs, ValueFlags rhs) { |
105 | 300M | return static_cast<ValueFlags>( |
106 | 300M | static_cast<std::underlying_type_t<ValueFlags>>(lhs) & |
107 | 300M | static_cast<std::underlying_type_t<ValueFlags>>(rhs)); |
108 | 300M | } |
109 | | |
110 | | // Traits specialized by each alternative. |
111 | | // |
112 | | // ValueIndex ValueAlternative<T>::kIndex |
113 | | // |
114 | | // Indicates the alternative index corresponding to T. |
115 | | // |
116 | | // ValueKind ValueAlternative<T>::kKind |
117 | | // |
118 | | // Indicatates the kind corresponding to T. |
119 | | // |
120 | | // bool ValueAlternative<T>::kAlwaysTrivial |
121 | | // |
122 | | // True if T is trivially_copyable, false otherwise. |
123 | | // |
124 | | // ValueFlags ValueAlternative<T>::Flags(const T* absl_nonnull ) |
125 | | // |
126 | | // Returns the flags for the corresponding instance of T. |
127 | | template <typename T> |
128 | | struct ValueAlternative; |
129 | | |
130 | | template <> |
131 | | struct ValueAlternative<NullValue> { |
132 | | static constexpr ValueIndex kIndex = ValueIndex::kNull; |
133 | | static constexpr ValueKind kKind = NullValue::kKind; |
134 | | static constexpr bool kAlwaysTrivial = true; |
135 | | |
136 | 2.68M | static constexpr ValueFlags Flags(const NullValue* absl_nonnull) { |
137 | 2.68M | return ValueFlags::kNone; |
138 | 2.68M | } |
139 | | }; |
140 | | |
141 | | template <> |
142 | | struct ValueAlternative<BoolValue> { |
143 | | static constexpr ValueIndex kIndex = ValueIndex::kBool; |
144 | | static constexpr ValueKind kKind = BoolValue::kKind; |
145 | | static constexpr bool kAlwaysTrivial = true; |
146 | | |
147 | 1.24M | static constexpr ValueFlags Flags(const BoolValue* absl_nonnull) { |
148 | 1.24M | return ValueFlags::kNone; |
149 | 1.24M | } |
150 | | }; |
151 | | |
152 | | template <> |
153 | | struct ValueAlternative<IntValue> { |
154 | | static constexpr ValueIndex kIndex = ValueIndex::kInt; |
155 | | static constexpr ValueKind kKind = IntValue::kKind; |
156 | | static constexpr bool kAlwaysTrivial = true; |
157 | | |
158 | 1.16M | static constexpr ValueFlags Flags(const IntValue* absl_nonnull) { |
159 | 1.16M | return ValueFlags::kNone; |
160 | 1.16M | } |
161 | | }; |
162 | | |
163 | | template <> |
164 | | struct ValueAlternative<UintValue> { |
165 | | static constexpr ValueIndex kIndex = ValueIndex::kUint; |
166 | | static constexpr ValueKind kKind = UintValue::kKind; |
167 | | static constexpr bool kAlwaysTrivial = true; |
168 | | |
169 | 369k | static constexpr ValueFlags Flags(const UintValue* absl_nonnull) { |
170 | 369k | return ValueFlags::kNone; |
171 | 369k | } |
172 | | }; |
173 | | |
174 | | template <> |
175 | | struct ValueAlternative<DoubleValue> { |
176 | | static constexpr ValueIndex kIndex = ValueIndex::kDouble; |
177 | | static constexpr ValueKind kKind = DoubleValue::kKind; |
178 | | static constexpr bool kAlwaysTrivial = true; |
179 | | |
180 | 110k | static constexpr ValueFlags Flags(const DoubleValue* absl_nonnull) { |
181 | 110k | return ValueFlags::kNone; |
182 | 110k | } |
183 | | }; |
184 | | |
185 | | template <> |
186 | | struct ValueAlternative<DurationValue> { |
187 | | static constexpr ValueIndex kIndex = ValueIndex::kDuration; |
188 | | static constexpr ValueKind kKind = DurationValue::kKind; |
189 | | static constexpr bool kAlwaysTrivial = true; |
190 | | |
191 | 52.3k | static constexpr ValueFlags Flags(const DurationValue* absl_nonnull) { |
192 | 52.3k | return ValueFlags::kNone; |
193 | 52.3k | } |
194 | | }; |
195 | | |
196 | | template <> |
197 | | struct ValueAlternative<TimestampValue> { |
198 | | static constexpr ValueIndex kIndex = ValueIndex::kTimestamp; |
199 | | static constexpr ValueKind kKind = TimestampValue::kKind; |
200 | | static constexpr bool kAlwaysTrivial = true; |
201 | | |
202 | 15.4k | static constexpr ValueFlags Flags(const TimestampValue* absl_nonnull) { |
203 | 15.4k | return ValueFlags::kNone; |
204 | 15.4k | } |
205 | | }; |
206 | | |
207 | | template <> |
208 | | struct ValueAlternative<TypeValue> { |
209 | | static constexpr ValueIndex kIndex = ValueIndex::kType; |
210 | | static constexpr ValueKind kKind = TypeValue::kKind; |
211 | | static constexpr bool kAlwaysTrivial = true; |
212 | | |
213 | 6.48k | static constexpr ValueFlags Flags(const TypeValue* absl_nonnull) { |
214 | 6.48k | return ValueFlags::kNone; |
215 | 6.48k | } |
216 | | }; |
217 | | |
218 | | template <> |
219 | | struct ValueAlternative<LegacyListValue> { |
220 | | static constexpr ValueIndex kIndex = ValueIndex::kLegacyList; |
221 | | static constexpr ValueKind kKind = LegacyListValue::kKind; |
222 | | static constexpr bool kAlwaysTrivial = true; |
223 | | |
224 | 0 | static constexpr ValueFlags Flags(const LegacyListValue* absl_nonnull) { |
225 | 0 | return ValueFlags::kNone; |
226 | 0 | } |
227 | | }; |
228 | | |
229 | | template <> |
230 | | struct ValueAlternative<ParsedJsonListValue> { |
231 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedJsonList; |
232 | | static constexpr ValueKind kKind = ParsedJsonListValue::kKind; |
233 | | static constexpr bool kAlwaysTrivial = true; |
234 | | |
235 | 369k | static constexpr ValueFlags Flags(const ParsedJsonListValue* absl_nonnull) { |
236 | 369k | return ValueFlags::kNone; |
237 | 369k | } |
238 | | }; |
239 | | |
240 | | template <> |
241 | | struct ValueAlternative<ParsedRepeatedFieldValue> { |
242 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedRepeatedField; |
243 | | static constexpr ValueKind kKind = ParsedRepeatedFieldValue::kKind; |
244 | | static constexpr bool kAlwaysTrivial = true; |
245 | | |
246 | | static constexpr ValueFlags Flags( |
247 | 0 | const ParsedRepeatedFieldValue* absl_nonnull) { |
248 | 0 | return ValueFlags::kNone; |
249 | 0 | } |
250 | | }; |
251 | | |
252 | | template <> |
253 | | struct ValueAlternative<CustomListValue> { |
254 | | static constexpr ValueIndex kIndex = ValueIndex::kCustomList; |
255 | | static constexpr ValueKind kKind = CustomListValue::kKind; |
256 | | static constexpr bool kAlwaysTrivial = true; |
257 | | |
258 | 3.46M | static constexpr ValueFlags Flags(const CustomListValue* absl_nonnull) { |
259 | 3.46M | return ValueFlags::kNone; |
260 | 3.46M | } |
261 | | }; |
262 | | |
263 | | template <> |
264 | | struct ValueAlternative<LegacyMapValue> { |
265 | | static constexpr ValueIndex kIndex = ValueIndex::kLegacyMap; |
266 | | static constexpr ValueKind kKind = LegacyMapValue::kKind; |
267 | | static constexpr bool kAlwaysTrivial = true; |
268 | | |
269 | 0 | static constexpr ValueFlags Flags(const LegacyMapValue* absl_nonnull) { |
270 | 0 | return ValueFlags::kNone; |
271 | 0 | } |
272 | | }; |
273 | | |
274 | | template <> |
275 | | struct ValueAlternative<ParsedJsonMapValue> { |
276 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedJsonMap; |
277 | | static constexpr ValueKind kKind = ParsedJsonMapValue::kKind; |
278 | | static constexpr bool kAlwaysTrivial = true; |
279 | | |
280 | 4.07k | static constexpr ValueFlags Flags(const ParsedJsonMapValue* absl_nonnull) { |
281 | 4.07k | return ValueFlags::kNone; |
282 | 4.07k | } |
283 | | }; |
284 | | |
285 | | template <> |
286 | | struct ValueAlternative<ParsedMapFieldValue> { |
287 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedMapField; |
288 | | static constexpr ValueKind kKind = ParsedMapFieldValue::kKind; |
289 | | static constexpr bool kAlwaysTrivial = true; |
290 | | |
291 | 0 | static constexpr ValueFlags Flags(const ParsedMapFieldValue* absl_nonnull) { |
292 | 0 | return ValueFlags::kNone; |
293 | 0 | } |
294 | | }; |
295 | | |
296 | | template <> |
297 | | struct ValueAlternative<CustomMapValue> { |
298 | | static constexpr ValueIndex kIndex = ValueIndex::kCustomMap; |
299 | | static constexpr ValueKind kKind = CustomMapValue::kKind; |
300 | | static constexpr bool kAlwaysTrivial = true; |
301 | | |
302 | 798k | static constexpr ValueFlags Flags(const CustomMapValue* absl_nonnull) { |
303 | 798k | return ValueFlags::kNone; |
304 | 798k | } |
305 | | }; |
306 | | |
307 | | template <> |
308 | | struct ValueAlternative<LegacyStructValue> { |
309 | | static constexpr ValueIndex kIndex = ValueIndex::kLegacyStruct; |
310 | | static constexpr ValueKind kKind = LegacyStructValue::kKind; |
311 | | static constexpr bool kAlwaysTrivial = true; |
312 | | |
313 | 245k | static constexpr ValueFlags Flags(const LegacyStructValue* absl_nonnull) { |
314 | 245k | return ValueFlags::kNone; |
315 | 245k | } |
316 | | }; |
317 | | |
318 | | template <> |
319 | | struct ValueAlternative<ParsedMessageValue> { |
320 | | static constexpr ValueIndex kIndex = ValueIndex::kParsedMessage; |
321 | | static constexpr ValueKind kKind = ParsedMessageValue::kKind; |
322 | | static constexpr bool kAlwaysTrivial = true; |
323 | | |
324 | 266k | static constexpr ValueFlags Flags(const ParsedMessageValue* absl_nonnull) { |
325 | 266k | return ValueFlags::kNone; |
326 | 266k | } |
327 | | }; |
328 | | |
329 | | template <> |
330 | | struct ValueAlternative<CustomStructValue> { |
331 | | static constexpr ValueIndex kIndex = ValueIndex::kCustomStruct; |
332 | | static constexpr ValueKind kKind = CustomStructValue::kKind; |
333 | | static constexpr bool kAlwaysTrivial = true; |
334 | | |
335 | 0 | static constexpr ValueFlags Flags(const CustomStructValue* absl_nonnull) { |
336 | 0 | return ValueFlags::kNone; |
337 | 0 | } |
338 | | }; |
339 | | |
340 | | template <> |
341 | | struct ValueAlternative<OpaqueValue> { |
342 | | static constexpr ValueIndex kIndex = ValueIndex::kOpaque; |
343 | | static constexpr ValueKind kKind = OpaqueValue::kKind; |
344 | | static constexpr bool kAlwaysTrivial = true; |
345 | | |
346 | 0 | static constexpr ValueFlags Flags(const OpaqueValue* absl_nonnull) { |
347 | 0 | return ValueFlags::kNone; |
348 | 0 | } |
349 | | }; |
350 | | |
351 | | template <> |
352 | | struct ValueAlternative<BytesValue> { |
353 | | static constexpr ValueIndex kIndex = ValueIndex::kBytes; |
354 | | static constexpr ValueKind kKind = BytesValue::kKind; |
355 | | static constexpr bool kAlwaysTrivial = false; |
356 | | |
357 | 72.3k | static ValueFlags Flags(const BytesValue* absl_nonnull alternative) { |
358 | 72.3k | return ArenaTraits<BytesValue>::trivially_destructible(*alternative) |
359 | 72.3k | ? ValueFlags::kNone |
360 | 72.3k | : ValueFlags::kNonTrivial; |
361 | 72.3k | } |
362 | | }; |
363 | | |
364 | | template <> |
365 | | struct ValueAlternative<StringValue> { |
366 | | static constexpr ValueIndex kIndex = ValueIndex::kString; |
367 | | static constexpr ValueKind kKind = StringValue::kKind; |
368 | | static constexpr bool kAlwaysTrivial = false; |
369 | | |
370 | 57.7k | static ValueFlags Flags(const StringValue* absl_nonnull alternative) { |
371 | 57.7k | return ArenaTraits<StringValue>::trivially_destructible(*alternative) |
372 | 57.7k | ? ValueFlags::kNone |
373 | 57.7k | : ValueFlags::kNonTrivial; |
374 | 57.7k | } |
375 | | }; |
376 | | |
377 | | template <> |
378 | | struct ValueAlternative<ErrorValue> { |
379 | | static constexpr ValueIndex kIndex = ValueIndex::kError; |
380 | | static constexpr ValueKind kKind = ErrorValue::kKind; |
381 | | static constexpr bool kAlwaysTrivial = false; |
382 | | |
383 | 3.74M | static ValueFlags Flags(const ErrorValue* absl_nonnull alternative) { |
384 | 3.74M | return ArenaTraits<ErrorValue>::trivially_destructible(*alternative) |
385 | 3.74M | ? ValueFlags::kNone |
386 | 3.74M | : ValueFlags::kNonTrivial; |
387 | 3.74M | } |
388 | | }; |
389 | | |
390 | | template <> |
391 | | struct ValueAlternative<UnknownValue> { |
392 | | static constexpr ValueIndex kIndex = ValueIndex::kUnknown; |
393 | | static constexpr ValueKind kKind = UnknownValue::kKind; |
394 | | static constexpr bool kAlwaysTrivial = false; |
395 | | |
396 | 0 | static constexpr ValueFlags Flags(const UnknownValue* absl_nonnull) { |
397 | 0 | return ValueFlags::kNonTrivial; |
398 | 0 | } |
399 | | }; |
400 | | |
401 | | template <typename T, typename = void> |
402 | | struct IsValueAlternative : std::false_type {}; |
403 | | |
404 | | template <typename T> |
405 | | struct IsValueAlternative<T, std::void_t<decltype(ValueAlternative<T>{})>> |
406 | | : std::true_type {}; |
407 | | |
408 | | template <typename T> |
409 | | inline constexpr bool IsValueAlternativeV = IsValueAlternative<T>::value; |
410 | | |
411 | | // Alignment and size of the storage inside ValueVariant, not for ValueVariant |
412 | | // itself. |
413 | | inline constexpr size_t kValueVariantAlign = 8; |
414 | | inline constexpr size_t kValueVariantSize = 24; |
415 | | |
416 | | // Hand-rolled variant used by cel::Value which exhibits up to a 25% performance |
417 | | // improvement compared to using std::variant. |
418 | | // |
419 | | // The implementation abuses the fact that most alternatives are trivially |
420 | | // copyable and some are conditionally trivially copyable at runtime. For the |
421 | | // fast path, we perform raw byte copying. For the slow path, we fallback to a |
422 | | // non-inlined function. The compiler is typically smart enough to inline the |
423 | | // fast path and emit efficient instructions for the raw byte copying (usually |
424 | | // two instructions). It also uses switch for visiting, which most compilers can |
425 | | // optimize better compared to a function pointer table (which libc++ currently |
426 | | // uses and Clang currently does not optimize well). |
427 | | class alignas(kValueVariantAlign) CEL_COMMON_INTERNAL_VALUE_VARIANT_TRIVIAL_ABI |
428 | | ValueVariant final { |
429 | | public: |
430 | 13.5M | ValueVariant() = default; |
431 | | |
432 | | ValueVariant(const ValueVariant& other) noexcept |
433 | 37.8M | : index_(other.index_), kind_(other.kind_), flags_(other.flags_) { |
434 | 37.8M | if ((flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone) { |
435 | 30.6M | std::memcpy(raw_, other.raw_, sizeof(raw_)); |
436 | 30.6M | } else { |
437 | 7.22M | SlowCopyConstruct(other); |
438 | 7.22M | } |
439 | 37.8M | } |
440 | | |
441 | | ValueVariant(ValueVariant&& other) noexcept |
442 | 80.0M | : index_(other.index_), kind_(other.kind_), flags_(other.flags_) { |
443 | 80.0M | if ((flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone) { |
444 | 65.1M | std::memcpy(raw_, other.raw_, sizeof(raw_)); |
445 | 65.1M | } else { |
446 | 14.9M | SlowMoveConstruct(other); |
447 | 14.9M | } |
448 | 80.0M | } |
449 | | |
450 | 123M | ~ValueVariant() { |
451 | 123M | if ((flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNonTrivial) { |
452 | 30.2M | SlowDestruct(); |
453 | 30.2M | } |
454 | 123M | } |
455 | | |
456 | 8.64M | ValueVariant& operator=(const ValueVariant& other) noexcept { |
457 | 8.64M | if (this != &other) { |
458 | 8.64M | const bool trivial = |
459 | 8.64M | (flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
460 | 8.64M | const bool other_trivial = |
461 | 8.64M | (other.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
462 | 8.64M | if (trivial && other_trivial) { |
463 | 6.72M | FastCopyAssign(other); |
464 | 6.72M | } else { |
465 | 1.91M | SlowCopyAssign(other, trivial, other_trivial); |
466 | 1.91M | } |
467 | 8.64M | } |
468 | 8.64M | return *this; |
469 | 8.64M | } |
470 | | |
471 | 17.4M | ValueVariant& operator=(ValueVariant&& other) noexcept { |
472 | 17.4M | if (this != &other) { |
473 | 17.4M | const bool trivial = |
474 | 17.4M | (flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
475 | 17.4M | const bool other_trivial = |
476 | 17.4M | (other.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
477 | 17.4M | if (trivial && other_trivial) { |
478 | 7.20M | FastMoveAssign(other); |
479 | 10.2M | } else { |
480 | 10.2M | SlowMoveAssign(other, trivial, other_trivial); |
481 | 10.2M | } |
482 | 17.4M | } |
483 | 17.4M | return *this; |
484 | 17.4M | } |
485 | | |
486 | | template <typename T, typename... Args> |
487 | | explicit ValueVariant(absl::in_place_type_t<T>, Args&&... args) |
488 | 8.19M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { |
489 | 8.19M | static_assert(alignof(T) <= kValueVariantAlign); |
490 | 8.19M | static_assert(sizeof(T) <= kValueVariantSize); |
491 | | |
492 | 8.19M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) |
493 | 8.19M | T(std::forward<Args>(args)...)); |
494 | 8.19M | } cel::common_internal::ValueVariant::ValueVariant<cel::BoolValue, cel::BoolValue>(std::__1::in_place_type_t<cel::BoolValue>, cel::BoolValue&&) Line | Count | Source | 488 | 776k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 776k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 776k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 776k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 776k | T(std::forward<Args>(args)...)); | 494 | 776k | } |
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 | 488 | 678k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 678k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 678k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 678k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 678k | T(std::forward<Args>(args)...)); | 494 | 678k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::IntValue, cel::IntValue>(std::__1::in_place_type_t<cel::IntValue>, cel::IntValue&&) Line | Count | Source | 488 | 1.14M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 1.14M | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 1.14M | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 1.14M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 1.14M | T(std::forward<Args>(args)...)); | 494 | 1.14M | } |
cel::common_internal::ValueVariant::ValueVariant<cel::UintValue, cel::UintValue>(std::__1::in_place_type_t<cel::UintValue>, cel::UintValue&&) Line | Count | Source | 488 | 369k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 369k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 369k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 369k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 369k | T(std::forward<Args>(args)...)); | 494 | 369k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::StringValue, cel::StringValue>(std::__1::in_place_type_t<cel::StringValue>, cel::StringValue&&) Line | Count | Source | 488 | 21.2k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 21.2k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 21.2k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 21.2k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 21.2k | T(std::forward<Args>(args)...)); | 494 | 21.2k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::TypeValue, cel::TypeValue>(std::__1::in_place_type_t<cel::TypeValue>, cel::TypeValue&&) Line | Count | Source | 488 | 6.48k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 6.48k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 6.48k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 6.48k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 6.48k | T(std::forward<Args>(args)...)); | 494 | 6.48k | } |
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::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 | 488 | 36.5k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 36.5k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 36.5k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 36.5k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 36.5k | T(std::forward<Args>(args)...)); | 494 | 36.5k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::NullValue, cel::NullValue>(std::__1::in_place_type_t<cel::NullValue>, cel::NullValue&&) Line | Count | Source | 488 | 942 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 942 | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 942 | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 942 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 942 | T(std::forward<Args>(args)...)); | 494 | 942 | } |
cel::common_internal::ValueVariant::ValueVariant<cel::DoubleValue, cel::DoubleValue>(std::__1::in_place_type_t<cel::DoubleValue>, cel::DoubleValue&&) Line | Count | Source | 488 | 110k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 110k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 110k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 110k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 110k | T(std::forward<Args>(args)...)); | 494 | 110k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::BytesValue, cel::BytesValue>(std::__1::in_place_type_t<cel::BytesValue>, cel::BytesValue&&) Line | Count | Source | 488 | 72.3k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 72.3k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 72.3k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 72.3k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 72.3k | T(std::forward<Args>(args)...)); | 494 | 72.3k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::DurationValue, cel::DurationValue>(std::__1::in_place_type_t<cel::DurationValue>, cel::DurationValue&&) Line | Count | Source | 488 | 52.3k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 52.3k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 52.3k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 52.3k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 52.3k | T(std::forward<Args>(args)...)); | 494 | 52.3k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::TimestampValue, cel::TimestampValue>(std::__1::in_place_type_t<cel::TimestampValue>, cel::TimestampValue&&) Line | Count | Source | 488 | 15.4k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 15.4k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 15.4k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 15.4k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 15.4k | T(std::forward<Args>(args)...)); | 494 | 15.4k | } |
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 | 488 | 3.46M | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 3.46M | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 3.46M | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 3.46M | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 3.46M | T(std::forward<Args>(args)...)); | 494 | 3.46M | } |
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 | 488 | 280 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 280 | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 280 | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 280 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 280 | T(std::forward<Args>(args)...)); | 494 | 280 | } |
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 | 488 | 798k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 798k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 798k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 798k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 798k | T(std::forward<Args>(args)...)); | 494 | 798k | } |
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 | 488 | 368k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 368k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 368k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 368k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 368k | T(std::forward<Args>(args)...)); | 494 | 368k | } |
cel::common_internal::ValueVariant::ValueVariant<cel::ParsedJsonMapValue, cel::ParsedJsonMapValue>(std::__1::in_place_type_t<cel::ParsedJsonMapValue>, cel::ParsedJsonMapValue&&) Line | Count | Source | 488 | 4.07k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 4.07k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 4.07k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 4.07k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 4.07k | T(std::forward<Args>(args)...)); | 494 | 4.07k | } |
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 | 488 | 3 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 3 | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 3 | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 3 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 3 | T(std::forward<Args>(args)...)); | 494 | 3 | } |
cel::common_internal::ValueVariant::ValueVariant<cel::CustomMapValue, cel::CustomMapValue&>(std::__1::in_place_type_t<cel::CustomMapValue>, cel::CustomMapValue&) Line | Count | Source | 488 | 1 | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 1 | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 1 | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 1 | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 1 | T(std::forward<Args>(args)...)); | 494 | 1 | } |
cel::common_internal::ValueVariant::ValueVariant<cel::ParsedMessageValue, cel::ParsedMessageValue&>(std::__1::in_place_type_t<cel::ParsedMessageValue>, cel::ParsedMessageValue&) Line | Count | Source | 488 | 20.1k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 20.1k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 20.1k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 20.1k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 20.1k | T(std::forward<Args>(args)...)); | 494 | 20.1k | } |
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 | 488 | 245k | : index_(ValueAlternative<T>::kIndex), kind_(ValueAlternative<T>::kKind) { | 489 | 245k | static_assert(alignof(T) <= kValueVariantAlign); | 490 | 245k | static_assert(sizeof(T) <= kValueVariantSize); | 491 | | | 492 | 245k | flags_ = ValueAlternative<T>::Flags(::new (static_cast<void*>(&raw_[0])) | 493 | 245k | T(std::forward<Args>(args)...)); | 494 | 245k | } |
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&) |
495 | | |
496 | | template <typename T, typename = std::enable_if_t< |
497 | | IsValueAlternativeV<absl::remove_cvref_t<T>>>> |
498 | | explicit ValueVariant(T&& value) |
499 | 4.26M | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, |
500 | 4.26M | 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 | 499 | 3.46M | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, | 500 | 3.46M | 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 | 499 | 280 | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, | 500 | 280 | 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 | 499 | 798k | : ValueVariant(absl::in_place_type<absl::remove_cvref_t<T>>, | 500 | 798k | 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&&) |
501 | | |
502 | 53.4M | ValueKind kind() const { return kind_; } |
503 | | |
504 | | template <typename T> |
505 | 6.48M | void Assign(T&& value) { |
506 | 6.48M | using U = absl::remove_cvref_t<T>; |
507 | | |
508 | 6.48M | static_assert(alignof(U) <= kValueVariantAlign); |
509 | 6.48M | static_assert(sizeof(U) <= kValueVariantSize); |
510 | | |
511 | 6.48M | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { |
512 | 3.41M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { |
513 | 183k | SlowDestruct(); |
514 | 183k | } |
515 | 3.41M | index_ = ValueAlternative<U>::kIndex; |
516 | 3.41M | kind_ = ValueAlternative<U>::kKind; |
517 | 3.41M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) |
518 | 3.41M | U(std::forward<T>(value))); |
519 | 3.41M | } else { |
520 | | // U is not always trivial. See if the current active alternative is U. If |
521 | | // it is, we can just do a simple assignment without having to destruct |
522 | | // first. Otherwise fallback to destruct and construct. |
523 | 3.06M | if (index_ == ValueAlternative<U>::kIndex) { |
524 | 0 | *At<U>() = std::forward<T>(value); |
525 | 0 | flags_ = ValueAlternative<U>::Flags(At<U>()); |
526 | 3.06M | } else { |
527 | 3.06M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { |
528 | 1.26k | SlowDestruct(); |
529 | 1.26k | } |
530 | 3.06M | index_ = ValueAlternative<U>::kIndex; |
531 | 3.06M | kind_ = ValueAlternative<U>::kKind; |
532 | 3.06M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) |
533 | 3.06M | U(std::forward<T>(value))); |
534 | 3.06M | } |
535 | 3.06M | } |
536 | 6.48M | } 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 | 505 | 3.06M | void Assign(T&& value) { | 506 | 3.06M | using U = absl::remove_cvref_t<T>; | 507 | | | 508 | 3.06M | static_assert(alignof(U) <= kValueVariantAlign); | 509 | 3.06M | static_assert(sizeof(U) <= kValueVariantSize); | 510 | | | 511 | | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 512 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 513 | | SlowDestruct(); | 514 | | } | 515 | | index_ = ValueAlternative<U>::kIndex; | 516 | | kind_ = ValueAlternative<U>::kKind; | 517 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 518 | | U(std::forward<T>(value))); | 519 | 3.06M | } else { | 520 | | // U is not always trivial. See if the current active alternative is U. If | 521 | | // it is, we can just do a simple assignment without having to destruct | 522 | | // first. Otherwise fallback to destruct and construct. | 523 | 3.06M | if (index_ == ValueAlternative<U>::kIndex) { | 524 | 0 | *At<U>() = std::forward<T>(value); | 525 | 0 | flags_ = ValueAlternative<U>::Flags(At<U>()); | 526 | 3.06M | } else { | 527 | 3.06M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 528 | 1.26k | SlowDestruct(); | 529 | 1.26k | } | 530 | 3.06M | index_ = ValueAlternative<U>::kIndex; | 531 | 3.06M | kind_ = ValueAlternative<U>::kKind; | 532 | 3.06M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 533 | 3.06M | U(std::forward<T>(value))); | 534 | 3.06M | } | 535 | 3.06M | } | 536 | 3.06M | } |
void cel::common_internal::ValueVariant::Assign<cel::NullValue>(cel::NullValue&&) Line | Count | Source | 505 | 2.68M | void Assign(T&& value) { | 506 | 2.68M | using U = absl::remove_cvref_t<T>; | 507 | | | 508 | 2.68M | static_assert(alignof(U) <= kValueVariantAlign); | 509 | 2.68M | static_assert(sizeof(U) <= kValueVariantSize); | 510 | | | 511 | 2.68M | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 512 | 2.68M | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 513 | 182k | SlowDestruct(); | 514 | 182k | } | 515 | 2.68M | index_ = ValueAlternative<U>::kIndex; | 516 | 2.68M | kind_ = ValueAlternative<U>::kKind; | 517 | 2.68M | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 518 | 2.68M | U(std::forward<T>(value))); | 519 | | } else { | 520 | | // U is not always trivial. See if the current active alternative is U. If | 521 | | // it is, we can just do a simple assignment without having to destruct | 522 | | // first. Otherwise fallback to destruct and construct. | 523 | | if (index_ == ValueAlternative<U>::kIndex) { | 524 | | *At<U>() = std::forward<T>(value); | 525 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 526 | | } else { | 527 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 528 | | SlowDestruct(); | 529 | | } | 530 | | index_ = ValueAlternative<U>::kIndex; | 531 | | kind_ = ValueAlternative<U>::kKind; | 532 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 533 | | U(std::forward<T>(value))); | 534 | | } | 535 | | } | 536 | 2.68M | } |
void cel::common_internal::ValueVariant::Assign<cel::BoolValue>(cel::BoolValue&&) Line | Count | Source | 505 | 470k | void Assign(T&& value) { | 506 | 470k | using U = absl::remove_cvref_t<T>; | 507 | | | 508 | 470k | static_assert(alignof(U) <= kValueVariantAlign); | 509 | 470k | static_assert(sizeof(U) <= kValueVariantSize); | 510 | | | 511 | 470k | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 512 | 470k | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 513 | 258 | SlowDestruct(); | 514 | 258 | } | 515 | 470k | index_ = ValueAlternative<U>::kIndex; | 516 | 470k | kind_ = ValueAlternative<U>::kKind; | 517 | 470k | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 518 | 470k | U(std::forward<T>(value))); | 519 | | } else { | 520 | | // U is not always trivial. See if the current active alternative is U. If | 521 | | // it is, we can just do a simple assignment without having to destruct | 522 | | // first. Otherwise fallback to destruct and construct. | 523 | | if (index_ == ValueAlternative<U>::kIndex) { | 524 | | *At<U>() = std::forward<T>(value); | 525 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 526 | | } else { | 527 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 528 | | SlowDestruct(); | 529 | | } | 530 | | index_ = ValueAlternative<U>::kIndex; | 531 | | kind_ = ValueAlternative<U>::kKind; | 532 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 533 | | U(std::forward<T>(value))); | 534 | | } | 535 | | } | 536 | 470k | } |
Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::UnknownValue>(cel::UnknownValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::CustomListValue>(cel::CustomListValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::CustomMapValue>(cel::CustomMapValue&&) void cel::common_internal::ValueVariant::Assign<cel::IntValue>(cel::IntValue&&) Line | Count | Source | 505 | 19.5k | void Assign(T&& value) { | 506 | 19.5k | using U = absl::remove_cvref_t<T>; | 507 | | | 508 | 19.5k | static_assert(alignof(U) <= kValueVariantAlign); | 509 | 19.5k | static_assert(sizeof(U) <= kValueVariantSize); | 510 | | | 511 | 19.5k | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 512 | 19.5k | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 513 | 0 | SlowDestruct(); | 514 | 0 | } | 515 | 19.5k | index_ = ValueAlternative<U>::kIndex; | 516 | 19.5k | kind_ = ValueAlternative<U>::kKind; | 517 | 19.5k | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 518 | 19.5k | U(std::forward<T>(value))); | 519 | | } else { | 520 | | // U is not always trivial. See if the current active alternative is U. If | 521 | | // it is, we can just do a simple assignment without having to destruct | 522 | | // first. Otherwise fallback to destruct and construct. | 523 | | if (index_ == ValueAlternative<U>::kIndex) { | 524 | | *At<U>() = std::forward<T>(value); | 525 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 526 | | } else { | 527 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 528 | | SlowDestruct(); | 529 | | } | 530 | | index_ = ValueAlternative<U>::kIndex; | 531 | | kind_ = ValueAlternative<U>::kKind; | 532 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 533 | | U(std::forward<T>(value))); | 534 | | } | 535 | | } | 536 | 19.5k | } |
void cel::common_internal::ValueVariant::Assign<cel::common_internal::LegacyStructValue>(cel::common_internal::LegacyStructValue&&) Line | Count | Source | 505 | 245k | void Assign(T&& value) { | 506 | 245k | using U = absl::remove_cvref_t<T>; | 507 | | | 508 | 245k | static_assert(alignof(U) <= kValueVariantAlign); | 509 | 245k | static_assert(sizeof(U) <= kValueVariantSize); | 510 | | | 511 | 245k | if constexpr (ValueAlternative<U>::kAlwaysTrivial) { | 512 | 245k | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 513 | 0 | SlowDestruct(); | 514 | 0 | } | 515 | 245k | index_ = ValueAlternative<U>::kIndex; | 516 | 245k | kind_ = ValueAlternative<U>::kKind; | 517 | 245k | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 518 | 245k | U(std::forward<T>(value))); | 519 | | } else { | 520 | | // U is not always trivial. See if the current active alternative is U. If | 521 | | // it is, we can just do a simple assignment without having to destruct | 522 | | // first. Otherwise fallback to destruct and construct. | 523 | | if (index_ == ValueAlternative<U>::kIndex) { | 524 | | *At<U>() = std::forward<T>(value); | 525 | | flags_ = ValueAlternative<U>::Flags(At<U>()); | 526 | | } else { | 527 | | if ((flags_ & ValueFlags::kNonTrivial) != ValueFlags::kNone) { | 528 | | SlowDestruct(); | 529 | | } | 530 | | index_ = ValueAlternative<U>::kIndex; | 531 | | kind_ = ValueAlternative<U>::kKind; | 532 | | flags_ = ValueAlternative<U>::Flags(::new (static_cast<void*>(&raw_[0])) | 533 | | U(std::forward<T>(value))); | 534 | | } | 535 | | } | 536 | 245k | } |
Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::UintValue>(cel::UintValue&&) Unexecuted instantiation: void cel::common_internal::ValueVariant::Assign<cel::DoubleValue>(cel::DoubleValue&&) 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&&) |
537 | | |
538 | | template <typename T> |
539 | 87.7M | bool Is() const { |
540 | 87.7M | return index_ == ValueAlternative<T>::kIndex; |
541 | 87.7M | } bool cel::common_internal::ValueVariant::Is<cel::BoolValue>() const Line | Count | Source | 539 | 764k | bool Is() const { | 540 | 764k | return index_ == ValueAlternative<T>::kIndex; | 541 | 764k | } |
bool cel::common_internal::ValueVariant::Is<cel::BytesValue>() const Line | Count | Source | 539 | 26.6k | bool Is() const { | 540 | 26.6k | return index_ == ValueAlternative<T>::kIndex; | 541 | 26.6k | } |
bool cel::common_internal::ValueVariant::Is<cel::DoubleValue>() const Line | Count | Source | 539 | 577k | bool Is() const { | 540 | 577k | return index_ == ValueAlternative<T>::kIndex; | 541 | 577k | } |
bool cel::common_internal::ValueVariant::Is<cel::DurationValue>() const Line | Count | Source | 539 | 25.3k | bool Is() const { | 540 | 25.3k | return index_ == ValueAlternative<T>::kIndex; | 541 | 25.3k | } |
bool cel::common_internal::ValueVariant::Is<cel::ErrorValue>() const Line | Count | Source | 539 | 46.8M | bool Is() const { | 540 | 46.8M | return index_ == ValueAlternative<T>::kIndex; | 541 | 46.8M | } |
bool cel::common_internal::ValueVariant::Is<cel::IntValue>() const Line | Count | Source | 539 | 1.93M | bool Is() const { | 540 | 1.93M | return index_ == ValueAlternative<T>::kIndex; | 541 | 1.93M | } |
bool cel::common_internal::ValueVariant::Is<cel::common_internal::LegacyListValue>() const Line | Count | Source | 539 | 4.61M | bool Is() const { | 540 | 4.61M | return index_ == ValueAlternative<T>::kIndex; | 541 | 4.61M | } |
bool cel::common_internal::ValueVariant::Is<cel::CustomListValue>() const Line | Count | Source | 539 | 4.61M | bool Is() const { | 540 | 4.61M | return index_ == ValueAlternative<T>::kIndex; | 541 | 4.61M | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedRepeatedFieldValue>() const Line | Count | Source | 539 | 81.4k | bool Is() const { | 540 | 81.4k | return index_ == ValueAlternative<T>::kIndex; | 541 | 81.4k | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedJsonListValue>() const Line | Count | Source | 539 | 81.5k | bool Is() const { | 540 | 81.5k | return index_ == ValueAlternative<T>::kIndex; | 541 | 81.5k | } |
bool cel::common_internal::ValueVariant::Is<cel::common_internal::LegacyMapValue>() const Line | Count | Source | 539 | 887k | bool Is() const { | 540 | 887k | return index_ == ValueAlternative<T>::kIndex; | 541 | 887k | } |
bool cel::common_internal::ValueVariant::Is<cel::CustomMapValue>() const Line | Count | Source | 539 | 887k | bool Is() const { | 540 | 887k | return index_ == ValueAlternative<T>::kIndex; | 541 | 887k | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedMapFieldValue>() const Line | Count | Source | 539 | 333k | bool Is() const { | 540 | 333k | return index_ == ValueAlternative<T>::kIndex; | 541 | 333k | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedJsonMapValue>() const Line | Count | Source | 539 | 334k | bool Is() const { | 540 | 334k | return index_ == ValueAlternative<T>::kIndex; | 541 | 334k | } |
bool cel::common_internal::ValueVariant::Is<cel::ParsedMessageValue>() const Line | Count | Source | 539 | 1.11M | bool Is() const { | 540 | 1.11M | return index_ == ValueAlternative<T>::kIndex; | 541 | 1.11M | } |
bool cel::common_internal::ValueVariant::Is<cel::NullValue>() const Line | Count | Source | 539 | 2.69k | bool Is() const { | 540 | 2.69k | return index_ == ValueAlternative<T>::kIndex; | 541 | 2.69k | } |
Unexecuted instantiation: bool cel::common_internal::ValueVariant::Is<cel::OpaqueValue>() const bool cel::common_internal::ValueVariant::Is<cel::CustomStructValue>() const Line | Count | Source | 539 | 155k | bool Is() const { | 540 | 155k | return index_ == ValueAlternative<T>::kIndex; | 541 | 155k | } |
bool cel::common_internal::ValueVariant::Is<cel::StringValue>() const Line | Count | Source | 539 | 334k | bool Is() const { | 540 | 334k | return index_ == ValueAlternative<T>::kIndex; | 541 | 334k | } |
bool cel::common_internal::ValueVariant::Is<cel::common_internal::LegacyStructValue>() const Line | Count | Source | 539 | 812k | bool Is() const { | 540 | 812k | return index_ == ValueAlternative<T>::kIndex; | 541 | 812k | } |
bool cel::common_internal::ValueVariant::Is<cel::TimestampValue>() const Line | Count | Source | 539 | 3.20k | bool Is() const { | 540 | 3.20k | return index_ == ValueAlternative<T>::kIndex; | 541 | 3.20k | } |
bool cel::common_internal::ValueVariant::Is<cel::TypeValue>() const Line | Count | Source | 539 | 444 | bool Is() const { | 540 | 444 | return index_ == ValueAlternative<T>::kIndex; | 541 | 444 | } |
bool cel::common_internal::ValueVariant::Is<cel::UintValue>() const Line | Count | Source | 539 | 841k | bool Is() const { | 540 | 841k | return index_ == ValueAlternative<T>::kIndex; | 541 | 841k | } |
bool cel::common_internal::ValueVariant::Is<cel::UnknownValue>() const Line | Count | Source | 539 | 22.5M | bool Is() const { | 540 | 22.5M | return index_ == ValueAlternative<T>::kIndex; | 541 | 22.5M | } |
|
542 | | |
543 | | template <typename T> |
544 | | T& Get() & ABSL_ATTRIBUTE_LIFETIME_BOUND { |
545 | | ABSL_DCHECK(Is<T>()); |
546 | | |
547 | | return *At<T>(); |
548 | | } |
549 | | |
550 | | template <typename T> |
551 | 32.0M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { |
552 | 32.0M | ABSL_DCHECK(Is<T>()); |
553 | | |
554 | 32.0M | return *At<T>(); |
555 | 32.0M | } cel::BoolValue const& cel::common_internal::ValueVariant::Get<cel::BoolValue>() const & Line | Count | Source | 551 | 2.73M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 2.73M | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 2.73M | return *At<T>(); | 555 | 2.73M | } |
cel::NullValue const& cel::common_internal::ValueVariant::Get<cel::NullValue>() const & Line | Count | Source | 551 | 4.50k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 4.50k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 4.50k | return *At<T>(); | 555 | 4.50k | } |
cel::IntValue const& cel::common_internal::ValueVariant::Get<cel::IntValue>() const & Line | Count | Source | 551 | 25.8M | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 25.8M | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 25.8M | return *At<T>(); | 555 | 25.8M | } |
cel::UintValue const& cel::common_internal::ValueVariant::Get<cel::UintValue>() const & Line | Count | Source | 551 | 659k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 659k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 659k | return *At<T>(); | 555 | 659k | } |
cel::DoubleValue const& cel::common_internal::ValueVariant::Get<cel::DoubleValue>() const & Line | Count | Source | 551 | 718k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 718k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 718k | return *At<T>(); | 555 | 718k | } |
cel::DurationValue const& cel::common_internal::ValueVariant::Get<cel::DurationValue>() const & Line | Count | Source | 551 | 59.9k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 59.9k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 59.9k | return *At<T>(); | 555 | 59.9k | } |
cel::TimestampValue const& cel::common_internal::ValueVariant::Get<cel::TimestampValue>() const & Line | Count | Source | 551 | 4.58k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 4.58k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 4.58k | return *At<T>(); | 555 | 4.58k | } |
cel::TypeValue const& cel::common_internal::ValueVariant::Get<cel::TypeValue>() const & Line | Count | Source | 551 | 20.6k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 20.6k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 20.6k | return *At<T>(); | 555 | 20.6k | } |
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 | 551 | 3.14k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 3.14k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 3.14k | return *At<T>(); | 555 | 3.14k | } |
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 | 551 | 638k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 638k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 638k | return *At<T>(); | 555 | 638k | } |
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 | 551 | 1.75k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 1.75k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 1.75k | return *At<T>(); | 555 | 1.75k | } |
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 | 551 | 289k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 289k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 289k | return *At<T>(); | 555 | 289k | } |
cel::common_internal::LegacyStructValue const& cel::common_internal::ValueVariant::Get<cel::common_internal::LegacyStructValue>() const & Line | Count | Source | 551 | 60.9k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 60.9k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 60.9k | return *At<T>(); | 555 | 60.9k | } |
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 | 551 | 46.1k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 46.1k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 46.1k | return *At<T>(); | 555 | 46.1k | } |
cel::StringValue const& cel::common_internal::ValueVariant::Get<cel::StringValue>() const & Line | Count | Source | 551 | 999k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 999k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 999k | return *At<T>(); | 555 | 999k | } |
cel::ErrorValue const& cel::common_internal::ValueVariant::Get<cel::ErrorValue>() const & Line | Count | Source | 551 | 10.4k | const T& Get() const& ABSL_ATTRIBUTE_LIFETIME_BOUND { | 552 | 10.4k | ABSL_DCHECK(Is<T>()); | 553 | | | 554 | 10.4k | return *At<T>(); | 555 | 10.4k | } |
Unexecuted instantiation: cel::UnknownValue const& cel::common_internal::ValueVariant::Get<cel::UnknownValue>() const & |
556 | | |
557 | | template <typename T> |
558 | 0 | T&& Get() && ABSL_ATTRIBUTE_LIFETIME_BOUND { |
559 | 0 | ABSL_DCHECK(Is<T>()); |
560 | |
|
561 | 0 | return std::move(*At<T>()); |
562 | 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>() && |
563 | | |
564 | | template <typename T> |
565 | | const T&& Get() const&& ABSL_ATTRIBUTE_LIFETIME_BOUND { |
566 | | ABSL_DCHECK(Is<T>()); |
567 | | |
568 | | return std::move(*At<T>()); |
569 | | } |
570 | | |
571 | | template <typename T> |
572 | 0 | T* absl_nullable As() ABSL_ATTRIBUTE_LIFETIME_BOUND { |
573 | 0 | if (Is<T>()) { |
574 | 0 | return At<T>(); |
575 | 0 | } |
576 | 0 | return nullptr; |
577 | 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::common_internal::LegacyListValue* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyListValue>() Unexecuted instantiation: cel::CustomListValue* cel::common_internal::ValueVariant::As<cel::CustomListValue>() Unexecuted instantiation: cel::ParsedRepeatedFieldValue* cel::common_internal::ValueVariant::As<cel::ParsedRepeatedFieldValue>() Unexecuted instantiation: cel::ParsedJsonListValue* cel::common_internal::ValueVariant::As<cel::ParsedJsonListValue>() Unexecuted instantiation: cel::common_internal::LegacyMapValue* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyMapValue>() 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::ParsedJsonMapValue* cel::common_internal::ValueVariant::As<cel::ParsedJsonMapValue>() 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::CustomStructValue* cel::common_internal::ValueVariant::As<cel::CustomStructValue>() Unexecuted instantiation: cel::StringValue* cel::common_internal::ValueVariant::As<cel::StringValue>() Unexecuted instantiation: cel::common_internal::LegacyStructValue* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyStructValue>() Unexecuted instantiation: cel::TypeValue* cel::common_internal::ValueVariant::As<cel::TypeValue>() Unexecuted instantiation: cel::UnknownValue* cel::common_internal::ValueVariant::As<cel::UnknownValue>() |
578 | | |
579 | | template <typename T> |
580 | 41.3M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { |
581 | 41.3M | if (Is<T>()) { |
582 | 4.12M | return At<T>(); |
583 | 4.12M | } |
584 | 37.2M | return nullptr; |
585 | 41.3M | } 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 | 580 | 442k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 442k | if (Is<T>()) { | 582 | 408k | return At<T>(); | 583 | 408k | } | 584 | 33.1k | return nullptr; | 585 | 442k | } |
cel::BytesValue const* cel::common_internal::ValueVariant::As<cel::BytesValue>() const Line | Count | Source | 580 | 4.90k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 4.90k | if (Is<T>()) { | 582 | 3.62k | return At<T>(); | 583 | 3.62k | } | 584 | 1.28k | return nullptr; | 585 | 4.90k | } |
cel::DoubleValue const* cel::common_internal::ValueVariant::As<cel::DoubleValue>() const Line | Count | Source | 580 | 254k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 254k | if (Is<T>()) { | 582 | 234k | return At<T>(); | 583 | 234k | } | 584 | 20.3k | return nullptr; | 585 | 254k | } |
cel::DurationValue const* cel::common_internal::ValueVariant::As<cel::DurationValue>() const Line | Count | Source | 580 | 13.3k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 13.3k | if (Is<T>()) { | 582 | 13.1k | return At<T>(); | 583 | 13.1k | } | 584 | 206 | return nullptr; | 585 | 13.3k | } |
cel::ErrorValue const* cel::common_internal::ValueVariant::As<cel::ErrorValue>() const Line | Count | Source | 580 | 16.8M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 16.8M | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 16.8M | return nullptr; | 585 | 16.8M | } |
cel::IntValue const* cel::common_internal::ValueVariant::As<cel::IntValue>() const Line | Count | Source | 580 | 25.6k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 25.6k | if (Is<T>()) { | 582 | 6.32k | return At<T>(); | 583 | 6.32k | } | 584 | 19.2k | return nullptr; | 585 | 25.6k | } |
cel::common_internal::LegacyListValue const* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyListValue>() const Line | Count | Source | 580 | 2.47M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 2.47M | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 2.47M | return nullptr; | 585 | 2.47M | } |
cel::CustomListValue const* cel::common_internal::ValueVariant::As<cel::CustomListValue>() const Line | Count | Source | 580 | 2.47M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 2.47M | if (Is<T>()) { | 582 | 2.40M | return At<T>(); | 583 | 2.40M | } | 584 | 74.3k | return nullptr; | 585 | 2.47M | } |
cel::ParsedRepeatedFieldValue const* cel::common_internal::ValueVariant::As<cel::ParsedRepeatedFieldValue>() const Line | Count | Source | 580 | 75.3k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 75.3k | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 75.3k | return nullptr; | 585 | 75.3k | } |
cel::ParsedJsonListValue const* cel::common_internal::ValueVariant::As<cel::ParsedJsonListValue>() const Line | Count | Source | 580 | 75.3k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 75.3k | if (Is<T>()) { | 582 | 73.5k | return At<T>(); | 583 | 73.5k | } | 584 | 1.84k | return nullptr; | 585 | 75.3k | } |
cel::common_internal::LegacyMapValue const* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyMapValue>() const Line | Count | Source | 580 | 534k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 534k | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 534k | return nullptr; | 585 | 534k | } |
cel::CustomMapValue const* cel::common_internal::ValueVariant::As<cel::CustomMapValue>() const Line | Count | Source | 580 | 534k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 534k | if (Is<T>()) { | 582 | 513k | return At<T>(); | 583 | 513k | } | 584 | 21.1k | return nullptr; | 585 | 534k | } |
cel::ParsedMapFieldValue const* cel::common_internal::ValueVariant::As<cel::ParsedMapFieldValue>() const Line | Count | Source | 580 | 21.8k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 21.8k | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 21.8k | return nullptr; | 585 | 21.8k | } |
cel::ParsedJsonMapValue const* cel::common_internal::ValueVariant::As<cel::ParsedJsonMapValue>() const Line | Count | Source | 580 | 22.0k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 22.0k | if (Is<T>()) { | 582 | 2.99k | return At<T>(); | 583 | 2.99k | } | 584 | 19.0k | return nullptr; | 585 | 22.0k | } |
cel::ParsedMessageValue const* cel::common_internal::ValueVariant::As<cel::ParsedMessageValue>() const Line | Count | Source | 580 | 266k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 266k | if (Is<T>()) { | 582 | 266k | return At<T>(); | 583 | 266k | } | 584 | 186 | return nullptr; | 585 | 266k | } |
Unexecuted instantiation: cel::NullValue const* cel::common_internal::ValueVariant::As<cel::NullValue>() const cel::CustomStructValue const* cel::common_internal::ValueVariant::As<cel::CustomStructValue>() const Line | Count | Source | 580 | 93 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 93 | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 93 | return nullptr; | 585 | 93 | } |
cel::StringValue const* cel::common_internal::ValueVariant::As<cel::StringValue>() const Line | Count | Source | 580 | 25.3k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 25.3k | if (Is<T>()) { | 582 | 4.15k | return At<T>(); | 583 | 4.15k | } | 584 | 21.1k | return nullptr; | 585 | 25.3k | } |
cel::common_internal::LegacyStructValue const* cel::common_internal::ValueVariant::As<cel::common_internal::LegacyStructValue>() const Line | Count | Source | 580 | 195k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 195k | if (Is<T>()) { | 582 | 195k | return At<T>(); | 583 | 195k | } | 584 | 93 | return nullptr; | 585 | 195k | } |
cel::TimestampValue const* cel::common_internal::ValueVariant::As<cel::TimestampValue>() const Line | Count | Source | 580 | 221 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 221 | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 221 | return nullptr; | 585 | 221 | } |
cel::TypeValue const* cel::common_internal::ValueVariant::As<cel::TypeValue>() const Line | Count | Source | 580 | 444 | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 444 | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 444 | return nullptr; | 585 | 444 | } |
cel::UintValue const* cel::common_internal::ValueVariant::As<cel::UintValue>() const Line | Count | Source | 580 | 251k | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 251k | if (Is<T>()) { | 582 | 3.17k | return At<T>(); | 583 | 3.17k | } | 584 | 247k | return nullptr; | 585 | 251k | } |
cel::UnknownValue const* cel::common_internal::ValueVariant::As<cel::UnknownValue>() const Line | Count | Source | 580 | 16.8M | const T* absl_nullable As() const ABSL_ATTRIBUTE_LIFETIME_BOUND { | 581 | 16.8M | if (Is<T>()) { | 582 | 0 | return At<T>(); | 583 | 0 | } | 584 | 16.8M | return nullptr; | 585 | 16.8M | } |
|
586 | | |
587 | | template <typename Visitor> |
588 | | ABSL_ATTRIBUTE_ALWAYS_INLINE decltype(auto) Visit(Visitor&& visitor) & { |
589 | | return std::as_const(*this).Visit(std::forward<Visitor>(visitor)); |
590 | | } |
591 | | |
592 | | template <typename Visitor> |
593 | 26.8M | decltype(auto) Visit(Visitor&& visitor) const& { |
594 | 26.8M | switch (index_) { |
595 | 4.50k | case ValueIndex::kNull: |
596 | 4.50k | return std::forward<Visitor>(visitor)(Get<NullValue>()); |
597 | 1.28M | case ValueIndex::kBool: |
598 | 1.28M | return std::forward<Visitor>(visitor)(Get<BoolValue>()); |
599 | 23.3M | case ValueIndex::kInt: |
600 | 23.3M | return std::forward<Visitor>(visitor)(Get<IntValue>()); |
601 | 512k | case ValueIndex::kUint: |
602 | 512k | return std::forward<Visitor>(visitor)(Get<UintValue>()); |
603 | 372k | case ValueIndex::kDouble: |
604 | 372k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); |
605 | 46.4k | case ValueIndex::kDuration: |
606 | 46.4k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); |
607 | 981 | case ValueIndex::kTimestamp: |
608 | 981 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); |
609 | 2.83k | case ValueIndex::kType: |
610 | 2.83k | return std::forward<Visitor>(visitor)(Get<TypeValue>()); |
611 | 0 | case ValueIndex::kLegacyList: |
612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); |
613 | 3.14k | case ValueIndex::kParsedJsonList: |
614 | 3.14k | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); |
615 | 0 | case ValueIndex::kParsedRepeatedField: |
616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); |
617 | 638k | case ValueIndex::kCustomList: |
618 | 638k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); |
619 | 0 | case ValueIndex::kLegacyMap: |
620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); |
621 | 1.75k | case ValueIndex::kParsedJsonMap: |
622 | 1.75k | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); |
623 | 0 | case ValueIndex::kParsedMapField: |
624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); |
625 | 289k | case ValueIndex::kCustomMap: |
626 | 289k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); |
627 | 40.7k | case ValueIndex::kLegacyStruct: |
628 | 40.7k | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); |
629 | 0 | case ValueIndex::kParsedMessage: |
630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); |
631 | 0 | case ValueIndex::kCustomStruct: |
632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); |
633 | 0 | case ValueIndex::kOpaque: |
634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); |
635 | 20.4k | case ValueIndex::kBytes: |
636 | 20.4k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); |
637 | 268k | case ValueIndex::kString: |
638 | 268k | return std::forward<Visitor>(visitor)(Get<StringValue>()); |
639 | 0 | case ValueIndex::kError: |
640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); |
641 | 0 | case ValueIndex::kUnknown: |
642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); |
643 | 26.8M | } |
644 | 26.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 | 593 | 16.6M | decltype(auto) Visit(Visitor&& visitor) const& { | 594 | 16.6M | switch (index_) { | 595 | 2.98k | case ValueIndex::kNull: | 596 | 2.98k | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 597 | 866k | case ValueIndex::kBool: | 598 | 866k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 599 | 14.5M | case ValueIndex::kInt: | 600 | 14.5M | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 601 | 251k | case ValueIndex::kUint: | 602 | 251k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 603 | 288k | case ValueIndex::kDouble: | 604 | 288k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 605 | 23.8k | case ValueIndex::kDuration: | 606 | 23.8k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 607 | 760 | case ValueIndex::kTimestamp: | 608 | 760 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 609 | 2.12k | case ValueIndex::kType: | 610 | 2.12k | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 611 | 0 | case ValueIndex::kLegacyList: | 612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 613 | 1.76k | case ValueIndex::kParsedJsonList: | 614 | 1.76k | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 615 | 0 | case ValueIndex::kParsedRepeatedField: | 616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 617 | 229k | case ValueIndex::kCustomList: | 618 | 229k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 619 | 0 | case ValueIndex::kLegacyMap: | 620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 621 | 887 | case ValueIndex::kParsedJsonMap: | 622 | 887 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 623 | 0 | case ValueIndex::kParsedMapField: | 624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 625 | 231k | case ValueIndex::kCustomMap: | 626 | 231k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 627 | 20.3k | case ValueIndex::kLegacyStruct: | 628 | 20.3k | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 629 | 0 | case ValueIndex::kParsedMessage: | 630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 631 | 0 | case ValueIndex::kCustomStruct: | 632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 633 | 0 | case ValueIndex::kOpaque: | 634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 635 | 11.0k | case ValueIndex::kBytes: | 636 | 11.0k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 637 | 193k | case ValueIndex::kString: | 638 | 193k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 639 | 0 | case ValueIndex::kError: | 640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 641 | 0 | case ValueIndex::kUnknown: | 642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 643 | 16.6M | } | 644 | 16.6M | } |
value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::GetTypeName() const::$_0>(cel::Value::GetTypeName() const::$_0&&) const & Line | Count | Source | 593 | 2.16k | decltype(auto) Visit(Visitor&& visitor) const& { | 594 | 2.16k | switch (index_) { | 595 | 0 | case ValueIndex::kNull: | 596 | 0 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 597 | 354 | case ValueIndex::kBool: | 598 | 354 | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 599 | 1 | case ValueIndex::kInt: | 600 | 1 | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 601 | 1.07k | case ValueIndex::kUint: | 602 | 1.07k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 603 | 226 | case ValueIndex::kDouble: | 604 | 226 | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 605 | 0 | case ValueIndex::kDuration: | 606 | 0 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 607 | 0 | case ValueIndex::kTimestamp: | 608 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 609 | 234 | case ValueIndex::kType: | 610 | 234 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 611 | 0 | case ValueIndex::kLegacyList: | 612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 613 | 0 | case ValueIndex::kParsedJsonList: | 614 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 615 | 0 | case ValueIndex::kParsedRepeatedField: | 616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 617 | 274 | case ValueIndex::kCustomList: | 618 | 274 | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 619 | 0 | case ValueIndex::kLegacyMap: | 620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 621 | 0 | case ValueIndex::kParsedJsonMap: | 622 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 623 | 0 | case ValueIndex::kParsedMapField: | 624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 625 | 0 | case ValueIndex::kCustomMap: | 626 | 0 | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 627 | 0 | case ValueIndex::kLegacyStruct: | 628 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 629 | 0 | case ValueIndex::kParsedMessage: | 630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 631 | 0 | case ValueIndex::kCustomStruct: | 632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 633 | 0 | case ValueIndex::kOpaque: | 634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 635 | 0 | case ValueIndex::kBytes: | 636 | 0 | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 637 | 0 | case ValueIndex::kString: | 638 | 0 | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 639 | 0 | case ValueIndex::kError: | 640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 641 | 0 | case ValueIndex::kUnknown: | 642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 643 | 2.16k | } | 644 | 2.16k | } |
value.cc:decltype(auto) cel::common_internal::ValueVariant::Visit<cel::Value::DebugString() const::$_0>(cel::Value::DebugString() const::$_0&&) const & Line | Count | Source | 593 | 412k | decltype(auto) Visit(Visitor&& visitor) const& { | 594 | 412k | switch (index_) { | 595 | 0 | case ValueIndex::kNull: | 596 | 0 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 597 | 1.56k | case ValueIndex::kBool: | 598 | 1.56k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 599 | 339k | case ValueIndex::kInt: | 600 | 339k | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 601 | 301 | case ValueIndex::kUint: | 602 | 301 | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 603 | 27.6k | case ValueIndex::kDouble: | 604 | 27.6k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 605 | 0 | case ValueIndex::kDuration: | 606 | 0 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 607 | 0 | case ValueIndex::kTimestamp: | 608 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 609 | 0 | case ValueIndex::kType: | 610 | 0 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 611 | 0 | case ValueIndex::kLegacyList: | 612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 613 | 0 | case ValueIndex::kParsedJsonList: | 614 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 615 | 0 | case ValueIndex::kParsedRepeatedField: | 616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 617 | 0 | case ValueIndex::kCustomList: | 618 | 0 | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 619 | 0 | case ValueIndex::kLegacyMap: | 620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 621 | 0 | case ValueIndex::kParsedJsonMap: | 622 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 623 | 0 | case ValueIndex::kParsedMapField: | 624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 625 | 0 | case ValueIndex::kCustomMap: | 626 | 0 | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 627 | 0 | case ValueIndex::kLegacyStruct: | 628 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 629 | 0 | case ValueIndex::kParsedMessage: | 630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 631 | 0 | case ValueIndex::kCustomStruct: | 632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 633 | 0 | case ValueIndex::kOpaque: | 634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 635 | 0 | case ValueIndex::kBytes: | 636 | 0 | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 637 | 43.3k | case ValueIndex::kString: | 638 | 43.3k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 639 | 0 | case ValueIndex::kError: | 640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 641 | 0 | case ValueIndex::kUnknown: | 642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 643 | 412k | } | 644 | 412k | } |
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 | 593 | 8.98M | decltype(auto) Visit(Visitor&& visitor) const& { | 594 | 8.98M | switch (index_) { | 595 | 986 | case ValueIndex::kNull: | 596 | 986 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 597 | 382k | case ValueIndex::kBool: | 598 | 382k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 599 | 8.47M | case ValueIndex::kInt: | 600 | 8.47M | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 601 | 25.3k | case ValueIndex::kUint: | 602 | 25.3k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 603 | 53.1k | case ValueIndex::kDouble: | 604 | 53.1k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 605 | 9.30k | case ValueIndex::kDuration: | 606 | 9.30k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 607 | 0 | case ValueIndex::kTimestamp: | 608 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 609 | 32 | case ValueIndex::kType: | 610 | 32 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 611 | 0 | case ValueIndex::kLegacyList: | 612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 613 | 348 | case ValueIndex::kParsedJsonList: | 614 | 348 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 615 | 0 | case ValueIndex::kParsedRepeatedField: | 616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 617 | 1.29k | case ValueIndex::kCustomList: | 618 | 1.29k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 619 | 0 | case ValueIndex::kLegacyMap: | 620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 621 | 0 | case ValueIndex::kParsedJsonMap: | 622 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 623 | 0 | case ValueIndex::kParsedMapField: | 624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 625 | 21.6k | case ValueIndex::kCustomMap: | 626 | 21.6k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 627 | 144 | case ValueIndex::kLegacyStruct: | 628 | 144 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 629 | 0 | case ValueIndex::kParsedMessage: | 630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 631 | 0 | case ValueIndex::kCustomStruct: | 632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 633 | 0 | case ValueIndex::kOpaque: | 634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 635 | 4.48k | case ValueIndex::kBytes: | 636 | 4.48k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 637 | 8.76k | case ValueIndex::kString: | 638 | 8.76k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 639 | 0 | case ValueIndex::kError: | 640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 641 | 0 | case ValueIndex::kUnknown: | 642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 643 | 8.98M | } | 644 | 8.98M | } |
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 | 593 | 367k | decltype(auto) Visit(Visitor&& visitor) const& { | 594 | 367k | switch (index_) { | 595 | 0 | case ValueIndex::kNull: | 596 | 0 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 597 | 4 | case ValueIndex::kBool: | 598 | 4 | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 599 | 5 | case ValueIndex::kInt: | 600 | 5 | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 601 | 1 | case ValueIndex::kUint: | 602 | 1 | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 603 | 2 | case ValueIndex::kDouble: | 604 | 2 | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 605 | 0 | case ValueIndex::kDuration: | 606 | 0 | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 607 | 0 | case ValueIndex::kTimestamp: | 608 | 0 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 609 | 1 | case ValueIndex::kType: | 610 | 1 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 611 | 0 | case ValueIndex::kLegacyList: | 612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 613 | 0 | case ValueIndex::kParsedJsonList: | 614 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 615 | 0 | case ValueIndex::kParsedRepeatedField: | 616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 617 | 367k | case ValueIndex::kCustomList: | 618 | 367k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 619 | 0 | case ValueIndex::kLegacyMap: | 620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 621 | 0 | case ValueIndex::kParsedJsonMap: | 622 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 623 | 0 | case ValueIndex::kParsedMapField: | 624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 625 | 0 | case ValueIndex::kCustomMap: | 626 | 0 | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 627 | 0 | case ValueIndex::kLegacyStruct: | 628 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 629 | 0 | case ValueIndex::kParsedMessage: | 630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 631 | 0 | case ValueIndex::kCustomStruct: | 632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 633 | 0 | case ValueIndex::kOpaque: | 634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 635 | 0 | case ValueIndex::kBytes: | 636 | 0 | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 637 | 3 | case ValueIndex::kString: | 638 | 3 | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 639 | 0 | case ValueIndex::kError: | 640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 641 | 0 | case ValueIndex::kUnknown: | 642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 643 | 367k | } | 644 | 367k | } |
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 | 593 | 435k | decltype(auto) Visit(Visitor&& visitor) const& { | 594 | 435k | switch (index_) { | 595 | 530 | case ValueIndex::kNull: | 596 | 530 | return std::forward<Visitor>(visitor)(Get<NullValue>()); | 597 | 35.9k | case ValueIndex::kBool: | 598 | 35.9k | return std::forward<Visitor>(visitor)(Get<BoolValue>()); | 599 | 20.3k | case ValueIndex::kInt: | 600 | 20.3k | return std::forward<Visitor>(visitor)(Get<IntValue>()); | 601 | 234k | case ValueIndex::kUint: | 602 | 234k | return std::forward<Visitor>(visitor)(Get<UintValue>()); | 603 | 3.70k | case ValueIndex::kDouble: | 604 | 3.70k | return std::forward<Visitor>(visitor)(Get<DoubleValue>()); | 605 | 13.3k | case ValueIndex::kDuration: | 606 | 13.3k | return std::forward<Visitor>(visitor)(Get<DurationValue>()); | 607 | 221 | case ValueIndex::kTimestamp: | 608 | 221 | return std::forward<Visitor>(visitor)(Get<TimestampValue>()); | 609 | 444 | case ValueIndex::kType: | 610 | 444 | return std::forward<Visitor>(visitor)(Get<TypeValue>()); | 611 | 0 | case ValueIndex::kLegacyList: | 612 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyListValue>()); | 613 | 1.03k | case ValueIndex::kParsedJsonList: | 614 | 1.03k | return std::forward<Visitor>(visitor)(Get<ParsedJsonListValue>()); | 615 | 0 | case ValueIndex::kParsedRepeatedField: | 616 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedRepeatedFieldValue>()); | 617 | 41.1k | case ValueIndex::kCustomList: | 618 | 41.1k | return std::forward<Visitor>(visitor)(Get<CustomListValue>()); | 619 | 0 | case ValueIndex::kLegacyMap: | 620 | 0 | return std::forward<Visitor>(visitor)(Get<LegacyMapValue>()); | 621 | 869 | case ValueIndex::kParsedJsonMap: | 622 | 869 | return std::forward<Visitor>(visitor)(Get<ParsedJsonMapValue>()); | 623 | 0 | case ValueIndex::kParsedMapField: | 624 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMapFieldValue>()); | 625 | 36.1k | case ValueIndex::kCustomMap: | 626 | 36.1k | return std::forward<Visitor>(visitor)(Get<CustomMapValue>()); | 627 | 20.2k | case ValueIndex::kLegacyStruct: | 628 | 20.2k | return std::forward<Visitor>(visitor)(Get<LegacyStructValue>()); | 629 | 0 | case ValueIndex::kParsedMessage: | 630 | 0 | return std::forward<Visitor>(visitor)(Get<ParsedMessageValue>()); | 631 | 0 | case ValueIndex::kCustomStruct: | 632 | 0 | return std::forward<Visitor>(visitor)(Get<CustomStructValue>()); | 633 | 0 | case ValueIndex::kOpaque: | 634 | 0 | return std::forward<Visitor>(visitor)(Get<OpaqueValue>()); | 635 | 4.90k | case ValueIndex::kBytes: | 636 | 4.90k | return std::forward<Visitor>(visitor)(Get<BytesValue>()); | 637 | 23.0k | case ValueIndex::kString: | 638 | 23.0k | return std::forward<Visitor>(visitor)(Get<StringValue>()); | 639 | 0 | case ValueIndex::kError: | 640 | 0 | return std::forward<Visitor>(visitor)(Get<ErrorValue>()); | 641 | 0 | case ValueIndex::kUnknown: | 642 | 0 | return std::forward<Visitor>(visitor)(Get<UnknownValue>()); | 643 | 435k | } | 644 | 435k | } |
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 & |
645 | | |
646 | | template <typename Visitor> |
647 | | decltype(auto) Visit(Visitor&& visitor) && { |
648 | | switch (index_) { |
649 | | case ValueIndex::kNull: |
650 | | return std::forward<Visitor>(visitor)( |
651 | | std::move(*this).Get<NullValue>()); |
652 | | case ValueIndex::kBool: |
653 | | return std::forward<Visitor>(visitor)( |
654 | | std::move(*this).Get<BoolValue>()); |
655 | | case ValueIndex::kInt: |
656 | | return std::forward<Visitor>(visitor)(std::move(*this).Get<IntValue>()); |
657 | | case ValueIndex::kUint: |
658 | | return std::forward<Visitor>(visitor)( |
659 | | std::move(*this).Get<UintValue>()); |
660 | | case ValueIndex::kDouble: |
661 | | return std::forward<Visitor>(visitor)( |
662 | | std::move(*this).Get<DoubleValue>()); |
663 | | case ValueIndex::kDuration: |
664 | | return std::forward<Visitor>(visitor)( |
665 | | std::move(*this).Get<DurationValue>()); |
666 | | case ValueIndex::kTimestamp: |
667 | | return std::forward<Visitor>(visitor)( |
668 | | std::move(*this).Get<TimestampValue>()); |
669 | | case ValueIndex::kType: |
670 | | return std::forward<Visitor>(visitor)( |
671 | | std::move(*this).Get<TypeValue>()); |
672 | | case ValueIndex::kLegacyList: |
673 | | return std::forward<Visitor>(visitor)( |
674 | | std::move(*this).Get<LegacyListValue>()); |
675 | | case ValueIndex::kParsedJsonList: |
676 | | return std::forward<Visitor>(visitor)( |
677 | | std::move(*this).Get<ParsedJsonListValue>()); |
678 | | case ValueIndex::kParsedRepeatedField: |
679 | | return std::forward<Visitor>(visitor)( |
680 | | std::move(*this).Get<ParsedRepeatedFieldValue>()); |
681 | | case ValueIndex::kCustomList: |
682 | | return std::forward<Visitor>(visitor)( |
683 | | std::move(*this).Get<CustomListValue>()); |
684 | | case ValueIndex::kLegacyMap: |
685 | | return std::forward<Visitor>(visitor)( |
686 | | std::move(*this).Get<LegacyMapValue>()); |
687 | | case ValueIndex::kParsedJsonMap: |
688 | | return std::forward<Visitor>(visitor)( |
689 | | std::move(*this).Get<ParsedJsonMapValue>()); |
690 | | case ValueIndex::kParsedMapField: |
691 | | return std::forward<Visitor>(visitor)( |
692 | | std::move(*this).Get<ParsedMapFieldValue>()); |
693 | | case ValueIndex::kCustomMap: |
694 | | return std::forward<Visitor>(visitor)( |
695 | | std::move(*this).Get<CustomMapValue>()); |
696 | | case ValueIndex::kLegacyStruct: |
697 | | return std::forward<Visitor>(visitor)( |
698 | | std::move(*this).Get<LegacyStructValue>()); |
699 | | case ValueIndex::kParsedMessage: |
700 | | return std::forward<Visitor>(visitor)( |
701 | | std::move(*this).Get<ParsedMessageValue>()); |
702 | | case ValueIndex::kCustomStruct: |
703 | | return std::forward<Visitor>(visitor)( |
704 | | std::move(*this).Get<CustomStructValue>()); |
705 | | case ValueIndex::kOpaque: |
706 | | return std::forward<Visitor>(visitor)( |
707 | | std::move(*this).Get<OpaqueValue>()); |
708 | | case ValueIndex::kBytes: |
709 | | return std::forward<Visitor>(visitor)( |
710 | | std::move(*this).Get<BytesValue>()); |
711 | | case ValueIndex::kString: |
712 | | return std::forward<Visitor>(visitor)( |
713 | | std::move(*this).Get<StringValue>()); |
714 | | case ValueIndex::kError: |
715 | | return std::forward<Visitor>(visitor)( |
716 | | std::move(*this).Get<ErrorValue>()); |
717 | | case ValueIndex::kUnknown: |
718 | | return std::forward<Visitor>(visitor)( |
719 | | std::move(*this).Get<UnknownValue>()); |
720 | | } |
721 | | } |
722 | | |
723 | | template <typename Visitor> |
724 | | ABSL_ATTRIBUTE_ALWAYS_INLINE decltype(auto) Visit(Visitor&& visitor) const&& { |
725 | | return Visit(std::forward<Visitor>(visitor)); |
726 | | } |
727 | | |
728 | 191k | friend void swap(ValueVariant& lhs, ValueVariant& rhs) noexcept { |
729 | 191k | if (&lhs != &rhs) { |
730 | 191k | const bool lhs_trivial = |
731 | 191k | (lhs.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
732 | 191k | const bool rhs_trivial = |
733 | 191k | (rhs.flags_ & ValueFlags::kNonTrivial) == ValueFlags::kNone; |
734 | 191k | if (lhs_trivial && rhs_trivial) { |
735 | | // We validated the instances can be copied byte-wise at runtime, but compilers |
736 | | // warn since this is not safe in the general case. |
737 | | #if defined(__GNUC__) && !defined(__clang__) |
738 | | #pragma GCC diagnostic push |
739 | | #pragma GCC diagnostic ignored "-Wclass-memaccess" |
740 | | #elif defined(__clang__) && __clang_major__ >= 20 |
741 | | #pragma clang diagnostic push |
742 | 9.83k | #pragma clang diagnostic ignored "-Wnontrivial-memcall" |
743 | 9.83k | #endif |
744 | 9.83k | alignas(ValueVariant) std::byte tmp[sizeof(ValueVariant)]; |
745 | | // NOLINTNEXTLINE(bugprone-undefined-memory-manipulation) |
746 | 9.83k | std::memcpy(tmp, std::addressof(lhs), sizeof(ValueVariant)); |
747 | | // NOLINTNEXTLINE(bugprone-undefined-memory-manipulation) |
748 | 9.83k | std::memcpy(std::addressof(lhs), std::addressof(rhs), |
749 | 9.83k | sizeof(ValueVariant)); |
750 | | // NOLINTNEXTLINE(bugprone-undefined-memory-manipulation) |
751 | 9.83k | std::memcpy(std::addressof(rhs), tmp, sizeof(ValueVariant)); |
752 | | #if defined(__GNUC__) && !defined(__clang__) |
753 | | #pragma GCC diagnostic pop |
754 | | #elif defined(__clang__) && __clang_major__ >= 20 |
755 | | #pragma clang diagnostic pop |
756 | 9.83k | #endif |
757 | 182k | } else { |
758 | 182k | SlowSwap(lhs, rhs, lhs_trivial, rhs_trivial); |
759 | 182k | } |
760 | 191k | } |
761 | 191k | } |
762 | | |
763 | | private: |
764 | | friend struct cel::ArenaTraits<ValueVariant>; |
765 | | |
766 | | template <typename T> |
767 | | ABSL_ATTRIBUTE_ALWAYS_INLINE T* absl_nonnull At() |
768 | 63.3M | ABSL_ATTRIBUTE_LIFETIME_BOUND { |
769 | 63.3M | static_assert(alignof(T) <= kValueVariantAlign); |
770 | 63.3M | static_assert(sizeof(T) <= kValueVariantSize); |
771 | | |
772 | 63.3M | return std::launder(reinterpret_cast<T*>(&raw_[0])); |
773 | 63.3M | } cel::ErrorValue* cel::common_internal::ValueVariant::At<cel::ErrorValue>() Line | Count | Source | 768 | 61.8M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 769 | 61.8M | static_assert(alignof(T) <= kValueVariantAlign); | 770 | 61.8M | static_assert(sizeof(T) <= kValueVariantSize); | 771 | | | 772 | 61.8M | return std::launder(reinterpret_cast<T*>(&raw_[0])); | 773 | 61.8M | } |
Unexecuted instantiation: cel::UnknownValue* cel::common_internal::ValueVariant::At<cel::UnknownValue>() cel::StringValue* cel::common_internal::ValueVariant::At<cel::StringValue>() Line | Count | Source | 768 | 1.46M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 769 | 1.46M | static_assert(alignof(T) <= kValueVariantAlign); | 770 | 1.46M | static_assert(sizeof(T) <= kValueVariantSize); | 771 | | | 772 | 1.46M | return std::launder(reinterpret_cast<T*>(&raw_[0])); | 773 | 1.46M | } |
cel::BytesValue* cel::common_internal::ValueVariant::At<cel::BytesValue>() Line | Count | Source | 768 | 92.1k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 769 | 92.1k | static_assert(alignof(T) <= kValueVariantAlign); | 770 | 92.1k | static_assert(sizeof(T) <= kValueVariantSize); | 771 | | | 772 | 92.1k | return std::launder(reinterpret_cast<T*>(&raw_[0])); | 773 | 92.1k | } |
Unexecuted instantiation: cel::common_internal::LegacyListValue* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyListValue>() Unexecuted instantiation: cel::CustomListValue* cel::common_internal::ValueVariant::At<cel::CustomListValue>() Unexecuted instantiation: cel::ParsedRepeatedFieldValue* cel::common_internal::ValueVariant::At<cel::ParsedRepeatedFieldValue>() Unexecuted instantiation: cel::ParsedJsonListValue* cel::common_internal::ValueVariant::At<cel::ParsedJsonListValue>() Unexecuted instantiation: cel::common_internal::LegacyMapValue* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyMapValue>() 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::ParsedJsonMapValue* cel::common_internal::ValueVariant::At<cel::ParsedJsonMapValue>() 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::CustomStructValue* cel::common_internal::ValueVariant::At<cel::CustomStructValue>() Unexecuted instantiation: cel::common_internal::LegacyStructValue* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyStructValue>() Unexecuted instantiation: cel::TypeValue* cel::common_internal::ValueVariant::At<cel::TypeValue>() |
774 | | |
775 | | template <typename T> |
776 | | ABSL_ATTRIBUTE_ALWAYS_INLINE const T* absl_nonnull At() const |
777 | 45.3M | ABSL_ATTRIBUTE_LIFETIME_BOUND { |
778 | 45.3M | static_assert(alignof(T) <= kValueVariantAlign); |
779 | 45.3M | static_assert(sizeof(T) <= kValueVariantSize); |
780 | | |
781 | 45.3M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); |
782 | 45.3M | } 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 | 777 | 3.14M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 3.14M | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 3.14M | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 3.14M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 3.14M | } |
cel::NullValue const* cel::common_internal::ValueVariant::At<cel::NullValue>() const Line | Count | Source | 777 | 4.50k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 4.50k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 4.50k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 4.50k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 4.50k | } |
cel::IntValue const* cel::common_internal::ValueVariant::At<cel::IntValue>() const Line | Count | Source | 777 | 25.8M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 25.8M | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 25.8M | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 25.8M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 25.8M | } |
cel::UintValue const* cel::common_internal::ValueVariant::At<cel::UintValue>() const Line | Count | Source | 777 | 662k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 662k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 662k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 662k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 662k | } |
cel::DoubleValue const* cel::common_internal::ValueVariant::At<cel::DoubleValue>() const Line | Count | Source | 777 | 953k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 953k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 953k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 953k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 953k | } |
cel::DurationValue const* cel::common_internal::ValueVariant::At<cel::DurationValue>() const Line | Count | Source | 777 | 73.0k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 73.0k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 73.0k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 73.0k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 73.0k | } |
cel::TimestampValue const* cel::common_internal::ValueVariant::At<cel::TimestampValue>() const Line | Count | Source | 777 | 4.58k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 4.58k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 4.58k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 4.58k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 4.58k | } |
cel::TypeValue const* cel::common_internal::ValueVariant::At<cel::TypeValue>() const Line | Count | Source | 777 | 20.6k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 20.6k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 20.6k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 20.6k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 20.6k | } |
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 | 777 | 76.6k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 76.6k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 76.6k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 76.6k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 76.6k | } |
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 | 777 | 3.04M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 3.04M | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 3.04M | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 3.04M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 3.04M | } |
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 | 777 | 4.74k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 4.74k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 4.74k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 4.74k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 4.74k | } |
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 | 777 | 803k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 803k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 803k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 803k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 803k | } |
cel::common_internal::LegacyStructValue const* cel::common_internal::ValueVariant::At<cel::common_internal::LegacyStructValue>() const Line | Count | Source | 777 | 256k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 256k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 256k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 256k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 256k | } |
cel::ParsedMessageValue const* cel::common_internal::ValueVariant::At<cel::ParsedMessageValue>() const Line | Count | Source | 777 | 266k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 266k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 266k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 266k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 266k | } |
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 | 777 | 72.9k | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 72.9k | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 72.9k | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 72.9k | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 72.9k | } |
cel::StringValue const* cel::common_internal::ValueVariant::At<cel::StringValue>() const Line | Count | Source | 777 | 1.45M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 1.45M | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 1.45M | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 1.45M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 1.45M | } |
cel::ErrorValue const* cel::common_internal::ValueVariant::At<cel::ErrorValue>() const Line | Count | Source | 777 | 8.67M | ABSL_ATTRIBUTE_LIFETIME_BOUND { | 778 | 8.67M | static_assert(alignof(T) <= kValueVariantAlign); | 779 | 8.67M | static_assert(sizeof(T) <= kValueVariantSize); | 780 | | | 781 | 8.67M | return std::launder(reinterpret_cast<const T*>(&raw_[0])); | 782 | 8.67M | } |
Unexecuted instantiation: cel::UnknownValue const* cel::common_internal::ValueVariant::At<cel::UnknownValue>() const |
783 | | |
784 | | ABSL_ATTRIBUTE_ALWAYS_INLINE void FastCopyAssign( |
785 | 14.0M | const ValueVariant& other) noexcept { |
786 | 14.0M | index_ = other.index_; |
787 | 14.0M | kind_ = other.kind_; |
788 | 14.0M | flags_ = other.flags_; |
789 | 14.0M | std::memcpy(raw_, other.raw_, sizeof(raw_)); |
790 | 14.0M | } |
791 | | |
792 | | ABSL_ATTRIBUTE_ALWAYS_INLINE void FastMoveAssign( |
793 | 7.36M | ValueVariant& other) noexcept { |
794 | 7.36M | FastCopyAssign(other); |
795 | 7.36M | } |
796 | | |
797 | | void SlowCopyConstruct(const ValueVariant& other) noexcept; |
798 | | |
799 | | void SlowMoveConstruct(ValueVariant& other) noexcept; |
800 | | |
801 | | void SlowDestruct() noexcept; |
802 | | |
803 | | void SlowCopyAssign(const ValueVariant& other, bool trivial, |
804 | | bool other_trivial) noexcept; |
805 | | |
806 | | void SlowMoveAssign(ValueVariant& other, bool ntrivial, |
807 | | bool other_trivial) noexcept; |
808 | | |
809 | | static void SlowSwap(ValueVariant& lhs, ValueVariant& rhs, bool lhs_trivial, |
810 | | bool rhs_trivial) noexcept; |
811 | | |
812 | | ValueIndex index_ = ValueIndex::kNull; |
813 | | ValueKind kind_ = ValueKind::kNull; |
814 | | ValueFlags flags_ = ValueFlags::kNone; |
815 | | alignas(kValueVariantAlign) std::byte raw_[kValueVariantSize]; |
816 | | }; |
817 | | |
818 | | } // namespace common_internal |
819 | | |
820 | | template <> |
821 | | struct ArenaTraits<common_internal::ValueVariant> { |
822 | | static bool trivially_destructible( |
823 | 0 | const common_internal::ValueVariant& value) { |
824 | 0 | return (value.flags_ & common_internal::ValueFlags::kNonTrivial) == |
825 | 0 | common_internal::ValueFlags::kNone; |
826 | 0 | } |
827 | | }; |
828 | | |
829 | | } // namespace cel |
830 | | |
831 | | #endif // THIRD_PARTY_CEL_CPP_COMMON_VALUES_VALUE_VARIANT_H_ |