From 6a95fad9129003f12fde67a6a27c53fefc68628b Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 20 Aug 2024 17:20:50 +0000 Subject: [PATCH] Auto-generate files after cl/665411723 --- src/google/protobuf/any.pb.cc | 10 ++- src/google/protobuf/any.pb.h | 5 +- src/google/protobuf/api.pb.cc | 58 ++++++++++++- src/google/protobuf/api.pb.h | 15 +++- src/google/protobuf/duration.pb.cc | 10 ++- src/google/protobuf/duration.pb.h | 5 +- src/google/protobuf/empty.pb.cc | 10 ++- src/google/protobuf/empty.pb.h | 5 +- src/google/protobuf/field_mask.pb.cc | 21 ++++- src/google/protobuf/field_mask.pb.h | 5 +- src/google/protobuf/source_context.pb.cc | 10 ++- src/google/protobuf/source_context.pb.h | 5 +- src/google/protobuf/struct.pb.cc | 65 +++++++++++++-- src/google/protobuf/struct.pb.h | 22 ++++- src/google/protobuf/timestamp.pb.cc | 10 ++- src/google/protobuf/timestamp.pb.h | 5 +- src/google/protobuf/type.pb.cc | 102 +++++++++++++++++++++-- src/google/protobuf/type.pb.h | 25 ++++-- src/google/protobuf/wrappers.pb.cc | 82 ++++++++++++++++-- src/google/protobuf/wrappers.pb.h | 45 ++++++++-- 20 files changed, 460 insertions(+), 55 deletions(-) diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index 2f38832f54..f27d031ab5 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -188,6 +189,13 @@ inline void Any::SharedDtor() { _impl_.~Impl_(); } +inline void* Any::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Any(arena); +} +constexpr auto Any::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Any)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -198,9 +206,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Any::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Any::ByteSizeLong, &Any::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 79bea6da18..c073a1981c 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -190,7 +190,7 @@ class PROTOBUF_EXPORT Any final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Any* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Any* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -246,6 +246,9 @@ class PROTOBUF_EXPORT Any final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 2d51ccf914..ddec0837ce 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -334,6 +335,32 @@ inline void Api::SharedDtor() { _impl_.~Impl_(); } +inline void* Api::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Api(arena); +} +constexpr auto Api::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Api, _impl_.methods_) + + decltype(Api::_impl_.methods_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Api, _impl_.options_) + + decltype(Api::_impl_.options_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Api, _impl_.mixins_) + + decltype(Api::_impl_.mixins_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Api), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Api::PlacementNew_, + sizeof(Api)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -344,9 +371,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Api::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Api::ByteSizeLong, &Api::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -769,6 +796,24 @@ inline void Method::SharedDtor() { _impl_.~Impl_(); } +inline void* Method::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Method(arena); +} +constexpr auto Method::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Method, _impl_.options_) + + decltype(Method::_impl_.options_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Method), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Method::PlacementNew_, + sizeof(Method)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -779,9 +824,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Method::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Method::ByteSizeLong, &Method::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1147,6 +1192,13 @@ inline void Mixin::SharedDtor() { _impl_.~Impl_(); } +inline void* Mixin::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Mixin(arena); +} +constexpr auto Mixin::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Mixin)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -1157,9 +1209,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Mixin::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Mixin::ByteSizeLong, &Mixin::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index d05be84724..234e7c4345 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -150,7 +150,7 @@ class PROTOBUF_EXPORT Mixin final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Mixin* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Mixin* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -206,6 +206,9 @@ class PROTOBUF_EXPORT Mixin final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: @@ -360,7 +363,7 @@ class PROTOBUF_EXPORT Method final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Method* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Method* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -416,6 +419,9 @@ class PROTOBUF_EXPORT Method final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: @@ -643,7 +649,7 @@ class PROTOBUF_EXPORT Api final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Api* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Api* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -699,6 +705,9 @@ class PROTOBUF_EXPORT Api final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index ddbda94b36..526fb9bd0a 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -151,6 +152,13 @@ inline void Duration::SharedDtor() { _impl_.~Impl_(); } +inline void* Duration::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Duration(arena); +} +constexpr auto Duration::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Duration)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -161,9 +169,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Duration::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Duration::ByteSizeLong, &Duration::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index b1414b3f64..d3c3b4d363 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -142,7 +142,7 @@ class PROTOBUF_EXPORT Duration final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Duration* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Duration* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -198,6 +198,9 @@ class PROTOBUF_EXPORT Duration final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index ce7099c2ba..31811d5168 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -126,6 +127,13 @@ Empty::Empty( // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) } +inline void* Empty::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Empty(arena); +} +constexpr auto Empty::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Empty)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -136,9 +144,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Empty::MergeImpl, + ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::internal::ZeroFieldsBase::GetDeleteImpl(), - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &Empty::ByteSizeLong, &Empty::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index cc0f39a2b7..328d119e50 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -142,7 +142,7 @@ class PROTOBUF_EXPORT Empty final : public ::google::protobuf::internal::ZeroFie // implements Message ---------------------------------------------- - Empty* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Empty* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); } using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; @@ -170,6 +170,9 @@ class PROTOBUF_EXPORT Empty final : public ::google::protobuf::internal::ZeroFie *this = ::std::move(from); } const ::google::protobuf::internal::ZeroFieldsBase::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::internal::ZeroFieldsBase::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 9de7ccfada..8b0cebc802 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -161,6 +162,24 @@ inline void FieldMask::SharedDtor() { _impl_.~Impl_(); } +inline void* FieldMask::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) FieldMask(arena); +} +constexpr auto FieldMask::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(FieldMask, _impl_.paths_) + + decltype(FieldMask::_impl_.paths_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(FieldMask), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&FieldMask::PlacementNew_, + sizeof(FieldMask)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -171,9 +190,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &FieldMask::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &FieldMask::ByteSizeLong, &FieldMask::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index b6f7e493c4..552a6e969e 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -142,7 +142,7 @@ class PROTOBUF_EXPORT FieldMask final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - FieldMask* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + FieldMask* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -198,6 +198,9 @@ class PROTOBUF_EXPORT FieldMask final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 84c62f1bf1..86b0aefd44 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -164,6 +165,13 @@ inline void SourceContext::SharedDtor() { _impl_.~Impl_(); } +inline void* SourceContext::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) SourceContext(arena); +} +constexpr auto SourceContext::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SourceContext)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -174,9 +182,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &SourceContext::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &SourceContext::ByteSizeLong, &SourceContext::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 806d61478c..099fb8371c 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -142,7 +142,7 @@ class PROTOBUF_EXPORT SourceContext final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - SourceContext* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + SourceContext* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -198,6 +198,9 @@ class PROTOBUF_EXPORT SourceContext final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index df869743a9..c4e5e7c8fe 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -244,6 +245,13 @@ bool NullValue_IsValid(int value) { Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() : SuperType() {} Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} #endif // PROTOBUF_CUSTOM_VTABLE + inline void* Struct_FieldsEntry_DoNotUse::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Struct_FieldsEntry_DoNotUse(arena); + } + constexpr auto Struct_FieldsEntry_DoNotUse::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Struct_FieldsEntry_DoNotUse)); + } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -254,9 +262,9 @@ bool NullValue_IsValid(int value) { nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Struct_FieldsEntry_DoNotUse::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::ClearImpl, ::google::protobuf::Message::ByteSizeLongImpl, ::google::protobuf::Message::_InternalSerializeImpl, #endif // PROTOBUF_CUSTOM_VTABLE @@ -371,6 +379,28 @@ inline void Struct::SharedDtor() { _impl_.~Impl_(); } +inline void* Struct::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Struct(arena); +} +constexpr auto Struct::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Struct, _impl_.fields_) + + decltype(Struct::_impl_.fields_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Struct, _impl_.fields_) + + decltype(Struct::_impl_.fields_):: + InternalGetArenaOffsetAlt( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Struct), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Struct::PlacementNew_, + sizeof(Struct)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -381,9 +411,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Struct::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Struct::ByteSizeLong, &Struct::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -430,7 +460,7 @@ const ::_pbi::TcParseTable<0, 1, 2, 37, 2> Struct::_table_ = { decltype(Struct()._impl_.fields_)>( 1, 0, 0, 9, 11)}, - {::_pbi::TcParser::CreateInArenaStorageCb<::google::protobuf::Value>}, + {::_pbi::TcParser::GetTable<::google::protobuf::Value>()}, }}, {{ "\26\6\0\0\0\0\0\0" "google.protobuf.Struct" @@ -715,6 +745,13 @@ void Value::clear_kind() { } +inline void* Value::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Value(arena); +} +constexpr auto Value::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Value)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -725,9 +762,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Value::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Value::ByteSizeLong, &Value::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1065,6 +1102,24 @@ inline void ListValue::SharedDtor() { _impl_.~Impl_(); } +inline void* ListValue::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) ListValue(arena); +} +constexpr auto ListValue::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(ListValue, _impl_.values_) + + decltype(ListValue::_impl_.values_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ListValue), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&ListValue::PlacementNew_, + sizeof(ListValue)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -1075,9 +1130,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &ListValue::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &ListValue::ByteSizeLong, &ListValue::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 9fceeb3759..c4e3ec5660 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -187,7 +187,7 @@ class PROTOBUF_EXPORT ListValue final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - ListValue* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + ListValue* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -243,6 +243,9 @@ class PROTOBUF_EXPORT ListValue final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: @@ -380,7 +383,7 @@ class PROTOBUF_EXPORT Struct final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Struct* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Struct* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -436,6 +439,9 @@ class PROTOBUF_EXPORT Struct final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: @@ -519,6 +525,9 @@ class Struct_FieldsEntry_DoNotUse final private: + friend class ::google::protobuf::MessageLite; + friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; + friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< 1, 2, 1, @@ -526,8 +535,10 @@ class Struct_FieldsEntry_DoNotUse final _table_; const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; - friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; }; // ------------------------------------------------------------------- @@ -617,7 +628,7 @@ class PROTOBUF_EXPORT Value final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Value* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Value* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -673,6 +684,9 @@ class PROTOBUF_EXPORT Value final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 9dbca85a05..8f7597e322 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -151,6 +152,13 @@ inline void Timestamp::SharedDtor() { _impl_.~Impl_(); } +inline void* Timestamp::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Timestamp(arena); +} +constexpr auto Timestamp::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Timestamp)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -161,9 +169,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Timestamp::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Timestamp::ByteSizeLong, &Timestamp::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 1b9cc67ae9..3f68d6000c 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -142,7 +142,7 @@ class PROTOBUF_EXPORT Timestamp final : public ::google::protobuf::Message // implements Message ---------------------------------------------- - Timestamp* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + Timestamp* New(::google::protobuf::Arena* arena = nullptr) const { return ::google::protobuf::Message::DefaultConstruct(arena); } using ::google::protobuf::Message::CopyFrom; @@ -198,6 +198,9 @@ class PROTOBUF_EXPORT Timestamp final : public ::google::protobuf::Message *this = ::std::move(from); } const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); static const ::google::protobuf::Message::ClassDataFull _class_data_; public: diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 5597e6dfc1..654f3207e1 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -10,6 +10,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" @@ -526,6 +527,32 @@ inline void Type::SharedDtor() { _impl_.~Impl_(); } +inline void* Type::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Type(arena); +} +constexpr auto Type::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Type, _impl_.fields_) + + decltype(Type::_impl_.fields_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Type, _impl_.oneofs_) + + decltype(Type::_impl_.oneofs_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Type, _impl_.options_) + + decltype(Type::_impl_.options_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Type), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Type::PlacementNew_, + sizeof(Type)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -536,9 +563,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Type::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Type::ByteSizeLong, &Type::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -958,6 +985,24 @@ inline void Field::SharedDtor() { _impl_.~Impl_(); } +inline void* Field::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Field(arena); +} +constexpr auto Field::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Field, _impl_.options_) + + decltype(Field::_impl_.options_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Field), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Field::PlacementNew_, + sizeof(Field)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -968,9 +1013,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Field::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Field::ByteSizeLong, &Field::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1435,6 +1480,28 @@ inline void Enum::SharedDtor() { _impl_.~Impl_(); } +inline void* Enum::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Enum(arena); +} +constexpr auto Enum::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(Enum, _impl_.enumvalue_) + + decltype(Enum::_impl_.enumvalue_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + PROTOBUF_FIELD_OFFSET(Enum, _impl_.options_) + + decltype(Enum::_impl_.options_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Enum), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&Enum::PlacementNew_, + sizeof(Enum)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -1445,9 +1512,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Enum::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &Enum::ByteSizeLong, &Enum::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1821,6 +1888,24 @@ inline void EnumValue::SharedDtor() { _impl_.~Impl_(); } +inline void* EnumValue::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) EnumValue(arena); +} +constexpr auto EnumValue::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.options_) + + decltype(EnumValue::_impl_.options_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(EnumValue), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&EnumValue::PlacementNew_, + sizeof(EnumValue)); + } +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -1831,9 +1916,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &EnumValue::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), - ::google::protobuf::Message::GetNewImpl(), ::google::protobuf::Message::GetClearImpl(), &EnumValue::ByteSizeLong, &EnumValue::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -2115,6 +2200,13 @@ inline void Option::SharedDtor() { _impl_.~Impl_(); } +inline void* Option::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) Option(arena); +} +constexpr auto Option::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Option)); +} PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::google::protobuf::MessageLite::ClassDataFull @@ -2125,9 +2217,9 @@ const ::google::protobuf::MessageLite::ClassDataFull nullptr, // OnDemandRegisterArenaDtor nullptr, // IsInitialized &Option::MergeImpl, + ::google::protobuf::Message::GetNewImpl