Auto-generate files after cl/970750490
diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 2cbba81..48a4310 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake
@@ -23,7 +23,7 @@ set(rules_kotlin-version "2.3.20") set(rules_license-version "1.0.0") set(rules_pkg-version "1.0.1") -set(rules_python-version "1.6.0") +set(rules_python-version "2.3.0") set(rules_rust-version "0.69.0") set(rules_ruby-version "0.20.1") set(rules_fuzzing-version "0.5.3")
diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index 4024303..1ca1ab2 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c
@@ -495,7 +495,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -514,7 +514,11 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED +#if UPB_FASTTABLE_SUPPORTED +#define UPB_FASTTABLE 1 +#else +#define UPB_FASTTABLE 0 +#endif #else #define UPB_FASTTABLE 0 #endif @@ -568,6 +572,12 @@ #define UPB_RETAIN #endif +#if defined(__GNUC__) || defined(__clang__) +#define UPB_HIDDEN __attribute__((visibility("hidden"))) +#else +#define UPB_HIDDEN +#endif + // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -621,7 +631,7 @@ #elif defined(__MACH__) -/* As described in: https://stackoverflow.com/a/22366882 */ + /* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -640,10 +650,10 @@ #elif defined(_MSC_VER) -/* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ + /* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -652,7 +662,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) -// clang-format off + // clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -663,13 +673,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} -// clang-format on + // clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else -// Linker arrays are not supported on this platform. Make macros no-ops. + // Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -9207,6 +9217,25 @@ } } +bool upb_Message_NextSerializableField(const upb_Message* msg, + const upb_MiniTable* mt, + const upb_MiniTableField** f, + uintptr_t* iter) { + const size_t field_count = upb_MiniTable_FieldCount(mt); + uintptr_t i = *iter; + while (i < field_count) { + const upb_MiniTableField* field = upb_MiniTable_GetFieldByIndex(mt, i); + if (UPB_PRIVATE(_upb_Message_FieldIsSet)(msg, field)) { + *f = field; + *iter = i + 1; + return true; + } + i++; + } + *iter = i; + return false; +} + #include <stddef.h> #include <stdint.h> @@ -9591,7 +9620,7 @@ if (!(options & kUpb_CompareOption_IncludeUnknownFields)) return true; // The wire encoder enforces a maximum depth of 100 so we match that here. - return UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)(msg1, msg2, 100) == + return _upb_Message_UnknownFieldsAreEqual(msg1, msg2, 100) == kUpb_UnknownCompareResult_Equal; } @@ -9654,10 +9683,17 @@ upb_UnknownField** ptr, upb_UnknownField** end) { size_t old = (*ptr - *base); - size_t new = UPB_MAX(4, old * 2); + size_t new; + if (upb_MulOverflow((uint32_t)2, old, &new)) { + upb_UnknownFields_OutOfMemory(ctx); + } + new = UPB_MAX(4, new); + size_t new_bytes; + if (upb_MulOverflow(new, sizeof(**base), &new_bytes)) { + upb_UnknownFields_OutOfMemory(ctx); + } - *base = upb_Arena_Realloc(ctx->arena, *base, old * sizeof(**base), - new * sizeof(**base)); + *base = upb_Arena_Realloc(ctx->arena, *base, old * sizeof(**base), new_bytes); if (!*base) upb_UnknownFields_OutOfMemory(ctx); *ptr = *base + old; @@ -9705,11 +9741,25 @@ static void upb_UnknownFields_Sort(upb_UnknownField_Context* ctx, upb_UnknownFields* fields) { if (ctx->tmp_size < fields->size) { - const int oldsize = ctx->tmp_size * sizeof(*ctx->tmp); + size_t oldsize; + if (upb_MulOverflow(sizeof(*ctx->tmp), ctx->tmp_size, &oldsize)) { + upb_UnknownFields_OutOfMemory(ctx); + } ctx->tmp_size = UPB_MAX(8, ctx->tmp_size); - while (ctx->tmp_size < fields->size) ctx->tmp_size *= 2; - const int newsize = ctx->tmp_size * sizeof(*ctx->tmp); - ctx->tmp = upb_grealloc(ctx->tmp, oldsize, newsize); + while (ctx->tmp_size < fields->size) { + if (upb_MulOverflow((uint32_t)2, ctx->tmp_size, &ctx->tmp_size)) { + upb_UnknownFields_OutOfMemory(ctx); + } + } + size_t newsize; + if (upb_MulOverflow(ctx->tmp_size, sizeof(*ctx->tmp), &newsize)) { + upb_UnknownFields_OutOfMemory(ctx); + } + upb_UnknownField* tmp = upb_grealloc(ctx->tmp, oldsize, newsize); + if (!tmp) { + upb_UnknownFields_OutOfMemory(ctx); + } + ctx->tmp = tmp; } upb_UnknownFields_SortRecursive(fields->fields, 0, fields->size, ctx->tmp); } @@ -9953,7 +10003,7 @@ return ret; } -upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)( +upb_UnknownCompareResult _upb_Message_UnknownFieldsAreEqual( const upb_Message* msg1, const upb_Message* msg2, int max_depth) { bool msg1_empty = !upb_Message_HasUnknown(msg1); bool msg2_empty = !upb_Message_HasUnknown(msg2); @@ -10316,6 +10366,7 @@ // so we don't want to unnecessarily have the bad API or bloat the passed-in // arena with this very-short-term allocation. upb_Arena* encode_arena = upb_Arena_New(); + if (!encode_arena) return false; upb_EncodeStatus e_status = upb_Encode(src, mt, 0, encode_arena, &buf, &size); if (e_status != kUpb_EncodeStatus_Ok) { upb_Arena_Free(encode_arena); @@ -15266,7 +15317,12 @@ } else { // Remove components from base until we find an entry or run out. size_t baselen = base ? strlen(base) : 0; - char* tmp = upb_gmalloc(sym.size + baselen + 1); + size_t alloc_size; + if (upb_AddOverflow(sym.size, baselen + 1, &alloc_size)) { + _upb_DefBuilder_OomErr(ctx); + } + char* tmp = upb_gmalloc(alloc_size); + if (!tmp) _upb_DefBuilder_OomErr(ctx); while (1) { char* p = tmp; if (baselen) { @@ -19201,40 +19257,7 @@ static bool encode_shouldencode(const upb_Message* msg, const upb_MiniTableField* f) { - if (f->presence == 0) { - // Proto3 presence or map/array. - const void* mem = UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), void); - switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { - case kUpb_FieldRep_1Byte: { - char ch; - memcpy(&ch, mem, 1); - return ch != 0; - } - case kUpb_FieldRep_4Byte: { - uint32_t u32; - memcpy(&u32, mem, 4); - return u32 != 0; - } - case kUpb_FieldRep_8Byte: { - uint64_t u64; - memcpy(&u64, mem, 8); - return u64 != 0; - } - case kUpb_FieldRep_StringView: { - const upb_StringView* str = (const upb_StringView*)mem; - return str->size != 0; - } - default: - UPB_UNREACHABLE(); - } - } else if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { - // Proto2 presence: hasbit. - return UPB_PRIVATE(_upb_Message_GetHasbit)(msg, f); - } else { - // Field is in a oneof. - return UPB_PRIVATE(_upb_Message_GetOneofCase)(msg, f) == - upb_MiniTableField_Number(f); - } + return UPB_PRIVATE(_upb_Message_FieldIsSet)(msg, f); } static char* encode_field(char* ptr, upb_encstate* e, const upb_Message* msg, @@ -19644,3 +19667,5 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR +#undef UPB_RETAIN +#undef UPB_HIDDEN
diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index b96d839..cbd4c83 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h
@@ -494,7 +494,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -513,7 +513,11 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED +#if UPB_FASTTABLE_SUPPORTED +#define UPB_FASTTABLE 1 +#else +#define UPB_FASTTABLE 0 +#endif #else #define UPB_FASTTABLE 0 #endif @@ -567,6 +571,12 @@ #define UPB_RETAIN #endif +#if defined(__GNUC__) || defined(__clang__) +#define UPB_HIDDEN __attribute__((visibility("hidden"))) +#else +#define UPB_HIDDEN +#endif + // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -620,7 +630,7 @@ #elif defined(__MACH__) -/* As described in: https://stackoverflow.com/a/22366882 */ + /* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -639,10 +649,10 @@ #elif defined(_MSC_VER) -/* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ + /* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -651,7 +661,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) -// clang-format off + // clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -662,13 +672,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} -// clang-format on + // clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else -// Linker arrays are not supported on this platform. Make macros no-ops. + // Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -5038,6 +5048,9 @@ const upb_MiniTable* sub_mini_table = upb_MiniTable_SubMessage(f); UPB_ASSERT(sub_mini_table); sub_message = _upb_Message_New(sub_mini_table, arena); + if (!sub_message) { + return NULL; + } *UPB_PTR_AT(msg, f->UPB_ONLYBITS(offset), struct upb_Message*) = sub_message; UPB_PRIVATE(_upb_Message_SetPresence)(msg, f); @@ -5045,6 +5058,44 @@ return sub_message; } +UPB_INLINE bool UPB_PRIVATE(_upb_Message_FieldIsSet)( + const struct upb_Message* msg, const upb_MiniTableField* f) { + if (f->presence == 0) { + // Proto3 presence or map/array. + const void* mem = UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), void); + switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { + case kUpb_FieldRep_1Byte: { + char ch; + memcpy(&ch, mem, 1); + return ch != 0; + } + case kUpb_FieldRep_4Byte: { + uint32_t u32; + memcpy(&u32, mem, 4); + return u32 != 0; + } + case kUpb_FieldRep_8Byte: { + uint64_t u64; + memcpy(&u64, mem, 8); + return u64 != 0; + } + case kUpb_FieldRep_StringView: { + const upb_StringView* str = (const upb_StringView*)mem; + return str->size != 0; + } + default: + UPB_UNREACHABLE(); + } + } else if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { + // Proto2 presence: hasbit. + return UPB_PRIVATE(_upb_Message_GetHasbit)(msg, f); + } else { + // Field is in a oneof. + return UPB_PRIVATE(_upb_Message_GetOneofCase)(msg, f) == + upb_MiniTableField_Number(f); + } +} + UPB_API_INLINE upb_StringView upb_Message_GetString(const struct upb_Message* msg, const upb_MiniTableField* f, upb_StringView default_val) { @@ -5770,6 +5821,29 @@ const struct upb_Message* msg, const upb_MiniTableExtension** out_e, upb_MessageValue* out_v, uintptr_t* iter); +#define kUpb_Message_SerializableFieldBegin 0 + +// Iterates over all fields in the message that are set/present. +// +// NOTE: Unset/NULL repeated fields and maps are not considered set and will be +// ignored. However, allocated repeated fields and maps (non-NULL pointer) with +// zero elements are considered set/present and will be returned by this +// iterator. Callers that need to skip empty collections should check their +// sizes explicitly. +// +// To start iterating, set `iter = kUpb_Message_SerializableFieldBegin`. +// Returns true if a serializable field was found, sets `*f` to that field, +// and updates `*iter`. Returns false when iteration is complete. +// +// const upb_MiniTableField* f; +// uintptr_t iter = kUpb_Message_SerializableFieldBegin; +// while (upb_Message_NextSerializableField(msg, mt, &f, &iter)) { +// // ... +// } +UPB_NODISCARD UPB_API bool upb_Message_NextSerializableField( + const upb_Message* msg, const upb_MiniTable* mt, + const upb_MiniTableField** f, uintptr_t* iter); + // Mark a message and all of its descendents as frozen/immutable. UPB_API void upb_Message_Freeze(upb_Message* msg, const upb_MiniTable* m); @@ -17887,7 +17961,7 @@ kUpb_UnknownCompareResult_MaxDepthExceeded = 3, } upb_UnknownCompareResult; -upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)( +upb_UnknownCompareResult _upb_Message_UnknownFieldsAreEqual( const upb_Message* msg1, const upb_Message* msg2, int max_depth); #ifdef __cplusplus @@ -19724,3 +19798,5 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR +#undef UPB_RETAIN +#undef UPB_HIDDEN
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index e5766f5..9e81b6f 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c
@@ -495,7 +495,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -514,7 +514,11 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED +#if UPB_FASTTABLE_SUPPORTED +#define UPB_FASTTABLE 1 +#else +#define UPB_FASTTABLE 0 +#endif #else #define UPB_FASTTABLE 0 #endif @@ -568,6 +572,12 @@ #define UPB_RETAIN #endif +#if defined(__GNUC__) || defined(__clang__) +#define UPB_HIDDEN __attribute__((visibility("hidden"))) +#else +#define UPB_HIDDEN +#endif + // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -621,7 +631,7 @@ #elif defined(__MACH__) -/* As described in: https://stackoverflow.com/a/22366882 */ + /* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -640,10 +650,10 @@ #elif defined(_MSC_VER) -/* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ + /* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -652,7 +662,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) -// clang-format off + // clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -663,13 +673,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} -// clang-format on + // clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else -// Linker arrays are not supported on this platform. Make macros no-ops. + // Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -7960,6 +7970,25 @@ } } +bool upb_Message_NextSerializableField(const upb_Message* msg, + const upb_MiniTable* mt, + const upb_MiniTableField** f, + uintptr_t* iter) { + const size_t field_count = upb_MiniTable_FieldCount(mt); + uintptr_t i = *iter; + while (i < field_count) { + const upb_MiniTableField* field = upb_MiniTable_GetFieldByIndex(mt, i); + if (UPB_PRIVATE(_upb_Message_FieldIsSet)(msg, field)) { + *f = field; + *iter = i + 1; + return true; + } + i++; + } + *iter = i; + return false; +} + #include <stddef.h> #include <stdint.h> @@ -8344,7 +8373,7 @@ if (!(options & kUpb_CompareOption_IncludeUnknownFields)) return true; // The wire encoder enforces a maximum depth of 100 so we match that here. - return UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)(msg1, msg2, 100) == + return _upb_Message_UnknownFieldsAreEqual(msg1, msg2, 100) == kUpb_UnknownCompareResult_Equal; } @@ -8407,10 +8436,17 @@ upb_UnknownField** ptr, upb_UnknownField** end) { size_t old = (*ptr - *base); - size_t new = UPB_MAX(4, old * 2); + size_t new; + if (upb_MulOverflow((uint32_t)2, old, &new)) { + upb_UnknownFields_OutOfMemory(ctx); + } + new = UPB_MAX(4, new); + size_t new_bytes; + if (upb_MulOverflow(new, sizeof(**base), &new_bytes)) { + upb_UnknownFields_OutOfMemory(ctx); + } - *base = upb_Arena_Realloc(ctx->arena, *base, old * sizeof(**base), - new * sizeof(**base)); + *base = upb_Arena_Realloc(ctx->arena, *base, old * sizeof(**base), new_bytes); if (!*base) upb_UnknownFields_OutOfMemory(ctx); *ptr = *base + old; @@ -8458,11 +8494,25 @@ static void upb_UnknownFields_Sort(upb_UnknownField_Context* ctx, upb_UnknownFields* fields) { if (ctx->tmp_size < fields->size) { - const int oldsize = ctx->tmp_size * sizeof(*ctx->tmp); + size_t oldsize; + if (upb_MulOverflow(sizeof(*ctx->tmp), ctx->tmp_size, &oldsize)) { + upb_UnknownFields_OutOfMemory(ctx); + } ctx->tmp_size = UPB_MAX(8, ctx->tmp_size); - while (ctx->tmp_size < fields->size) ctx->tmp_size *= 2; - const int newsize = ctx->tmp_size * sizeof(*ctx->tmp); - ctx->tmp = upb_grealloc(ctx->tmp, oldsize, newsize); + while (ctx->tmp_size < fields->size) { + if (upb_MulOverflow((uint32_t)2, ctx->tmp_size, &ctx->tmp_size)) { + upb_UnknownFields_OutOfMemory(ctx); + } + } + size_t newsize; + if (upb_MulOverflow(ctx->tmp_size, sizeof(*ctx->tmp), &newsize)) { + upb_UnknownFields_OutOfMemory(ctx); + } + upb_UnknownField* tmp = upb_grealloc(ctx->tmp, oldsize, newsize); + if (!tmp) { + upb_UnknownFields_OutOfMemory(ctx); + } + ctx->tmp = tmp; } upb_UnknownFields_SortRecursive(fields->fields, 0, fields->size, ctx->tmp); } @@ -8706,7 +8756,7 @@ return ret; } -upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)( +upb_UnknownCompareResult _upb_Message_UnknownFieldsAreEqual( const upb_Message* msg1, const upb_Message* msg2, int max_depth) { bool msg1_empty = !upb_Message_HasUnknown(msg1); bool msg2_empty = !upb_Message_HasUnknown(msg2); @@ -9069,6 +9119,7 @@ // so we don't want to unnecessarily have the bad API or bloat the passed-in // arena with this very-short-term allocation. upb_Arena* encode_arena = upb_Arena_New(); + if (!encode_arena) return false; upb_EncodeStatus e_status = upb_Encode(src, mt, 0, encode_arena, &buf, &size); if (e_status != kUpb_EncodeStatus_Ok) { upb_Arena_Free(encode_arena); @@ -14019,7 +14070,12 @@ } else { // Remove components from base until we find an entry or run out. size_t baselen = base ? strlen(base) : 0; - char* tmp = upb_gmalloc(sym.size + baselen + 1); + size_t alloc_size; + if (upb_AddOverflow(sym.size, baselen + 1, &alloc_size)) { + _upb_DefBuilder_OomErr(ctx); + } + char* tmp = upb_gmalloc(alloc_size); + if (!tmp) _upb_DefBuilder_OomErr(ctx); while (1) { char* p = tmp; if (baselen) { @@ -18664,40 +18720,7 @@ static bool encode_shouldencode(const upb_Message* msg, const upb_MiniTableField* f) { - if (f->presence == 0) { - // Proto3 presence or map/array. - const void* mem = UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), void); - switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { - case kUpb_FieldRep_1Byte: { - char ch; - memcpy(&ch, mem, 1); - return ch != 0; - } - case kUpb_FieldRep_4Byte: { - uint32_t u32; - memcpy(&u32, mem, 4); - return u32 != 0; - } - case kUpb_FieldRep_8Byte: { - uint64_t u64; - memcpy(&u64, mem, 8); - return u64 != 0; - } - case kUpb_FieldRep_StringView: { - const upb_StringView* str = (const upb_StringView*)mem; - return str->size != 0; - } - default: - UPB_UNREACHABLE(); - } - } else if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { - // Proto2 presence: hasbit. - return UPB_PRIVATE(_upb_Message_GetHasbit)(msg, f); - } else { - // Field is in a oneof. - return UPB_PRIVATE(_upb_Message_GetOneofCase)(msg, f) == - upb_MiniTableField_Number(f); - } + return UPB_PRIVATE(_upb_Message_FieldIsSet)(msg, f); } static char* encode_field(char* ptr, upb_encstate* e, const upb_Message* msg, @@ -19107,3 +19130,5 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR +#undef UPB_RETAIN +#undef UPB_HIDDEN
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 4b9ecbc..6f27aee 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -494,7 +494,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -513,7 +513,11 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED +#if UPB_FASTTABLE_SUPPORTED +#define UPB_FASTTABLE 1 +#else +#define UPB_FASTTABLE 0 +#endif #else #define UPB_FASTTABLE 0 #endif @@ -567,6 +571,12 @@ #define UPB_RETAIN #endif +#if defined(__GNUC__) || defined(__clang__) +#define UPB_HIDDEN __attribute__((visibility("hidden"))) +#else +#define UPB_HIDDEN +#endif + // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -620,7 +630,7 @@ #elif defined(__MACH__) -/* As described in: https://stackoverflow.com/a/22366882 */ + /* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -639,10 +649,10 @@ #elif defined(_MSC_VER) -/* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ + /* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -651,7 +661,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) -// clang-format off + // clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -662,13 +672,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} -// clang-format on + // clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else -// Linker arrays are not supported on this platform. Make macros no-ops. + // Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -5038,6 +5048,9 @@ const upb_MiniTable* sub_mini_table = upb_MiniTable_SubMessage(f); UPB_ASSERT(sub_mini_table); sub_message = _upb_Message_New(sub_mini_table, arena); + if (!sub_message) { + return NULL; + } *UPB_PTR_AT(msg, f->UPB_ONLYBITS(offset), struct upb_Message*) = sub_message; UPB_PRIVATE(_upb_Message_SetPresence)(msg, f); @@ -5045,6 +5058,44 @@ return sub_message; } +UPB_INLINE bool UPB_PRIVATE(_upb_Message_FieldIsSet)( + const struct upb_Message* msg, const upb_MiniTableField* f) { + if (f->presence == 0) { + // Proto3 presence or map/array. + const void* mem = UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), void); + switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { + case kUpb_FieldRep_1Byte: { + char ch; + memcpy(&ch, mem, 1); + return ch != 0; + } + case kUpb_FieldRep_4Byte: { + uint32_t u32; + memcpy(&u32, mem, 4); + return u32 != 0; + } + case kUpb_FieldRep_8Byte: { + uint64_t u64; + memcpy(&u64, mem, 8); + return u64 != 0; + } + case kUpb_FieldRep_StringView: { + const upb_StringView* str = (const upb_StringView*)mem; + return str->size != 0; + } + default: + UPB_UNREACHABLE(); + } + } else if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { + // Proto2 presence: hasbit. + return UPB_PRIVATE(_upb_Message_GetHasbit)(msg, f); + } else { + // Field is in a oneof. + return UPB_PRIVATE(_upb_Message_GetOneofCase)(msg, f) == + upb_MiniTableField_Number(f); + } +} + UPB_API_INLINE upb_StringView upb_Message_GetString(const struct upb_Message* msg, const upb_MiniTableField* f, upb_StringView default_val) { @@ -5770,6 +5821,29 @@ const struct upb_Message* msg, const upb_MiniTableExtension** out_e, upb_MessageValue* out_v, uintptr_t* iter); +#define kUpb_Message_SerializableFieldBegin 0 + +// Iterates over all fields in the message that are set/present. +// +// NOTE: Unset/NULL repeated fields and maps are not considered set and will be +// ignored. However, allocated repeated fields and maps (non-NULL pointer) with +// zero elements are considered set/present and will be returned by this +// iterator. Callers that need to skip empty collections should check their +// sizes explicitly. +// +// To start iterating, set `iter = kUpb_Message_SerializableFieldBegin`. +// Returns true if a serializable field was found, sets `*f` to that field, +// and updates `*iter`. Returns false when iteration is complete. +// +// const upb_MiniTableField* f; +// uintptr_t iter = kUpb_Message_SerializableFieldBegin; +// while (upb_Message_NextSerializableField(msg, mt, &f, &iter)) { +// // ... +// } +UPB_NODISCARD UPB_API bool upb_Message_NextSerializableField( + const upb_Message* msg, const upb_MiniTable* mt, + const upb_MiniTableField** f, uintptr_t* iter); + // Mark a message and all of its descendents as frozen/immutable. UPB_API void upb_Message_Freeze(upb_Message* msg, const upb_MiniTable* m); @@ -17601,7 +17675,7 @@ kUpb_UnknownCompareResult_MaxDepthExceeded = 3, } upb_UnknownCompareResult; -upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)( +upb_UnknownCompareResult _upb_Message_UnknownFieldsAreEqual( const upb_Message* msg1, const upb_Message* msg2, int max_depth); #ifdef __cplusplus @@ -19548,3 +19622,5 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR +#undef UPB_RETAIN +#undef UPB_HIDDEN
diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index 12271b0..2d590aa 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc
@@ -43,9 +43,18 @@ using HasBits = decltype(::std::declval<Any>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Any, _impl_._has_bits_); + + static constexpr Any::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Any::ParseTableT_ Any::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Any::ParseTableT_ Any::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Any, _impl_._has_bits_), @@ -60,9 +69,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Any>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // bytes value = 2; {::_pbi::TcParser::FastBS1, @@ -111,39 +117,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Any::PlacementNew_( +inline void* PROTOBUF_NONNULL Any::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Any(arena); } -constexpr auto Any::InternalNewImpl_() { +constexpr auto Any::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Any), alignof(Any)); } -constexpr auto Any::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Any::MergeImpl, - Super_::GetNewImpl<Any>(), +constexpr auto Any::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Any::MergeImpl, + Super_::GetNewImpl<Any>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Any::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Any::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Any, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Any, _impl_._cached_size_), &file_reflection_data[0], }; } struct AnyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr AnyGlobalsTypeInternal() - : MessageGlobalsBase(Any::InternalGenerateClassData_( - _default, &Any_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Any>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Any>( GetClassData())) {} @@ -229,11 +228,11 @@ } Any::Any(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Any_globals_.GetClassData()) { + : Super_(arena, &Any_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Any) } PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_( @@ -248,7 +247,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Any& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Any_globals_.GetClassData()) { + : Super_(arena, &Any_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -267,14 +266,16 @@ : type_url_(arena), value_(arena) {} -inline void Any::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void Any::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Any& this_ = static_cast<Any&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } Any::~Any() { // @@protoc_insertion_point(destructor:google.protobuf.Any) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Any::SharedDtor(MessageLite& self) { +inline void Any::Helpers_::SharedDtor(MessageLite& self) { Any& this_ = static_cast<Any&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -291,7 +292,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Any_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Any_globals_)); - return Any_globals_.GetClassData(); + return &Any_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Any::Helpers_::Clear(MessageLite& base) { @@ -444,18 +445,23 @@ } -void Any::InternalSwap(Any* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Any::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Any* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Any& this_ = static_cast<Any&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.type_url_, &other->_impl_.type_url_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.type_url_, &other->_impl_.type_url_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.value_, &other->_impl_.value_, + arena); } ::google::protobuf::Metadata Any::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Any_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 1a176f5..2b35144 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h
@@ -71,7 +71,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Any* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Any)); } #endif @@ -92,7 +92,7 @@ inline Any& operator=(Any&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -188,7 +188,7 @@ inline void Swap(Any* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -196,7 +196,7 @@ void UnsafeArenaSwap(Any* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -247,11 +247,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Any* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Any"; } @@ -263,15 +258,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -314,23 +302,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Any) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Any* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<1, 2, 0, 36, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index be0ae8f..a108969 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc
@@ -43,9 +43,18 @@ using HasBits = decltype(::std::declval<Mixin>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Mixin, _impl_._has_bits_); + + static constexpr Mixin::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Mixin::ParseTableT_ Mixin::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Mixin::ParseTableT_ Mixin::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Mixin, _impl_._has_bits_), @@ -60,9 +69,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Mixin>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // string root = 2; {::_pbi::TcParser::FastUS1, @@ -112,39 +118,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Mixin::PlacementNew_( +inline void* PROTOBUF_NONNULL Mixin::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Mixin(arena); } -constexpr auto Mixin::InternalNewImpl_() { +constexpr auto Mixin::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Mixin), alignof(Mixin)); } -constexpr auto Mixin::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Mixin::MergeImpl, - Super_::GetNewImpl<Mixin>(), +constexpr auto Mixin::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Mixin::MergeImpl, + Super_::GetNewImpl<Mixin>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Mixin::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Mixin::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Mixin, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Mixin, _impl_._cached_size_), &file_reflection_data[2], }; } struct MixinGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr MixinGlobalsTypeInternal() - : MessageGlobalsBase(Mixin::InternalGenerateClassData_( - _default, &Mixin_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Mixin>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Mixin>( GetClassData())) {} @@ -166,9 +165,18 @@ using HasBits = decltype(::std::declval<Method>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Method, _impl_._has_bits_); + + static constexpr Method::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Method::ParseTableT_ Method::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Method::ParseTableT_ Method::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Method, _impl_._has_bits_), @@ -183,9 +191,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Method>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // string edition = 8 [deprecated = true]; {::_pbi::TcParser::FastUS1, @@ -289,39 +294,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Method::PlacementNew_( +inline void* PROTOBUF_NONNULL Method::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Method(arena); } -constexpr auto Method::InternalNewImpl_() { +constexpr auto Method::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Method), alignof(Method)); } -constexpr auto Method::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Method::MergeImpl, - Super_::GetNewImpl<Method>(), +constexpr auto Method::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Method::MergeImpl, + Super_::GetNewImpl<Method>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Method::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Method::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Method, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Method, _impl_._cached_size_), &file_reflection_data[1], }; } struct MethodGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr MethodGlobalsTypeInternal() - : MessageGlobalsBase(Method::InternalGenerateClassData_( - _default, &Method_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Method>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Method>( GetClassData())) {} @@ -343,9 +341,18 @@ using HasBits = decltype(::std::declval<Api>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Api, _impl_._has_bits_); + + static constexpr Api::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Api::ParseTableT_ Api::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Api::ParseTableT_ Api::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Api, _impl_._has_bits_), @@ -360,9 +367,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Api>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // string edition = 8; {::_pbi::TcParser::FastUS1, @@ -474,39 +478,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Api::PlacementNew_( +inline void* PROTOBUF_NONNULL Api::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Api(arena); } -constexpr auto Api::InternalNewImpl_() { +constexpr auto Api::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Api), alignof(Api)); } -constexpr auto Api::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Api::MergeImpl, - Super_::GetNewImpl<Api>(), +constexpr auto Api::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Api::MergeImpl, + Super_::GetNewImpl<Api>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Api::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Api::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Api, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Api, _impl_._cached_size_), &file_reflection_data[0], }; } struct ApiGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr ApiGlobalsTypeInternal() - : MessageGlobalsBase(Api::InternalGenerateClassData_( - _default, &Api_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Api>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Api>( GetClassData())) {} @@ -652,11 +649,11 @@ } Api::Api(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Api_globals_.GetClassData()) { + : Super_(arena, &Api_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Api) } PROTOBUF_NDEBUG_INLINE Api::Impl_::Impl_( @@ -693,7 +690,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Api& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Api_globals_.GetClassData()) { + : Super_(arena, &Api_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -733,9 +730,11 @@ version_(arena), edition_(arena) {} -inline void Api::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Api::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Api& this_ = static_cast<Api&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, source_context_), 0, offsetof(Impl_, syntax_) - @@ -744,9 +743,9 @@ } Api::~Api() { // @@protoc_insertion_point(destructor:google.protobuf.Api) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Api::SharedDtor(MessageLite& self) { +inline void Api::Helpers_::SharedDtor(MessageLite& self) { Api& this_ = static_cast<Api&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -765,7 +764,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Api_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Api_globals_)); - return Api_globals_.GetClassData(); + return &Api_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Api::Helpers_::Clear(MessageLite& base) { @@ -1077,28 +1076,33 @@ } -void Api::InternalSwap(Api* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Api::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Api* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Api& this_ = static_cast<Api&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.methods_.InternalSwap(&other->_impl_.methods_); - _impl_.options_.InternalSwap(&other->_impl_.options_); - _impl_.mixins_.InternalSwap(&other->_impl_.mixins_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.version_, &other->_impl_.version_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, &other->_impl_.edition_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Api, _impl_.syntax_) - + sizeof(Api::_impl_.syntax_) - - PROTOBUF_FIELD_OFFSET(Api, _impl_.source_context_)>( - reinterpret_cast<char*>(&_impl_.source_context_), - reinterpret_cast<char*>(&other->_impl_.source_context_)); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.methods_.InternalSwap(&other->_impl_.methods_); + this_._impl_.options_.InternalSwap(&other->_impl_.options_); + this_._impl_.mixins_.InternalSwap(&other->_impl_.mixins_); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.version_, &other->_impl_.version_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.edition_, &other->_impl_.edition_, + arena); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Api, _impl_.syntax_) + + sizeof(Api::_impl_.syntax_) - + PROTOBUF_FIELD_OFFSET(Api, _impl_.source_context_)>( + reinterpret_cast<char*>(&this_._impl_.source_context_), + reinterpret_cast<char*>(&other->_impl_.source_context_)); } ::google::protobuf::Metadata Api::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Api_globals_.class_data); } // =================================================================== @@ -1109,11 +1113,11 @@ } Method::Method(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Method_globals_.GetClassData()) { + : Super_(arena, &Method_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Method) } PROTOBUF_NDEBUG_INLINE Method::Impl_::Impl_( @@ -1137,7 +1141,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Method& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Method_globals_.GetClassData()) { + : Super_(arena, &Method_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -1170,9 +1174,11 @@ response_type_url_(arena), edition_(arena) {} -inline void Method::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Method::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Method& this_ = static_cast<Method&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, request_streaming_), 0, offsetof(Impl_, syntax_) - @@ -1181,9 +1187,9 @@ } Method::~Method() { // @@protoc_insertion_point(destructor:google.protobuf.Method) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Method::SharedDtor(MessageLite& self) { +inline void Method::Helpers_::SharedDtor(MessageLite& self) { Method& this_ = static_cast<Method&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1202,7 +1208,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Method_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Method_globals_)); - return Method_globals_.GetClassData(); + return &Method_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Method::Helpers_::Clear(MessageLite& base) { @@ -1511,37 +1517,43 @@ } -void Method::InternalSwap(Method* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Method::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Method* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Method& this_ = static_cast<Method&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.options_.InternalSwap(&other->_impl_.options_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.request_type_url_, &other->_impl_.request_type_url_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.response_type_url_, &other->_impl_.response_type_url_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, &other->_impl_.edition_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Method, _impl_.syntax_) - + sizeof(Method::_impl_.syntax_) - - PROTOBUF_FIELD_OFFSET(Method, _impl_.request_streaming_)>( - reinterpret_cast<char*>(&_impl_.request_streaming_), - reinterpret_cast<char*>(&other->_impl_.request_streaming_)); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.options_.InternalSwap(&other->_impl_.options_); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.request_type_url_, &other->_impl_.request_type_url_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.response_type_url_, &other->_impl_.response_type_url_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.edition_, &other->_impl_.edition_, + arena); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Method, _impl_.syntax_) + + sizeof(Method::_impl_.syntax_) - + PROTOBUF_FIELD_OFFSET(Method, _impl_.request_streaming_)>( + reinterpret_cast<char*>(&this_._impl_.request_streaming_), + reinterpret_cast<char*>(&other->_impl_.request_streaming_)); } ::google::protobuf::Metadata Method::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Method_globals_.class_data); } // =================================================================== Mixin::Mixin(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Mixin_globals_.GetClassData()) { + : Super_(arena, &Mixin_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin) } PROTOBUF_NDEBUG_INLINE Mixin::Impl_::Impl_( @@ -1556,7 +1568,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Mixin& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Mixin_globals_.GetClassData()) { + : Super_(arena, &Mixin_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -1575,14 +1587,16 @@ : name_(arena), root_(arena) {} -inline void Mixin::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void Mixin::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Mixin& this_ = static_cast<Mixin&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } Mixin::~Mixin() { // @@protoc_insertion_point(destructor:google.protobuf.Mixin) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Mixin::SharedDtor(MessageLite& self) { +inline void Mixin::Helpers_::SharedDtor(MessageLite& self) { Mixin& this_ = static_cast<Mixin&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1599,7 +1613,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Mixin_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Mixin_globals_)); - return Mixin_globals_.GetClassData(); + return &Mixin_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Mixin::Helpers_::Clear(MessageLite& base) { @@ -1754,18 +1768,23 @@ } -void Mixin::InternalSwap(Mixin* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Mixin::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Mixin* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Mixin& this_ = static_cast<Mixin&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.root_, &other->_impl_.root_, arena); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.root_, &other->_impl_.root_, + arena); } ::google::protobuf::Metadata Mixin::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Mixin_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 42b33ec..6c426c7 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h
@@ -79,7 +79,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Mixin* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Mixin)); } #endif @@ -100,7 +100,7 @@ inline Mixin& operator=(Mixin&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -137,7 +137,7 @@ inline void Swap(Mixin* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -145,7 +145,7 @@ void UnsafeArenaSwap(Mixin* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -196,11 +196,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Mixin* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Mixin"; } @@ -212,15 +207,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -263,23 +251,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Mixin* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<1, 2, 0, 38, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -320,7 +311,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Method* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Method)); } #endif @@ -341,7 +332,7 @@ inline Method& operator=(Method&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -378,7 +369,7 @@ inline void Swap(Method* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -386,7 +377,7 @@ void UnsafeArenaSwap(Method* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -437,11 +428,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Method* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Method"; } @@ -453,15 +439,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -590,23 +569,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Method) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Method* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<3, 8, 1, 83, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -653,7 +635,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Api* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Api)); } #endif @@ -674,7 +656,7 @@ inline Api& operator=(Api&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -711,7 +693,7 @@ inline void Swap(Api* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -719,7 +701,7 @@ void UnsafeArenaSwap(Api* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -770,11 +752,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Api* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Api"; } @@ -786,15 +763,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -943,23 +913,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Api) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Api* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<3, 8, 4, 54, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index a34206f..e89c3f0 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc
@@ -39,9 +39,18 @@ using HasBits = decltype(::std::declval<Duration>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Duration, _impl_._has_bits_); + + static constexpr Duration::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Duration::ParseTableT_ Duration::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Duration::ParseTableT_ Duration::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Duration, _impl_._has_bits_), @@ -56,9 +65,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Duration>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // int32 nanos = 2; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Duration, _impl_.nanos_), 1>(), @@ -100,39 +106,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Duration::PlacementNew_( +inline void* PROTOBUF_NONNULL Duration::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Duration(arena); } -constexpr auto Duration::InternalNewImpl_() { +constexpr auto Duration::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Duration), alignof(Duration)); } -constexpr auto Duration::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Duration::MergeImpl, - Super_::GetNewImpl<Duration>(), +constexpr auto Duration::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Duration::MergeImpl, + Super_::GetNewImpl<Duration>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Duration::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Duration::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Duration, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Duration, _impl_._cached_size_), &file_reflection_data[0], }; } struct DurationGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr DurationGlobalsTypeInternal() - : MessageGlobalsBase(Duration::InternalGenerateClassData_( - _default, &Duration_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Duration>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Duration>( GetClassData())) {} @@ -207,17 +206,17 @@ Duration::Duration(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Duration_globals_.GetClassData()) { + : Super_(arena, &Duration_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Duration) } Duration::Duration( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Duration& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Duration_globals_.GetClassData()), + : Super_(arena, &Duration_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -230,9 +229,11 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void Duration::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Duration::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Duration& this_ = static_cast<Duration&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, seconds_), 0, offsetof(Impl_, nanos_) - @@ -241,9 +242,9 @@ } Duration::~Duration() { // @@protoc_insertion_point(destructor:google.protobuf.Duration) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Duration::SharedDtor(MessageLite& self) { +inline void Duration::Helpers_::SharedDtor(MessageLite& self) { Duration& this_ = static_cast<Duration&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -258,7 +259,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Duration_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Duration_globals_)); - return Duration_globals_.GetClassData(); + return &Duration_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Duration::Helpers_::Clear(MessageLite& base) { @@ -402,20 +403,22 @@ } -void Duration::InternalSwap(Duration* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Duration::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Duration* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Duration, _impl_.nanos_) - + sizeof(Duration::_impl_.nanos_) - - PROTOBUF_FIELD_OFFSET(Duration, _impl_.seconds_)>( - reinterpret_cast<char*>(&_impl_.seconds_), - reinterpret_cast<char*>(&other->_impl_.seconds_)); + Duration& this_ = static_cast<Duration&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Duration, _impl_.nanos_) + + sizeof(Duration::_impl_.nanos_) - + PROTOBUF_FIELD_OFFSET(Duration, _impl_.seconds_)>( + reinterpret_cast<char*>(&this_._impl_.seconds_), + reinterpret_cast<char*>(&other->_impl_.seconds_)); } ::google::protobuf::Metadata Duration::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Duration_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 96408f5..c01ab5d 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h
@@ -71,7 +71,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Duration* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Duration)); } #endif @@ -92,7 +92,7 @@ inline Duration& operator=(Duration&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -129,7 +129,7 @@ inline void Swap(Duration* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -137,7 +137,7 @@ void UnsafeArenaSwap(Duration* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -188,11 +188,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Duration* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Duration"; } @@ -204,15 +199,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -245,23 +233,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Duration) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Duration* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<1, 2, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index feb5b2e..ef62391 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc
@@ -36,9 +36,18 @@ namespace protobuf { class Empty::_Internal { public: + + static constexpr Empty::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Empty::ParseTableT_ Empty::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Empty::ParseTableT_ Empty::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Empty, @@ -54,9 +63,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Empty>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, }}, {{ @@ -77,38 +83,31 @@ #endif // PROTOBUF_CUSTOM_VTABLE ) { } -inline void* PROTOBUF_NONNULL Empty::PlacementNew_( +inline void* PROTOBUF_NONNULL Empty::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Empty(arena); } -constexpr auto Empty::InternalNewImpl_() { +constexpr auto Empty::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Empty), alignof(Empty)); } -constexpr auto Empty::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Empty::MergeImpl, - Super_::GetNewImpl<Empty>(), +constexpr auto Empty::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Empty::MergeImpl, + Super_::GetNewImpl<Empty>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Empty::SharedDtor, - &Empty::Clear, &Empty::ByteSizeLong, &Empty::_InternalSerialize, + &Empty::Helpers_::SharedDtor, + &Empty::Clear, &Empty::ByteSizeLong, &Empty::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Empty, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Empty, _impl_._cached_size_), &file_reflection_data[0], }; } struct EmptyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr EmptyGlobalsTypeInternal() - : MessageGlobalsBase(Empty::InternalGenerateClassData_( - _default, &Empty_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Empty>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Empty>( GetClassData())) {} @@ -176,7 +175,7 @@ Empty::Empty(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Empty_globals_.GetClassData()) { + : Super_(arena, &Empty_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE @@ -186,7 +185,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Empty& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Empty_globals_.GetClassData()) { + : Super_(arena, &Empty_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -204,7 +203,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Empty_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Empty_globals_)); - return Empty_globals_.GetClassData(); + return &Empty_globals_.class_data; } @@ -214,7 +213,7 @@ ::google::protobuf::Metadata Empty::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Empty_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index f94da0d..9964df1 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h
@@ -71,7 +71,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Empty* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Empty)); } #endif @@ -92,7 +92,7 @@ inline Empty& operator=(Empty&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -129,7 +129,7 @@ inline void Swap(Empty* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -137,7 +137,7 @@ void UnsafeArenaSwap(Empty* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -172,15 +172,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -189,23 +182,22 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Empty) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) - struct Helpers_ { + struct Helpers_ : public Super_::Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 0, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index d2110e3..98a9b3f 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc
@@ -39,9 +39,18 @@ using HasBits = decltype(::std::declval<FieldMask>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(FieldMask, _impl_._has_bits_); + + static constexpr FieldMask::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr FieldMask::ParseTableT_ FieldMask::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr FieldMask::ParseTableT_ FieldMask::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(FieldMask, _impl_._has_bits_), @@ -56,9 +65,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::FieldMask>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // repeated string paths = 1; {::_pbi::TcParser::FastUR1, @@ -100,39 +106,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL FieldMask::PlacementNew_( +inline void* PROTOBUF_NONNULL FieldMask::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) FieldMask(arena); } -constexpr auto FieldMask::InternalNewImpl_() { +constexpr auto FieldMask::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(FieldMask), alignof(FieldMask)); } -constexpr auto FieldMask::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &FieldMask::MergeImpl, - Super_::GetNewImpl<FieldMask>(), +constexpr auto FieldMask::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &FieldMask::MergeImpl, + Super_::GetNewImpl<FieldMask>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &FieldMask::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &FieldMask::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(FieldMask, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(FieldMask, _impl_._cached_size_), &file_reflection_data[0], }; } struct FieldMaskGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr FieldMaskGlobalsTypeInternal() - : MessageGlobalsBase(FieldMask::InternalGenerateClassData_( - _default, &FieldMask_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<FieldMask>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<FieldMask>( GetClassData())) {} @@ -205,11 +204,11 @@ FieldMask::FieldMask(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, FieldMask_globals_.GetClassData()) { + : Super_(arena, &FieldMask_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask) } PROTOBUF_NDEBUG_INLINE FieldMask::Impl_::Impl_( @@ -229,7 +228,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const FieldMask& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, FieldMask_globals_.GetClassData()) { + : Super_(arena, &FieldMask_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -251,14 +250,16 @@ } {} -inline void FieldMask::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void FieldMask::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + FieldMask& this_ = static_cast<FieldMask&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } FieldMask::~FieldMask() { // @@protoc_insertion_point(destructor:google.protobuf.FieldMask) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void FieldMask::SharedDtor(MessageLite& self) { +inline void FieldMask::Helpers_::SharedDtor(MessageLite& self) { FieldMask& this_ = static_cast<FieldMask&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -273,7 +274,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&FieldMask_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&FieldMask_globals_)); - return FieldMask_globals_.GetClassData(); + return &FieldMask_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void FieldMask::Helpers_::Clear(MessageLite& base) { @@ -394,15 +395,18 @@ } -void FieldMask::InternalSwap(FieldMask* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void FieldMask::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + FieldMask* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.paths_.InternalSwap(&other->_impl_.paths_); + FieldMask& this_ = static_cast<FieldMask&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.paths_.InternalSwap(&other->_impl_.paths_); } ::google::protobuf::Metadata FieldMask::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(FieldMask_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 295522b..17e4b83 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h
@@ -71,7 +71,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( FieldMask* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(FieldMask)); } #endif @@ -92,7 +92,7 @@ inline FieldMask& operator=(FieldMask&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -129,7 +129,7 @@ inline void Swap(FieldMask* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -137,7 +137,7 @@ void UnsafeArenaSwap(FieldMask* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -188,11 +188,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(FieldMask* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.FieldMask"; } @@ -204,15 +199,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -250,23 +238,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, FieldMask* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 39, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 07f251f..2379d56 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc
@@ -39,9 +39,18 @@ using HasBits = decltype(::std::declval<SourceContext>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(SourceContext, _impl_._has_bits_); + + static constexpr SourceContext::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr SourceContext::ParseTableT_ SourceContext::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr SourceContext::ParseTableT_ SourceContext::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(SourceContext, _impl_._has_bits_), @@ -56,9 +65,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::SourceContext>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // string file_name = 1; {::_pbi::TcParser::FastUS1, @@ -98,39 +104,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL SourceContext::PlacementNew_( +inline void* PROTOBUF_NONNULL SourceContext::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) SourceContext(arena); } -constexpr auto SourceContext::InternalNewImpl_() { +constexpr auto SourceContext::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SourceContext), alignof(SourceContext)); } -constexpr auto SourceContext::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &SourceContext::MergeImpl, - Super_::GetNewImpl<SourceContext>(), +constexpr auto SourceContext::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &SourceContext::MergeImpl, + Super_::GetNewImpl<SourceContext>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &SourceContext::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &SourceContext::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(SourceContext, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(SourceContext, _impl_._cached_size_), &file_reflection_data[0], }; } struct SourceContextGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr SourceContextGlobalsTypeInternal() - : MessageGlobalsBase(SourceContext::InternalGenerateClassData_( - _default, &SourceContext_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<SourceContext>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<SourceContext>( GetClassData())) {} @@ -203,11 +202,11 @@ SourceContext::SourceContext(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, SourceContext_globals_.GetClassData()) { + : Super_(arena, &SourceContext_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceContext) } PROTOBUF_NDEBUG_INLINE SourceContext::Impl_::Impl_( @@ -221,7 +220,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SourceContext& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, SourceContext_globals_.GetClassData()) { + : Super_(arena, &SourceContext_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -239,14 +238,16 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : file_name_(arena) {} -inline void SourceContext::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void SourceContext::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + SourceContext& this_ = static_cast<SourceContext&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } SourceContext::~SourceContext() { // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void SourceContext::SharedDtor(MessageLite& self) { +inline void SourceContext::Helpers_::SharedDtor(MessageLite& self) { SourceContext& this_ = static_cast<SourceContext&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -262,7 +263,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&SourceContext_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&SourceContext_globals_)); - return SourceContext_globals_.GetClassData(); + return &SourceContext_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void SourceContext::Helpers_::Clear(MessageLite& base) { @@ -383,17 +384,21 @@ } -void SourceContext::InternalSwap(SourceContext* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void SourceContext::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + SourceContext* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + SourceContext& this_ = static_cast<SourceContext&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.file_name_, &other->_impl_.file_name_, arena); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.file_name_, &other->_impl_.file_name_, + arena); } ::google::protobuf::Metadata SourceContext::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(SourceContext_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index c47e1cf..51f134c 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h
@@ -71,7 +71,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( SourceContext* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(SourceContext)); } #endif @@ -92,7 +92,7 @@ inline SourceContext& operator=(SourceContext&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -129,7 +129,7 @@ inline void Swap(SourceContext* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -137,7 +137,7 @@ void UnsafeArenaSwap(SourceContext* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -188,11 +188,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(SourceContext* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.SourceContext"; } @@ -204,15 +199,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -239,23 +227,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.SourceContext) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, SourceContext* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 47, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 3b49ee8..8af3e79 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc
@@ -45,9 +45,18 @@ using HasBits = decltype(::std::declval<ListValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(ListValue, _impl_._has_bits_); + + static constexpr ListValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr ListValue::ParseTableT_ ListValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr ListValue::ParseTableT_ ListValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(ListValue, _impl_._has_bits_), @@ -62,9 +71,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::ListValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // repeated .google.protobuf.Value values = 1; {::_pbi::TcParser::FastMcR1, @@ -105,39 +111,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL ListValue::PlacementNew_( +inline void* PROTOBUF_NONNULL ListValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) ListValue(arena); } -constexpr auto ListValue::InternalNewImpl_() { +constexpr auto ListValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ListValue), alignof(ListValue)); } -constexpr auto ListValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &ListValue::MergeImpl, - Super_::GetNewImpl<ListValue>(), +constexpr auto ListValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &ListValue::MergeImpl, + Super_::GetNewImpl<ListValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &ListValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &ListValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(ListValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(ListValue, _impl_._cached_size_), &file_reflection_data[3], }; } struct ListValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr ListValueGlobalsTypeInternal() - : MessageGlobalsBase(ListValue::InternalGenerateClassData_( - _default, &ListValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<ListValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<ListValue>( GetClassData())) {} @@ -159,9 +158,18 @@ using HasBits = decltype(::std::declval<Struct>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Struct, _impl_._has_bits_); + + static constexpr Struct::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Struct::ParseTableT_ Struct::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Struct::ParseTableT_ Struct::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Struct, _impl_._has_bits_), @@ -176,9 +184,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Struct>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // map<string, .google.protobuf.Value> fields = 1; {::_pbi::TcParser::FastMiniParse1, @@ -226,39 +231,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Struct::PlacementNew_( +inline void* PROTOBUF_NONNULL Struct::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Struct(arena); } -constexpr auto Struct::InternalNewImpl_() { +constexpr auto Struct::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Struct), alignof(Struct)); } -constexpr auto Struct::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Struct::MergeImpl, - Super_::GetNewImpl<Struct>(), +constexpr auto Struct::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Struct::MergeImpl, + Super_::GetNewImpl<Struct>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Struct::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Struct::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Struct, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Struct, _impl_._cached_size_), &file_reflection_data[1], }; } struct StructGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr StructGlobalsTypeInternal() - : MessageGlobalsBase(Struct::InternalGenerateClassData_( - _default, &Struct_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Struct>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Struct>( GetClassData())) {} @@ -275,7 +273,59 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const StructGlobalsTypeInternal Struct_globals_ PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro); -constexpr Struct_FieldsEntry_DoNotUse::ParseTableT_ Struct_FieldsEntry_DoNotUse::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Struct_FieldsEntry_DoNotUse final + : public ::google::protobuf::internal::MapEntry<::std::string, ::google::protobuf::Message, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE> { + using Super_ = + ::google::protobuf::internal::MapEntry<::std::string, ::google::protobuf::Message, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE>; + + public: + Struct_FieldsEntry_DoNotUse(); + template <typename = void> + explicit constexpr Struct_FieldsEntry_DoNotUse(::google::protobuf::internal::ConstantInitialized, + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL + class_data); + explicit Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + + + private: + friend class ::google::protobuf::MessageLite; + friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; + friend ::google::protobuf::internal::PrivateAccess; + friend Struct_FieldsEntry_DoNotUseGlobalsTypeInternal; + + using ParseTableT_ = + ::google::protobuf::internal::TcParseTable<1, 2, + 1, 46, + 2>; + + class _Internal; + struct Helpers_ : public Super_::Helpers_ { + PROTOBUF_NODEBUG Helpers_(); + }; + + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; +}; +class Struct_FieldsEntry_DoNotUse::_Internal { + public: + using HasBits = decltype(::std::declval<Struct_FieldsEntry_DoNotUse>()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Struct_FieldsEntry_DoNotUse, _impl_._has_bits_); + + static constexpr Struct_FieldsEntry_DoNotUse::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); +}; + +constexpr Struct_FieldsEntry_DoNotUse::ParseTableT_ Struct_FieldsEntry_DoNotUse::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Struct_FieldsEntry_DoNotUse, _impl_._has_bits_), @@ -290,9 +340,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::DiscardEverythingFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Struct_FieldsEntry_DoNotUse>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // .google.protobuf.Value value = 2; {::_pbi::TcParser::FastMcS1, @@ -331,39 +378,32 @@ #endif // PROTOBUF_CUSTOM_VTABLE ) { } -inline void* PROTOBUF_NONNULL Struct_FieldsEntry_DoNotUse::PlacementNew_( +inline void* PROTOBUF_NONNULL Struct_FieldsEntry_DoNotUse::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Struct_FieldsEntry_DoNotUse(arena); } -constexpr auto Struct_FieldsEntry_DoNotUse::InternalNewImpl_() { +constexpr auto Struct_FieldsEntry_DoNotUse::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Struct_FieldsEntry_DoNotUse), alignof(Struct_FieldsEntry_DoNotUse)); } -constexpr auto Struct_FieldsEntry_DoNotUse::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Struct_FieldsEntry_DoNotUse::MergeImpl, - Super_::GetNewImpl<Struct_FieldsEntry_DoNotUse>(), +constexpr auto Struct_FieldsEntry_DoNotUse::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Struct_FieldsEntry_DoNotUse::MergeImpl, + Super_::GetNewImpl<Struct_FieldsEntry_DoNotUse>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Struct_FieldsEntry_DoNotUse::SharedDtor, - &Struct_FieldsEntry_DoNotUse::ClearImpl, Super_::ByteSizeLongImpl, - Super_::_InternalSerializeImpl, + &Struct_FieldsEntry_DoNotUse::Helpers_::SharedDtor, + &Struct_FieldsEntry_DoNotUse::ClearImpl, Super_::ByteSizeLongImpl, + Super_::_InternalSerializeImpl, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Struct_FieldsEntry_DoNotUse, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Struct_FieldsEntry_DoNotUse, _impl_._cached_size_), &file_reflection_data[0], }; } struct Struct_FieldsEntry_DoNotUseGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr Struct_FieldsEntry_DoNotUseGlobalsTypeInternal() - : MessageGlobalsBase(Struct_FieldsEntry_DoNotUse::InternalGenerateClassData_( - _default, &Struct_FieldsEntry_DoNotUse_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Struct_FieldsEntry_DoNotUse>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Struct_FieldsEntry_DoNotUse>( GetClassData())) {} @@ -384,9 +424,18 @@ public: static constexpr ::int32_t kOneofCaseOffset = PROTOBUF_FIELD_OFFSET(::google::protobuf::Value, _impl_._oneof_case_); + + static constexpr Value::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Value::ParseTableT_ Value::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Value::ParseTableT_ Value::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Value, @@ -402,9 +451,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Value>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // bool bool_value = 4; {::_pbi::TcParser::FastMiniParse1, @@ -458,39 +504,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Value::PlacementNew_( +inline void* PROTOBUF_NONNULL Value::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Value(arena); } -constexpr auto Value::InternalNewImpl_() { +constexpr auto Value::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Value), alignof(Value)); } -constexpr auto Value::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Value::MergeImpl, - Super_::GetNewImpl<Value>(), +constexpr auto Value::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Value::MergeImpl, + Super_::GetNewImpl<Value>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Value::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Value::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Value, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Value, _impl_._cached_size_), &file_reflection_data[2], }; } struct ValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr ValueGlobalsTypeInternal() - : MessageGlobalsBase(Value::InternalGenerateClassData_( - _default, &Value_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Value>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Value>( GetClassData())) {} @@ -607,10 +646,10 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() - : Super_(Struct_FieldsEntry_DoNotUse_globals_.GetClassData()) {} + : Super_(&Struct_FieldsEntry_DoNotUse_globals_.class_data) {} PROTOBUF_ALWAYS_INLINE_NODEBUG Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : Super_(arena, Struct_FieldsEntry_DoNotUse_globals_.GetClassData()) {} + : Super_(arena, &Struct_FieldsEntry_DoNotUse_globals_.class_data) {} #else // PROTOBUF_CUSTOM_VTABLE Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() : Super_() {} Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : Super_(arena) {} @@ -620,17 +659,17 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Struct_FieldsEntry_DoNotUse_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Struct_FieldsEntry_DoNotUse_globals_)); - return Struct_FieldsEntry_DoNotUse_globals_.GetClassData(); + return &Struct_FieldsEntry_DoNotUse_globals_.class_data; } // =================================================================== Struct::Struct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Struct_globals_.GetClassData()) { + : Super_(arena, &Struct_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct) } PROTOBUF_NDEBUG_INLINE Struct::Impl_::Impl_( @@ -650,7 +689,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Struct& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Struct_globals_.GetClassData()) { + : Super_(arena, &Struct_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -672,14 +711,16 @@ } {} -inline void Struct::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void Struct::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Struct& this_ = static_cast<Struct&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } Struct::~Struct() { // @@protoc_insertion_point(destructor:google.protobuf.Struct) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Struct::SharedDtor(MessageLite& self) { +inline void Struct::Helpers_::SharedDtor(MessageLite& self) { Struct& this_ = static_cast<Struct&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -694,7 +735,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Struct_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Struct_globals_)); - return Struct_globals_.GetClassData(); + return &Struct_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Struct::Helpers_::Clear(MessageLite& base) { @@ -832,15 +873,18 @@ } -void Struct::InternalSwap(Struct* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Struct::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Struct* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.fields_.InternalSwap(&other->_impl_.fields_); + Struct& this_ = static_cast<Struct&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.fields_.InternalSwap(&other->_impl_.fields_); } ::google::protobuf::Metadata Struct::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Struct_globals_.class_data); } // =================================================================== @@ -872,11 +916,11 @@ } Value::Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Value_globals_.GetClassData()) { + : Super_(arena, &Value_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Value) } PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_( @@ -890,7 +934,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Value& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Value_globals_.GetClassData()) { + : Super_(arena, &Value_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -931,14 +975,16 @@ : kind_{}, _oneof_case_{} {} -inline void Value::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void Value::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Value& this_ = static_cast<Value&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } Value::~Value() { // @@protoc_insertion_point(destructor:google.protobuf.Value) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Value::SharedDtor(MessageLite& self) { +inline void Value::Helpers_::SharedDtor(MessageLite& self) { Value& this_ = static_cast<Value&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1000,7 +1046,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Value_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Value_globals_)); - return Value_globals_.GetClassData(); + return &Value_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Value::Helpers_::Clear(MessageLite& base) { @@ -1217,25 +1263,28 @@ } -void Value::InternalSwap(Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Value::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.kind_, other->_impl_.kind_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + Value& this_ = static_cast<Value&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_.kind_, other->_impl_.kind_); + swap(this_._impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); } ::google::protobuf::Metadata Value::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Value_globals_.class_data); } // =================================================================== ListValue::ListValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, ListValue_globals_.GetClassData()) { + : Super_(arena, &ListValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue) } PROTOBUF_NDEBUG_INLINE ListValue::Impl_::Impl_( @@ -1255,7 +1304,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ListValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, ListValue_globals_.GetClassData()) { + : Super_(arena, &ListValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -1277,14 +1326,16 @@ } {} -inline void ListValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void ListValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + ListValue& this_ = static_cast<ListValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } ListValue::~ListValue() { // @@protoc_insertion_point(destructor:google.protobuf.ListValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void ListValue::SharedDtor(MessageLite& self) { +inline void ListValue::Helpers_::SharedDtor(MessageLite& self) { ListValue& this_ = static_cast<ListValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1299,7 +1350,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&ListValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&ListValue_globals_)); - return ListValue_globals_.GetClassData(); + return &ListValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void ListValue::Helpers_::Clear(MessageLite& base) { @@ -1420,15 +1471,18 @@ } -void ListValue::InternalSwap(ListValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void ListValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + ListValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.values_.InternalSwap(&other->_impl_.values_); + ListValue& this_ = static_cast<ListValue&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.values_.InternalSwap(&other->_impl_.values_); } ::google::protobuf::Metadata ListValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(ListValue_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 70b41c2..0cad5a1 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h
@@ -131,7 +131,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( ListValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(ListValue)); } #endif @@ -152,7 +152,7 @@ inline ListValue& operator=(ListValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -189,7 +189,7 @@ inline void Swap(ListValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -197,7 +197,7 @@ void UnsafeArenaSwap(ListValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -248,11 +248,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(ListValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.ListValue"; } @@ -264,15 +259,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -304,23 +292,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, ListValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -360,7 +351,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Struct* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Struct)); } #endif @@ -381,7 +372,7 @@ inline Struct& operator=(Struct&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -418,7 +409,7 @@ inline void Swap(Struct* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -426,7 +417,7 @@ void UnsafeArenaSwap(Struct* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -477,11 +468,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Struct* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Struct"; } @@ -493,15 +479,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -528,23 +507,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Struct) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Struct* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 2, 37, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -565,7 +547,7 @@ const Struct& from_msg); ::google::protobuf::internal::HasBits<1> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::MapField<Struct_FieldsEntry_DoNotUse, ::std::string, ::google::protobuf::Value> fields_; + ::google::protobuf::internal::MapField<&Struct_FieldsEntry_DoNotUse_globals_, ::std::string, ::google::protobuf::Value> fields_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; @@ -573,51 +555,6 @@ }; // ------------------------------------------------------------------- -class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Struct_FieldsEntry_DoNotUse final - : public ::google::protobuf::internal::MapEntry<::std::string, ::google::protobuf::Message, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE> { - using Super_ = - ::google::protobuf::internal::MapEntry<::std::string, ::google::protobuf::Message, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE>; - - public: - Struct_FieldsEntry_DoNotUse(); - template <typename = void> - explicit constexpr Struct_FieldsEntry_DoNotUse(::google::protobuf::internal::ConstantInitialized, - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL - class_data); - explicit Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr const void* PROTOBUF_NONNULL internal_message_globals() { - return &Struct_FieldsEntry_DoNotUse_globals_; - } - - - static constexpr auto InternalGenerateClassData_( - const ::google::protobuf::MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); - - private: - friend class ::google::protobuf::MessageLite; - friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; - friend ::google::protobuf::internal::PrivateAccess; - friend Struct_FieldsEntry_DoNotUseGlobalsTypeInternal; - - using ParseTableT_ = - ::google::protobuf::internal::TcParseTable<1, 2, - 1, 46, - 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; - - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); -}; // ------------------------------------------------------------------- class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Value final : public ::google::protobuf::Message @@ -631,7 +568,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Value* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Value)); } #endif @@ -652,7 +589,7 @@ inline Value& operator=(Value&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -698,7 +635,7 @@ inline void Swap(Value* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -706,7 +643,7 @@ void UnsafeArenaSwap(Value* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -757,11 +694,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Value* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Value"; } @@ -773,15 +705,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -887,16 +812,22 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Value) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Value* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; void set_has_null_value(); void set_has_number_value(); void set_has_string_value(); @@ -909,9 +840,6 @@ ::google::protobuf::internal::TcParseTable<0, 6, 2, 42, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 19a5858..e33e099 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc
@@ -39,9 +39,18 @@ using HasBits = decltype(::std::declval<Timestamp>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Timestamp, _impl_._has_bits_); + + static constexpr Timestamp::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Timestamp::ParseTableT_ Timestamp::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Timestamp::ParseTableT_ Timestamp::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Timestamp, _impl_._has_bits_), @@ -56,9 +65,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // int32 nanos = 2; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Timestamp, _impl_.nanos_), 1>(), @@ -100,39 +106,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Timestamp::PlacementNew_( +inline void* PROTOBUF_NONNULL Timestamp::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Timestamp(arena); } -constexpr auto Timestamp::InternalNewImpl_() { +constexpr auto Timestamp::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Timestamp), alignof(Timestamp)); } -constexpr auto Timestamp::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Timestamp::MergeImpl, - Super_::GetNewImpl<Timestamp>(), +constexpr auto Timestamp::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Timestamp::MergeImpl, + Super_::GetNewImpl<Timestamp>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Timestamp::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Timestamp::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Timestamp, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Timestamp, _impl_._cached_size_), &file_reflection_data[0], }; } struct TimestampGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr TimestampGlobalsTypeInternal() - : MessageGlobalsBase(Timestamp::InternalGenerateClassData_( - _default, &Timestamp_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Timestamp>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Timestamp>( GetClassData())) {} @@ -207,17 +206,17 @@ Timestamp::Timestamp(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Timestamp_globals_.GetClassData()) { + : Super_(arena, &Timestamp_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp) } Timestamp::Timestamp( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Timestamp& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Timestamp_globals_.GetClassData()), + : Super_(arena, &Timestamp_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -230,9 +229,11 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void Timestamp::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Timestamp::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Timestamp& this_ = static_cast<Timestamp&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, seconds_), 0, offsetof(Impl_, nanos_) - @@ -241,9 +242,9 @@ } Timestamp::~Timestamp() { // @@protoc_insertion_point(destructor:google.protobuf.Timestamp) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Timestamp::SharedDtor(MessageLite& self) { +inline void Timestamp::Helpers_::SharedDtor(MessageLite& self) { Timestamp& this_ = static_cast<Timestamp&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -258,7 +259,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Timestamp_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Timestamp_globals_)); - return Timestamp_globals_.GetClassData(); + return &Timestamp_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Timestamp::Helpers_::Clear(MessageLite& base) { @@ -402,20 +403,22 @@ } -void Timestamp::InternalSwap(Timestamp* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Timestamp::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Timestamp* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_) - + sizeof(Timestamp::_impl_.nanos_) - - PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_)>( - reinterpret_cast<char*>(&_impl_.seconds_), - reinterpret_cast<char*>(&other->_impl_.seconds_)); + Timestamp& this_ = static_cast<Timestamp&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_) + + sizeof(Timestamp::_impl_.nanos_) - + PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_)>( + reinterpret_cast<char*>(&this_._impl_.seconds_), + reinterpret_cast<char*>(&other->_impl_.seconds_)); } ::google::protobuf::Metadata Timestamp::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Timestamp_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index a9c1ed7..89998f8 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h
@@ -71,7 +71,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Timestamp* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Timestamp)); } #endif @@ -92,7 +92,7 @@ inline Timestamp& operator=(Timestamp&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -129,7 +129,7 @@ inline void Swap(Timestamp* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -137,7 +137,7 @@ void UnsafeArenaSwap(Timestamp* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -188,11 +188,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Timestamp* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Timestamp"; } @@ -204,15 +199,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -245,23 +233,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Timestamp* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<1, 2, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 4587090..6e71368 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc
@@ -47,9 +47,18 @@ using HasBits = decltype(::std::declval<Option>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Option, _impl_._has_bits_); + + static constexpr Option::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Option::ParseTableT_ Option::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Option::ParseTableT_ Option::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Option, _impl_._has_bits_), @@ -64,9 +73,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Option>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // .google.protobuf.Any value = 2; {::_pbi::TcParser::FastMcS1, @@ -115,39 +121,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Option::PlacementNew_( +inline void* PROTOBUF_NONNULL Option::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Option(arena); } -constexpr auto Option::InternalNewImpl_() { +constexpr auto Option::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Option), alignof(Option)); } -constexpr auto Option::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Option::MergeImpl, - Super_::GetNewImpl<Option>(), +constexpr auto Option::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Option::MergeImpl, + Super_::GetNewImpl<Option>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Option::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Option::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Option, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Option, _impl_._cached_size_), &file_reflection_data[4], }; } struct OptionGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr OptionGlobalsTypeInternal() - : MessageGlobalsBase(Option::InternalGenerateClassData_( - _default, &Option_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Option>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Option>( GetClassData())) {} @@ -169,9 +168,18 @@ using HasBits = decltype(::std::declval<Field>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Field, _impl_._has_bits_); + + static constexpr Field::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Field::ParseTableT_ Field::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Field::ParseTableT_ Field::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Field, _impl_._has_bits_), @@ -186,9 +194,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Field>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, // .google.protobuf.Field.Kind kind = 1; @@ -312,39 +317,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Field::PlacementNew_( +inline void* PROTOBUF_NONNULL Field::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Field(arena); } -constexpr auto Field::InternalNewImpl_() { +constexpr auto Field::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Field), alignof(Field)); } -constexpr auto Field::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Field::MergeImpl, - Super_::GetNewImpl<Field>(), +constexpr auto Field::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Field::MergeImpl, + Super_::GetNewImpl<Field>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Field::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Field::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Field, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Field, _impl_._cached_size_), &file_reflection_data[1], }; } struct FieldGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr FieldGlobalsTypeInternal() - : MessageGlobalsBase(Field::InternalGenerateClassData_( - _default, &Field_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Field>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Field>( GetClassData())) {} @@ -366,9 +364,18 @@ using HasBits = decltype(::std::declval<EnumValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(EnumValue, _impl_._has_bits_); + + static constexpr EnumValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr EnumValue::ParseTableT_ EnumValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr EnumValue::ParseTableT_ EnumValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(EnumValue, _impl_._has_bits_), @@ -383,9 +390,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::EnumValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, // string name = 1; @@ -446,39 +450,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL EnumValue::PlacementNew_( +inline void* PROTOBUF_NONNULL EnumValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) EnumValue(arena); } -constexpr auto EnumValue::InternalNewImpl_() { +constexpr auto EnumValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(EnumValue), alignof(EnumValue)); } -constexpr auto EnumValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &EnumValue::MergeImpl, - Super_::GetNewImpl<EnumValue>(), +constexpr auto EnumValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &EnumValue::MergeImpl, + Super_::GetNewImpl<EnumValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &EnumValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &EnumValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(EnumValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(EnumValue, _impl_._cached_size_), &file_reflection_data[3], }; } struct EnumValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr EnumValueGlobalsTypeInternal() - : MessageGlobalsBase(EnumValue::InternalGenerateClassData_( - _default, &EnumValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<EnumValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<EnumValue>( GetClassData())) {} @@ -500,9 +497,18 @@ using HasBits = decltype(::std::declval<Type>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Type, _impl_._has_bits_); + + static constexpr Type::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Type::ParseTableT_ Type::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Type::ParseTableT_ Type::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Type, _impl_._has_bits_), @@ -517,9 +523,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Type>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, // string name = 1; @@ -622,39 +625,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Type::PlacementNew_( +inline void* PROTOBUF_NONNULL Type::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Type(arena); } -constexpr auto Type::InternalNewImpl_() { +constexpr auto Type::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Type), alignof(Type)); } -constexpr auto Type::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Type::MergeImpl, - Super_::GetNewImpl<Type>(), +constexpr auto Type::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Type::MergeImpl, + Super_::GetNewImpl<Type>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Type::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Type::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Type, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Type, _impl_._cached_size_), &file_reflection_data[0], }; } struct TypeGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr TypeGlobalsTypeInternal() - : MessageGlobalsBase(Type::InternalGenerateClassData_( - _default, &Type_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Type>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Type>( GetClassData())) {} @@ -676,9 +672,18 @@ using HasBits = decltype(::std::declval<Enum>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Enum, _impl_._has_bits_); + + static constexpr Enum::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Enum::ParseTableT_ Enum::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Enum::ParseTableT_ Enum::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Enum, _impl_._has_bits_), @@ -693,9 +698,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Enum>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, // string name = 1; @@ -787,39 +789,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Enum::PlacementNew_( +inline void* PROTOBUF_NONNULL Enum::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Enum(arena); } -constexpr auto Enum::InternalNewImpl_() { +constexpr auto Enum::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Enum), alignof(Enum)); } -constexpr auto Enum::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Enum::MergeImpl, - Super_::GetNewImpl<Enum>(), +constexpr auto Enum::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Enum::MergeImpl, + Super_::GetNewImpl<Enum>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Enum::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Enum::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Enum, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Enum, _impl_._cached_size_), &file_reflection_data[2], }; } struct EnumGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr EnumGlobalsTypeInternal() - : MessageGlobalsBase(Enum::InternalGenerateClassData_( - _default, &Enum_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Enum>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Enum>( GetClassData())) {} @@ -1033,11 +1028,11 @@ } Type::Type(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Type_globals_.GetClassData()) { + : Super_(arena, &Type_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Type) } PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_( @@ -1073,7 +1068,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Type& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Type_globals_.GetClassData()) { + : Super_(arena, &Type_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -1112,9 +1107,11 @@ name_(arena), edition_(arena) {} -inline void Type::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Type::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Type& this_ = static_cast<Type&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, source_context_), 0, offsetof(Impl_, syntax_) - @@ -1123,9 +1120,9 @@ } Type::~Type() { // @@protoc_insertion_point(destructor:google.protobuf.Type) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Type::SharedDtor(MessageLite& self) { +inline void Type::Helpers_::SharedDtor(MessageLite& self) { Type& this_ = static_cast<Type&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1143,7 +1140,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Type_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Type_globals_)); - return Type_globals_.GetClassData(); + return &Type_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Type::Helpers_::Clear(MessageLite& base) { @@ -1426,37 +1423,41 @@ } -void Type::InternalSwap(Type* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Type::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Type* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Type& this_ = static_cast<Type&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.fields_.InternalSwap(&other->_impl_.fields_); - _impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_); - _impl_.options_.InternalSwap(&other->_impl_.options_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, &other->_impl_.edition_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_) - + sizeof(Type::_impl_.syntax_) - - PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_)>( - reinterpret_cast<char*>(&_impl_.source_context_), - reinterpret_cast<char*>(&other->_impl_.source_context_)); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.fields_.InternalSwap(&other->_impl_.fields_); + this_._impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_); + this_._impl_.options_.InternalSwap(&other->_impl_.options_); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.edition_, &other->_impl_.edition_, + arena); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_) + + sizeof(Type::_impl_.syntax_) - + PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_)>( + reinterpret_cast<char*>(&this_._impl_.source_context_), + reinterpret_cast<char*>(&other->_impl_.source_context_)); } ::google::protobuf::Metadata Type::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Type_globals_.class_data); } // =================================================================== Field::Field(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Field_globals_.GetClassData()) { + : Super_(arena, &Field_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Field) } PROTOBUF_NDEBUG_INLINE Field::Impl_::Impl_( @@ -1480,7 +1481,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Field& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Field_globals_.GetClassData()) { + : Super_(arena, &Field_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -1513,9 +1514,11 @@ json_name_(arena), default_value_(arena) {} -inline void Field::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Field::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Field& this_ = static_cast<Field&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, kind_), 0, offsetof(Impl_, packed_) - @@ -1524,9 +1527,9 @@ } Field::~Field() { // @@protoc_insertion_point(destructor:google.protobuf.Field) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Field::SharedDtor(MessageLite& self) { +inline void Field::Helpers_::SharedDtor(MessageLite& self) { Field& this_ = static_cast<Field&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1545,7 +1548,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Field_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Field_globals_)); - return Field_globals_.GetClassData(); + return &Field_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Field::Helpers_::Clear(MessageLite& base) { @@ -1908,27 +1911,33 @@ } -void Field::InternalSwap(Field* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Field::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Field* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Field& this_ = static_cast<Field&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.options_.InternalSwap(&other->_impl_.options_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.type_url_, &other->_impl_.type_url_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.json_name_, &other->_impl_.json_name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.default_value_, &other->_impl_.default_value_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_) - + sizeof(Field::_impl_.packed_) - - PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_)>( - reinterpret_cast<char*>(&_impl_.kind_), - reinterpret_cast<char*>(&other->_impl_.kind_)); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.options_.InternalSwap(&other->_impl_.options_); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.type_url_, &other->_impl_.type_url_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.json_name_, &other->_impl_.json_name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.default_value_, &other->_impl_.default_value_, + arena); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_) + + sizeof(Field::_impl_.packed_) - + PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_)>( + reinterpret_cast<char*>(&this_._impl_.kind_), + reinterpret_cast<char*>(&other->_impl_.kind_)); } ::google::protobuf::Metadata Field::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Field_globals_.class_data); } // =================================================================== @@ -1939,11 +1948,11 @@ } Enum::Enum(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Enum_globals_.GetClassData()) { + : Super_(arena, &Enum_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum) } PROTOBUF_NDEBUG_INLINE Enum::Impl_::Impl_( @@ -1972,7 +1981,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Enum& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Enum_globals_.GetClassData()) { + : Super_(arena, &Enum_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -2006,9 +2015,11 @@ name_(arena), edition_(arena) {} -inline void Enum::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast<char*>(&_impl_) + +inline void Enum::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Enum& this_ = static_cast<Enum&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + ::memset(reinterpret_cast<char*>(&this_._impl_) + offsetof(Impl_, source_context_), 0, offsetof(Impl_, syntax_) - @@ -2017,9 +2028,9 @@ } Enum::~Enum() { // @@protoc_insertion_point(destructor:google.protobuf.Enum) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Enum::SharedDtor(MessageLite& self) { +inline void Enum::Helpers_::SharedDtor(MessageLite& self) { Enum& this_ = static_cast<Enum&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2037,7 +2048,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Enum_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Enum_globals_)); - return Enum_globals_.GetClassData(); + return &Enum_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Enum::Helpers_::Clear(MessageLite& base) { @@ -2293,36 +2304,40 @@ } -void Enum::InternalSwap(Enum* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Enum::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Enum* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Enum& this_ = static_cast<Enum&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.enumvalue_.InternalSwap(&other->_impl_.enumvalue_); - _impl_.options_.InternalSwap(&other->_impl_.options_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, &other->_impl_.edition_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_) - + sizeof(Enum::_impl_.syntax_) - - PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_)>( - reinterpret_cast<char*>(&_impl_.source_context_), - reinterpret_cast<char*>(&other->_impl_.source_context_)); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.enumvalue_.InternalSwap(&other->_impl_.enumvalue_); + this_._impl_.options_.InternalSwap(&other->_impl_.options_); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.edition_, &other->_impl_.edition_, + arena); + ::google::protobuf::internal::memswap<PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_) + + sizeof(Enum::_impl_.syntax_) - + PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_)>( + reinterpret_cast<char*>(&this_._impl_.source_context_), + reinterpret_cast<char*>(&other->_impl_.source_context_)); } ::google::protobuf::Metadata Enum::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Enum_globals_.class_data); } // =================================================================== EnumValue::EnumValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, EnumValue_globals_.GetClassData()) { + : Super_(arena, &EnumValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue) } PROTOBUF_NDEBUG_INLINE EnumValue::Impl_::Impl_( @@ -2343,7 +2358,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const EnumValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, EnumValue_globals_.GetClassData()) { + : Super_(arena, &EnumValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -2367,15 +2382,17 @@ , name_(arena) {} -inline void EnumValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.number_ = {}; +inline void EnumValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + EnumValue& this_ = static_cast<EnumValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.number_ = {}; } EnumValue::~EnumValue() { // @@protoc_insertion_point(destructor:google.protobuf.EnumValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void EnumValue::SharedDtor(MessageLite& self) { +inline void EnumValue::Helpers_::SharedDtor(MessageLite& self) { EnumValue& this_ = static_cast<EnumValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2391,7 +2408,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&EnumValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&EnumValue_globals_)); - return EnumValue_globals_.GetClassData(); + return &EnumValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void EnumValue::Helpers_::Clear(MessageLite& base) { @@ -2567,19 +2584,23 @@ } -void EnumValue::InternalSwap(EnumValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void EnumValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + EnumValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + EnumValue& this_ = static_cast<EnumValue&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.options_.InternalSwap(&other->_impl_.options_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - swap(_impl_.number_, other->_impl_.number_); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + this_._impl_.options_.InternalSwap(&other->_impl_.options_); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + swap(this_._impl_.number_, other->_impl_.number_); } ::google::protobuf::Metadata EnumValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(EnumValue_globals_.class_data); } // =================================================================== @@ -2590,11 +2611,11 @@ } Option::Option(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Option_globals_.GetClassData()) { + : Super_(arena, &Option_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Option) } PROTOBUF_NDEBUG_INLINE Option::Impl_::Impl_( @@ -2608,7 +2629,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Option& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Option_globals_.GetClassData()) { + : Super_(arena, &Option_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -2630,15 +2651,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : name_(arena) {} -inline void Option::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void Option::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Option& this_ = static_cast<Option&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } Option::~Option() { // @@protoc_insertion_point(destructor:google.protobuf.Option) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Option::SharedDtor(MessageLite& self) { +inline void Option::Helpers_::SharedDtor(MessageLite& self) { Option& this_ = static_cast<Option&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2655,7 +2678,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Option_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Option_globals_)); - return Option_globals_.GetClassData(); + return &Option_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Option::Helpers_::Clear(MessageLite& base) { @@ -2806,18 +2829,22 @@ } -void Option::InternalSwap(Option* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Option::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Option* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + Option& this_ = static_cast<Option&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - swap(_impl_.value_, other->_impl_.value_); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.name_, &other->_impl_.name_, + arena); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata Option::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Option_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index ffe5e65..0c3af50 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h
@@ -243,7 +243,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Option* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Option)); } #endif @@ -264,7 +264,7 @@ inline Option& operator=(Option&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -301,7 +301,7 @@ inline void Swap(Option* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -309,7 +309,7 @@ void UnsafeArenaSwap(Option* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -360,11 +360,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Option* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Option"; } @@ -376,15 +371,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -427,23 +415,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Option) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Option* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<1, 2, 1, 35, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -484,7 +475,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Field* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Field)); } #endif @@ -505,7 +496,7 @@ inline Field& operator=(Field&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -542,7 +533,7 @@ inline void Swap(Field* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -550,7 +541,7 @@ void UnsafeArenaSwap(Field* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -601,11 +592,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Field* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Field"; } @@ -617,15 +603,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -835,23 +814,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Field) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Field* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<4, 10, 1, 72, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -900,7 +882,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( EnumValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(EnumValue)); } #endif @@ -921,7 +903,7 @@ inline EnumValue& operator=(EnumValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -958,7 +940,7 @@ inline void Swap(EnumValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -966,7 +948,7 @@ void UnsafeArenaSwap(EnumValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1017,11 +999,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(EnumValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.EnumValue"; } @@ -1033,15 +1010,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1100,23 +1070,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, EnumValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<2, 3, 1, 38, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -1158,7 +1131,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Type* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Type)); } #endif @@ -1179,7 +1152,7 @@ inline Type& operator=(Type&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1216,7 +1189,7 @@ inline void Swap(Type* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1224,7 +1197,7 @@ void UnsafeArenaSwap(Type* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1275,11 +1248,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Type* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Type"; } @@ -1291,15 +1259,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1438,23 +1399,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Type) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Type* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<3, 7, 3, 46, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -1500,7 +1464,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Enum* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Enum)); } #endif @@ -1521,7 +1485,7 @@ inline Enum& operator=(Enum&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1558,7 +1522,7 @@ inline void Swap(Enum* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1566,7 +1530,7 @@ void UnsafeArenaSwap(Enum* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1617,11 +1581,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Enum* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Enum"; } @@ -1633,15 +1592,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1753,23 +1705,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Enum) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Enum* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<3, 6, 3, 40, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;
diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc index fa6e028..e29194e 100644 --- a/src/google/protobuf/wrappers.pb.cc +++ b/src/google/protobuf/wrappers.pb.cc
@@ -55,9 +55,18 @@ using HasBits = decltype(::std::declval<UInt64Value>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(UInt64Value, _impl_._has_bits_); + + static constexpr UInt64Value::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr UInt64Value::ParseTableT_ UInt64Value::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr UInt64Value::ParseTableT_ UInt64Value::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(UInt64Value, _impl_._has_bits_), @@ -72,9 +81,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::UInt64Value>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // uint64 value = 1; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(UInt64Value, _impl_.value_), 0>(), @@ -109,39 +115,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL UInt64Value::PlacementNew_( +inline void* PROTOBUF_NONNULL UInt64Value::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) UInt64Value(arena); } -constexpr auto UInt64Value::InternalNewImpl_() { +constexpr auto UInt64Value::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(UInt64Value), alignof(UInt64Value)); } -constexpr auto UInt64Value::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &UInt64Value::MergeImpl, - Super_::GetNewImpl<UInt64Value>(), +constexpr auto UInt64Value::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &UInt64Value::MergeImpl, + Super_::GetNewImpl<UInt64Value>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &UInt64Value::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &UInt64Value::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(UInt64Value, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(UInt64Value, _impl_._cached_size_), &file_reflection_data[3], }; } struct UInt64ValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr UInt64ValueGlobalsTypeInternal() - : MessageGlobalsBase(UInt64Value::InternalGenerateClassData_( - _default, &UInt64Value_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<UInt64Value>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<UInt64Value>( GetClassData())) {} @@ -163,9 +162,18 @@ using HasBits = decltype(::std::declval<UInt32Value>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(UInt32Value, _impl_._has_bits_); + + static constexpr UInt32Value::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr UInt32Value::ParseTableT_ UInt32Value::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr UInt32Value::ParseTableT_ UInt32Value::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(UInt32Value, _impl_._has_bits_), @@ -180,9 +188,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::UInt32Value>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // uint32 value = 1; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(UInt32Value, _impl_.value_), 0>(), @@ -217,39 +222,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL UInt32Value::PlacementNew_( +inline void* PROTOBUF_NONNULL UInt32Value::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) UInt32Value(arena); } -constexpr auto UInt32Value::InternalNewImpl_() { +constexpr auto UInt32Value::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(UInt32Value), alignof(UInt32Value)); } -constexpr auto UInt32Value::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &UInt32Value::MergeImpl, - Super_::GetNewImpl<UInt32Value>(), +constexpr auto UInt32Value::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &UInt32Value::MergeImpl, + Super_::GetNewImpl<UInt32Value>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &UInt32Value::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &UInt32Value::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(UInt32Value, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(UInt32Value, _impl_._cached_size_), &file_reflection_data[5], }; } struct UInt32ValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr UInt32ValueGlobalsTypeInternal() - : MessageGlobalsBase(UInt32Value::InternalGenerateClassData_( - _default, &UInt32Value_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<UInt32Value>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<UInt32Value>( GetClassData())) {} @@ -271,9 +269,18 @@ using HasBits = decltype(::std::declval<StringValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(StringValue, _impl_._has_bits_); + + static constexpr StringValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr StringValue::ParseTableT_ StringValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr StringValue::ParseTableT_ StringValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(StringValue, _impl_._has_bits_), @@ -288,9 +295,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::StringValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // string value = 1; {::_pbi::TcParser::FastUS1, @@ -330,39 +334,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL StringValue::PlacementNew_( +inline void* PROTOBUF_NONNULL StringValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) StringValue(arena); } -constexpr auto StringValue::InternalNewImpl_() { +constexpr auto StringValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(StringValue), alignof(StringValue)); } -constexpr auto StringValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &StringValue::MergeImpl, - Super_::GetNewImpl<StringValue>(), +constexpr auto StringValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &StringValue::MergeImpl, + Super_::GetNewImpl<StringValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &StringValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &StringValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(StringValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(StringValue, _impl_._cached_size_), &file_reflection_data[7], }; } struct StringValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr StringValueGlobalsTypeInternal() - : MessageGlobalsBase(StringValue::InternalGenerateClassData_( - _default, &StringValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<StringValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<StringValue>( GetClassData())) {} @@ -384,9 +381,18 @@ using HasBits = decltype(::std::declval<Int64Value>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Int64Value, _impl_._has_bits_); + + static constexpr Int64Value::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Int64Value::ParseTableT_ Int64Value::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Int64Value::ParseTableT_ Int64Value::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Int64Value, _impl_._has_bits_), @@ -401,9 +407,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Int64Value>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // int64 value = 1; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Int64Value, _impl_.value_), 0>(), @@ -438,39 +441,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Int64Value::PlacementNew_( +inline void* PROTOBUF_NONNULL Int64Value::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Int64Value(arena); } -constexpr auto Int64Value::InternalNewImpl_() { +constexpr auto Int64Value::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Int64Value), alignof(Int64Value)); } -constexpr auto Int64Value::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Int64Value::MergeImpl, - Super_::GetNewImpl<Int64Value>(), +constexpr auto Int64Value::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Int64Value::MergeImpl, + Super_::GetNewImpl<Int64Value>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Int64Value::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Int64Value::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Int64Value, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Int64Value, _impl_._cached_size_), &file_reflection_data[2], }; } struct Int64ValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr Int64ValueGlobalsTypeInternal() - : MessageGlobalsBase(Int64Value::InternalGenerateClassData_( - _default, &Int64Value_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Int64Value>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Int64Value>( GetClassData())) {} @@ -492,9 +488,18 @@ using HasBits = decltype(::std::declval<Int32Value>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(Int32Value, _impl_._has_bits_); + + static constexpr Int32Value::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr Int32Value::ParseTableT_ Int32Value::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr Int32Value::ParseTableT_ Int32Value::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(Int32Value, _impl_._has_bits_), @@ -509,9 +514,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::Int32Value>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // int32 value = 1; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Int32Value, _impl_.value_), 0>(), @@ -546,39 +548,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL Int32Value::PlacementNew_( +inline void* PROTOBUF_NONNULL Int32Value::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) Int32Value(arena); } -constexpr auto Int32Value::InternalNewImpl_() { +constexpr auto Int32Value::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Int32Value), alignof(Int32Value)); } -constexpr auto Int32Value::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &Int32Value::MergeImpl, - Super_::GetNewImpl<Int32Value>(), +constexpr auto Int32Value::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &Int32Value::MergeImpl, + Super_::GetNewImpl<Int32Value>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &Int32Value::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &Int32Value::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Int32Value, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(Int32Value, _impl_._cached_size_), &file_reflection_data[4], }; } struct Int32ValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr Int32ValueGlobalsTypeInternal() - : MessageGlobalsBase(Int32Value::InternalGenerateClassData_( - _default, &Int32Value_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<Int32Value>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<Int32Value>( GetClassData())) {} @@ -600,9 +595,18 @@ using HasBits = decltype(::std::declval<FloatValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(FloatValue, _impl_._has_bits_); + + static constexpr FloatValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr FloatValue::ParseTableT_ FloatValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr FloatValue::ParseTableT_ FloatValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(FloatValue, _impl_._has_bits_), @@ -617,9 +621,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::FloatValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // float value = 1; {::_pbi::TcParser::FastF32S1, @@ -654,39 +655,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL FloatValue::PlacementNew_( +inline void* PROTOBUF_NONNULL FloatValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) FloatValue(arena); } -constexpr auto FloatValue::InternalNewImpl_() { +constexpr auto FloatValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(FloatValue), alignof(FloatValue)); } -constexpr auto FloatValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &FloatValue::MergeImpl, - Super_::GetNewImpl<FloatValue>(), +constexpr auto FloatValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &FloatValue::MergeImpl, + Super_::GetNewImpl<FloatValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &FloatValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &FloatValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(FloatValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(FloatValue, _impl_._cached_size_), &file_reflection_data[1], }; } struct FloatValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr FloatValueGlobalsTypeInternal() - : MessageGlobalsBase(FloatValue::InternalGenerateClassData_( - _default, &FloatValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<FloatValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<FloatValue>( GetClassData())) {} @@ -708,9 +702,18 @@ using HasBits = decltype(::std::declval<DoubleValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(DoubleValue, _impl_._has_bits_); + + static constexpr DoubleValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr DoubleValue::ParseTableT_ DoubleValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr DoubleValue::ParseTableT_ DoubleValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(DoubleValue, _impl_._has_bits_), @@ -725,9 +728,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::DoubleValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // double value = 1; {::_pbi::TcParser::FastF64S1, @@ -762,39 +762,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL DoubleValue::PlacementNew_( +inline void* PROTOBUF_NONNULL DoubleValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) DoubleValue(arena); } -constexpr auto DoubleValue::InternalNewImpl_() { +constexpr auto DoubleValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(DoubleValue), alignof(DoubleValue)); } -constexpr auto DoubleValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &DoubleValue::MergeImpl, - Super_::GetNewImpl<DoubleValue>(), +constexpr auto DoubleValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &DoubleValue::MergeImpl, + Super_::GetNewImpl<DoubleValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &DoubleValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &DoubleValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(DoubleValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(DoubleValue, _impl_._cached_size_), &file_reflection_data[0], }; } struct DoubleValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr DoubleValueGlobalsTypeInternal() - : MessageGlobalsBase(DoubleValue::InternalGenerateClassData_( - _default, &DoubleValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<DoubleValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<DoubleValue>( GetClassData())) {} @@ -816,9 +809,18 @@ using HasBits = decltype(::std::declval<BytesValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(BytesValue, _impl_._has_bits_); + + static constexpr BytesValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr BytesValue::ParseTableT_ BytesValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr BytesValue::ParseTableT_ BytesValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(BytesValue, _impl_._has_bits_), @@ -833,9 +835,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::BytesValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // bytes value = 1; {::_pbi::TcParser::FastBS1, @@ -872,39 +871,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL BytesValue::PlacementNew_( +inline void* PROTOBUF_NONNULL BytesValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) BytesValue(arena); } -constexpr auto BytesValue::InternalNewImpl_() { +constexpr auto BytesValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(BytesValue), alignof(BytesValue)); } -constexpr auto BytesValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &BytesValue::MergeImpl, - Super_::GetNewImpl<BytesValue>(), +constexpr auto BytesValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &BytesValue::MergeImpl, + Super_::GetNewImpl<BytesValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &BytesValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &BytesValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(BytesValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(BytesValue, _impl_._cached_size_), &file_reflection_data[8], }; } struct BytesValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr BytesValueGlobalsTypeInternal() - : MessageGlobalsBase(BytesValue::InternalGenerateClassData_( - _default, &BytesValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<BytesValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<BytesValue>( GetClassData())) {} @@ -926,9 +918,18 @@ using HasBits = decltype(::std::declval<BoolValue>()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = 8 * PROTOBUF_FIELD_OFFSET(BoolValue, _impl_._has_bits_); + + static constexpr BoolValue::ParseTableT_ GenerateParseTable( + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); + static constexpr auto GenerateClassData(); + + static void* PROTOBUF_NONNULL PlacementNew(const void* PROTOBUF_NONNULL, + void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto NewImpl(); }; -constexpr BoolValue::ParseTableT_ BoolValue::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) { +constexpr BoolValue::ParseTableT_ BoolValue::_Internal::GenerateParseTable(const ::_pbi::ClassData* class_data) { return ParseTableT_{ { PROTOBUF_FIELD_OFFSET(BoolValue, _impl_._has_bits_), @@ -943,9 +944,6 @@ class_data, nullptr, // post_loop_handler ::_pbi::TcParser::MpUnknownFields, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::google::protobuf::BoolValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ // bool value = 1; {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(BoolValue, _impl_.value_), 0>(), @@ -980,39 +978,32 @@ ), _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) { } -inline void* PROTOBUF_NONNULL BoolValue::PlacementNew_( +inline void* PROTOBUF_NONNULL BoolValue::_Internal::PlacementNew( const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { return ::new (mem) BoolValue(arena); } -constexpr auto BoolValue::InternalNewImpl_() { +constexpr auto BoolValue::_Internal::NewImpl() { return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(BoolValue), alignof(BoolValue)); } -constexpr auto BoolValue::InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* tc_table) { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &prototype, - tc_table, - nullptr, // IsInitialized - &BoolValue::MergeImpl, - Super_::GetNewImpl<BoolValue>(), +constexpr auto BoolValue::_Internal::GenerateClassData() { + return ::google::protobuf::internal::ClassData{ + nullptr, // IsInitialized + &BoolValue::MergeImpl, + Super_::GetNewImpl<BoolValue>(), #if defined(PROTOBUF_CUSTOM_VTABLE) - &BoolValue::SharedDtor, - &Helpers_::Clear, &Helpers_::ByteSizeLong, - &Helpers_::_InternalSerialize, + &BoolValue::Helpers_::SharedDtor, + &Helpers_::Clear, &Helpers_::ByteSizeLong, + &Helpers_::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(BoolValue, _impl_._cached_size_), - false, - }, + PROTOBUF_FIELD_OFFSET(BoolValue, _impl_._cached_size_), &file_reflection_data[6], }; } struct BoolValueGlobalsTypeInternal : ::_pbi::MessageGlobalsBase { constexpr BoolValueGlobalsTypeInternal() - : MessageGlobalsBase(BoolValue::InternalGenerateClassData_( - _default, &BoolValue_globals_._table.header)), + : MessageGlobalsBase( + ::_pbi::PrivateAccess::GenerateClassData<BoolValue>()), _default(::_pbi::ConstantInitialized{}, GetClassData()), _table(::_pbi::PrivateAccess::GenerateParseTable<BoolValue>( GetClassData())) {} @@ -1147,17 +1138,17 @@ DoubleValue::DoubleValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, DoubleValue_globals_.GetClassData()) { + : Super_(arena, &DoubleValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DoubleValue) } DoubleValue::DoubleValue( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const DoubleValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, DoubleValue_globals_.GetClassData()), + : Super_(arena, &DoubleValue_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -1170,15 +1161,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void DoubleValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void DoubleValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + DoubleValue& this_ = static_cast<DoubleValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } DoubleValue::~DoubleValue() { // @@protoc_insertion_point(destructor:google.protobuf.DoubleValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void DoubleValue::SharedDtor(MessageLite& self) { +inline void DoubleValue::Helpers_::SharedDtor(MessageLite& self) { DoubleValue& this_ = static_cast<DoubleValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1193,7 +1186,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&DoubleValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&DoubleValue_globals_)); - return DoubleValue_globals_.GetClassData(); + return &DoubleValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void DoubleValue::Helpers_::Clear(MessageLite& base) { @@ -1305,31 +1298,34 @@ } -void DoubleValue::InternalSwap(DoubleValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void DoubleValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + DoubleValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + DoubleValue& this_ = static_cast<DoubleValue&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata DoubleValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(DoubleValue_globals_.class_data); } // =================================================================== FloatValue::FloatValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, FloatValue_globals_.GetClassData()) { + : Super_(arena, &FloatValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FloatValue) } FloatValue::FloatValue( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const FloatValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, FloatValue_globals_.GetClassData()), + : Super_(arena, &FloatValue_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -1342,15 +1338,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void FloatValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void FloatValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + FloatValue& this_ = static_cast<FloatValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } FloatValue::~FloatValue() { // @@protoc_insertion_point(destructor:google.protobuf.FloatValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void FloatValue::SharedDtor(MessageLite& self) { +inline void FloatValue::Helpers_::SharedDtor(MessageLite& self) { FloatValue& this_ = static_cast<FloatValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1365,7 +1363,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&FloatValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&FloatValue_globals_)); - return FloatValue_globals_.GetClassData(); + return &FloatValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void FloatValue::Helpers_::Clear(MessageLite& base) { @@ -1477,31 +1475,34 @@ } -void FloatValue::InternalSwap(FloatValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void FloatValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + FloatValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + FloatValue& this_ = static_cast<FloatValue&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata FloatValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(FloatValue_globals_.class_data); } // =================================================================== Int64Value::Int64Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Int64Value_globals_.GetClassData()) { + : Super_(arena, &Int64Value_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Int64Value) } Int64Value::Int64Value( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Int64Value& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Int64Value_globals_.GetClassData()), + : Super_(arena, &Int64Value_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -1514,15 +1515,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void Int64Value::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void Int64Value::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Int64Value& this_ = static_cast<Int64Value&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } Int64Value::~Int64Value() { // @@protoc_insertion_point(destructor:google.protobuf.Int64Value) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Int64Value::SharedDtor(MessageLite& self) { +inline void Int64Value::Helpers_::SharedDtor(MessageLite& self) { Int64Value& this_ = static_cast<Int64Value&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1537,7 +1540,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Int64Value_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Int64Value_globals_)); - return Int64Value_globals_.GetClassData(); + return &Int64Value_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Int64Value::Helpers_::Clear(MessageLite& base) { @@ -1650,31 +1653,34 @@ } -void Int64Value::InternalSwap(Int64Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Int64Value::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Int64Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + Int64Value& this_ = static_cast<Int64Value&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata Int64Value::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Int64Value_globals_.class_data); } // =================================================================== UInt64Value::UInt64Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, UInt64Value_globals_.GetClassData()) { + : Super_(arena, &UInt64Value_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt64Value) } UInt64Value::UInt64Value( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UInt64Value& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, UInt64Value_globals_.GetClassData()), + : Super_(arena, &UInt64Value_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -1687,15 +1693,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void UInt64Value::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void UInt64Value::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + UInt64Value& this_ = static_cast<UInt64Value&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } UInt64Value::~UInt64Value() { // @@protoc_insertion_point(destructor:google.protobuf.UInt64Value) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void UInt64Value::SharedDtor(MessageLite& self) { +inline void UInt64Value::Helpers_::SharedDtor(MessageLite& self) { UInt64Value& this_ = static_cast<UInt64Value&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1710,7 +1718,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&UInt64Value_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&UInt64Value_globals_)); - return UInt64Value_globals_.GetClassData(); + return &UInt64Value_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void UInt64Value::Helpers_::Clear(MessageLite& base) { @@ -1823,31 +1831,34 @@ } -void UInt64Value::InternalSwap(UInt64Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void UInt64Value::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + UInt64Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + UInt64Value& this_ = static_cast<UInt64Value&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata UInt64Value::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(UInt64Value_globals_.class_data); } // =================================================================== Int32Value::Int32Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Int32Value_globals_.GetClassData()) { + : Super_(arena, &Int32Value_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Int32Value) } Int32Value::Int32Value( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Int32Value& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, Int32Value_globals_.GetClassData()), + : Super_(arena, &Int32Value_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -1860,15 +1871,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void Int32Value::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void Int32Value::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + Int32Value& this_ = static_cast<Int32Value&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } Int32Value::~Int32Value() { // @@protoc_insertion_point(destructor:google.protobuf.Int32Value) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void Int32Value::SharedDtor(MessageLite& self) { +inline void Int32Value::Helpers_::SharedDtor(MessageLite& self) { Int32Value& this_ = static_cast<Int32Value&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -1883,7 +1896,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&Int32Value_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Int32Value_globals_)); - return Int32Value_globals_.GetClassData(); + return &Int32Value_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void Int32Value::Helpers_::Clear(MessageLite& base) { @@ -1996,31 +2009,34 @@ } -void Int32Value::InternalSwap(Int32Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void Int32Value::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + Int32Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + Int32Value& this_ = static_cast<Int32Value&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata Int32Value::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(Int32Value_globals_.class_data); } // =================================================================== UInt32Value::UInt32Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, UInt32Value_globals_.GetClassData()) { + : Super_(arena, &UInt32Value_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt32Value) } UInt32Value::UInt32Value( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const UInt32Value& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, UInt32Value_globals_.GetClassData()), + : Super_(arena, &UInt32Value_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -2033,15 +2049,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void UInt32Value::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void UInt32Value::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + UInt32Value& this_ = static_cast<UInt32Value&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } UInt32Value::~UInt32Value() { // @@protoc_insertion_point(destructor:google.protobuf.UInt32Value) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void UInt32Value::SharedDtor(MessageLite& self) { +inline void UInt32Value::Helpers_::SharedDtor(MessageLite& self) { UInt32Value& this_ = static_cast<UInt32Value&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2056,7 +2074,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&UInt32Value_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&UInt32Value_globals_)); - return UInt32Value_globals_.GetClassData(); + return &UInt32Value_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void UInt32Value::Helpers_::Clear(MessageLite& base) { @@ -2169,31 +2187,34 @@ } -void UInt32Value::InternalSwap(UInt32Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void UInt32Value::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + UInt32Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + UInt32Value& this_ = static_cast<UInt32Value&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata UInt32Value::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(UInt32Value_globals_.class_data); } // =================================================================== BoolValue::BoolValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, BoolValue_globals_.GetClassData()) { + : Super_(arena, &BoolValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.BoolValue) } BoolValue::BoolValue( ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BoolValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, BoolValue_globals_.GetClassData()), + : Super_(arena, &BoolValue_globals_.class_data), #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena), #endif // PROTOBUF_CUSTOM_VTABLE @@ -2206,15 +2227,17 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {} -inline void BoolValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.value_ = {}; +inline void BoolValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + BoolValue& this_ = static_cast<BoolValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); + this_._impl_.value_ = {}; } BoolValue::~BoolValue() { // @@protoc_insertion_point(destructor:google.protobuf.BoolValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void BoolValue::SharedDtor(MessageLite& self) { +inline void BoolValue::Helpers_::SharedDtor(MessageLite& self) { BoolValue& this_ = static_cast<BoolValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2229,7 +2252,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&BoolValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&BoolValue_globals_)); - return BoolValue_globals_.GetClassData(); + return &BoolValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void BoolValue::Helpers_::Clear(MessageLite& base) { @@ -2341,25 +2364,28 @@ } -void BoolValue::InternalSwap(BoolValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void BoolValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + BoolValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.value_, other->_impl_.value_); + BoolValue& this_ = static_cast<BoolValue&>(self); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(this_._impl_.value_, other->_impl_.value_); } ::google::protobuf::Metadata BoolValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(BoolValue_globals_.class_data); } // =================================================================== StringValue::StringValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, StringValue_globals_.GetClassData()) { + : Super_(arena, &StringValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.StringValue) } PROTOBUF_NDEBUG_INLINE StringValue::Impl_::Impl_( @@ -2373,7 +2399,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const StringValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, StringValue_globals_.GetClassData()) { + : Super_(arena, &StringValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -2391,14 +2417,16 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : value_(arena) {} -inline void StringValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void StringValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + StringValue& this_ = static_cast<StringValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } StringValue::~StringValue() { // @@protoc_insertion_point(destructor:google.protobuf.StringValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void StringValue::SharedDtor(MessageLite& self) { +inline void StringValue::Helpers_::SharedDtor(MessageLite& self) { StringValue& this_ = static_cast<StringValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2414,7 +2442,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&StringValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&StringValue_globals_)); - return StringValue_globals_.GetClassData(); + return &StringValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void StringValue::Helpers_::Clear(MessageLite& base) { @@ -2535,27 +2563,31 @@ } -void StringValue::InternalSwap(StringValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void StringValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + StringValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + StringValue& this_ = static_cast<StringValue&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.value_, &other->_impl_.value_, + arena); } ::google::protobuf::Metadata StringValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(StringValue_globals_.class_data); } // =================================================================== BytesValue::BytesValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, BytesValue_globals_.GetClassData()) { + : Super_(arena, &BytesValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { #endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); + Helpers_::SharedCtor(*this, arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.BytesValue) } PROTOBUF_NDEBUG_INLINE BytesValue::Impl_::Impl_( @@ -2569,7 +2601,7 @@ ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BytesValue& from) #if defined(PROTOBUF_CUSTOM_VTABLE) - : Super_(arena, BytesValue_globals_.GetClassData()) { + : Super_(arena, &BytesValue_globals_.class_data) { #else // PROTOBUF_CUSTOM_VTABLE : Super_(arena) { @@ -2587,14 +2619,16 @@ [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) : value_(arena) {} -inline void BytesValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); +inline void BytesValue::Helpers_::SharedCtor( + ::_pb::MessageLite& self, ::_pb::Arena* PROTOBUF_NULLABLE arena) { + BytesValue& this_ = static_cast<BytesValue&>(self); + new (&this_._impl_) Impl_(this_.internal_visibility(), arena); } BytesValue::~BytesValue() { // @@protoc_insertion_point(destructor:google.protobuf.BytesValue) - SharedDtor(*this); + Helpers_::SharedDtor(*this); } -inline void BytesValue::SharedDtor(MessageLite& self) { +inline void BytesValue::Helpers_::SharedDtor(MessageLite& self) { BytesValue& this_ = static_cast<BytesValue&>(self); if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { this_.CheckHasBitConsistency(); @@ -2610,7 +2644,7 @@ ::google::protobuf::internal::PrefetchToLocalCache(&BytesValue_globals_); ::google::protobuf::internal::PrefetchToLocalCache( ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&BytesValue_globals_)); - return BytesValue_globals_.GetClassData(); + return &BytesValue_globals_.class_data; } #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_NOINLINE void BytesValue::Helpers_::Clear(MessageLite& base) { @@ -2729,17 +2763,21 @@ } -void BytesValue::InternalSwap(BytesValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { +void BytesValue::Helpers_::InternalSwap( + ::_pb::MessageLite& PROTOBUF_RESTRICT self, + BytesValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { using ::std::swap; - auto* arena = GetArena(); + BytesValue& this_ = static_cast<BytesValue&>(self); + auto* arena = this_.GetArena(); ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); + this_._internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(this_._impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&this_._impl_.value_, &other->_impl_.value_, + arena); } ::google::protobuf::Metadata BytesValue::GetMetadata() const { - return Super_::GetMetadataImpl(GetClassData()->full()); + return Super_::GetMetadataImpl(BytesValue_globals_.class_data); } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf
diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index fd12d0a..8c3b338 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h
@@ -95,7 +95,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( UInt64Value* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(UInt64Value)); } #endif @@ -116,7 +116,7 @@ inline UInt64Value& operator=(UInt64Value&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -153,7 +153,7 @@ inline void Swap(UInt64Value* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -161,7 +161,7 @@ void UnsafeArenaSwap(UInt64Value* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -212,11 +212,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(UInt64Value* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.UInt64Value"; } @@ -228,15 +223,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -258,23 +246,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.UInt64Value) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, UInt64Value* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -314,7 +305,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( UInt32Value* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(UInt32Value)); } #endif @@ -335,7 +326,7 @@ inline UInt32Value& operator=(UInt32Value&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -372,7 +363,7 @@ inline void Swap(UInt32Value* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -380,7 +371,7 @@ void UnsafeArenaSwap(UInt32Value* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -431,11 +422,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(UInt32Value* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.UInt32Value"; } @@ -447,15 +433,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -477,23 +456,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.UInt32Value) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, UInt32Value* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -533,7 +515,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( StringValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(StringValue)); } #endif @@ -554,7 +536,7 @@ inline StringValue& operator=(StringValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -591,7 +573,7 @@ inline void Swap(StringValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -599,7 +581,7 @@ void UnsafeArenaSwap(StringValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -650,11 +632,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(StringValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.StringValue"; } @@ -666,15 +643,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -701,23 +671,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.StringValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, StringValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 41, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -757,7 +730,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Int64Value* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Int64Value)); } #endif @@ -778,7 +751,7 @@ inline Int64Value& operator=(Int64Value&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -815,7 +788,7 @@ inline void Swap(Int64Value* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -823,7 +796,7 @@ void UnsafeArenaSwap(Int64Value* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -874,11 +847,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Int64Value* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Int64Value"; } @@ -890,15 +858,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -920,23 +881,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Int64Value* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -976,7 +940,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( Int32Value* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(Int32Value)); } #endif @@ -997,7 +961,7 @@ inline Int32Value& operator=(Int32Value&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1034,7 +998,7 @@ inline void Swap(Int32Value* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1042,7 +1006,7 @@ void UnsafeArenaSwap(Int32Value* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1093,11 +1057,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Int32Value* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.Int32Value"; } @@ -1109,15 +1068,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1139,23 +1091,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, Int32Value* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -1195,7 +1150,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( FloatValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(FloatValue)); } #endif @@ -1216,7 +1171,7 @@ inline FloatValue& operator=(FloatValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1253,7 +1208,7 @@ inline void Swap(FloatValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1261,7 +1216,7 @@ void UnsafeArenaSwap(FloatValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1312,11 +1267,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(FloatValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.FloatValue"; } @@ -1328,15 +1278,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1358,23 +1301,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, FloatValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -1414,7 +1360,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( DoubleValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(DoubleValue)); } #endif @@ -1435,7 +1381,7 @@ inline DoubleValue& operator=(DoubleValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1472,7 +1418,7 @@ inline void Swap(DoubleValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1480,7 +1426,7 @@ void UnsafeArenaSwap(DoubleValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1531,11 +1477,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(DoubleValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.DoubleValue"; } @@ -1547,15 +1488,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1577,23 +1511,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, DoubleValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -1633,7 +1570,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( BytesValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(BytesValue)); } #endif @@ -1654,7 +1591,7 @@ inline BytesValue& operator=(BytesValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1691,7 +1628,7 @@ inline void Swap(BytesValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1699,7 +1636,7 @@ void UnsafeArenaSwap(BytesValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1750,11 +1687,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(BytesValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.BytesValue"; } @@ -1766,15 +1698,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -1801,23 +1726,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, BytesValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -1857,7 +1785,7 @@ #if defined(PROTOBUF_CUSTOM_VTABLE) PROTOBUF_ALWAYS_INLINE_NODEBUG void operator delete( BoolValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); + Helpers_::SharedDtor(*msg); ::google::protobuf::internal::SizedDelete(msg, sizeof(BoolValue)); } #endif @@ -1878,7 +1806,7 @@ inline BoolValue& operator=(BoolValue&& from) noexcept { if (this == &from) return *this; if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); + Helpers_::InternalSwap(*this, &from); } else { CopyFrom(from); } @@ -1915,7 +1843,7 @@ inline void Swap(BoolValue* PROTOBUF_NONNULL other) { if (other == this) return; if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } else { ::google::protobuf::internal::GenericSwap(this, other); } @@ -1923,7 +1851,7 @@ void UnsafeArenaSwap(BoolValue* PROTOBUF_NONNULL other) { if (other == this) return; ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); + Helpers_::InternalSwap(*this, other); } // implements Message ---------------------------------------------- @@ -1974,11 +1902,6 @@ return _impl_._cached_size_.Get(); } - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(BoolValue* PROTOBUF_NONNULL other); - private: static ::absl::string_view FullMessageName() { return "google.protobuf.BoolValue"; } @@ -1990,15 +1913,8 @@ *this = ::std::move(from); } const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); public: - static constexpr auto InternalGenerateClassData_( - const MessageLite& prototype, - const ::google::protobuf::internal::TcParseTableBase* PROTOBUF_NULLABLE tc_table = nullptr); [[nodiscard]] ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -2020,23 +1936,26 @@ // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue) private: class _Internal; -#if defined(PROTOBUF_CUSTOM_VTABLE) struct Helpers_ { PROTOBUF_NODEBUG Helpers_(); + + static void SharedCtor(MessageLite& self, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + static void InternalSwap(MessageLite& self, BoolValue* PROTOBUF_NONNULL other); + +#if defined(PROTOBUF_CUSTOM_VTABLE) static void Clear(::google::protobuf::MessageLite& msg); [[nodiscard]] static::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); [[nodiscard]] static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - }; #endif // PROTOBUF_CUSTOM_VTABLE + }; using ParseTableT_ = ::google::protobuf::internal::TcParseTable<0, 1, 0, 0, 2>; - static constexpr ParseTableT_ InternalGenerateParseTable_( - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); - friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena;