From 5771b066723f102c720ac69b0df47ce9a6ab4176 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 10 Sep 2024 17:31:20 +0000 Subject: [PATCH] Auto-generate files after cl/673010897 --- src/google/protobuf/any.pb.cc | 17 ++-- src/google/protobuf/any.pb.h | 10 +- src/google/protobuf/api.pb.cc | 55 ++++++----- src/google/protobuf/api.pb.h | 30 +++++- src/google/protobuf/duration.pb.cc | 13 +-- src/google/protobuf/duration.pb.h | 10 +- src/google/protobuf/empty.pb.cc | 2 +- src/google/protobuf/empty.pb.h | 8 ++ src/google/protobuf/field_mask.pb.cc | 13 +-- src/google/protobuf/field_mask.pb.h | 10 +- src/google/protobuf/source_context.pb.cc | 15 +-- src/google/protobuf/source_context.pb.h | 10 +- src/google/protobuf/struct.pb.cc | 45 +++++---- src/google/protobuf/struct.pb.h | 30 +++++- src/google/protobuf/timestamp.pb.cc | 13 +-- src/google/protobuf/timestamp.pb.h | 10 +- src/google/protobuf/type.pb.cc | 91 +++++++++-------- src/google/protobuf/type.pb.h | 50 +++++++++- src/google/protobuf/wrappers.pb.cc | 121 ++++++++++++----------- src/google/protobuf/wrappers.pb.h | 90 +++++++++++++++-- 20 files changed, 438 insertions(+), 205 deletions(-) diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index e878857bca..199d4d0b4b 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -176,14 +176,15 @@ inline void Any::SharedCtor(::_pb::Arena* arena) { } Any::~Any() { // @@protoc_insertion_point(destructor:google.protobuf.Any) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Any::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.type_url_.Destroy(); - _impl_.value_.Destroy(); - _impl_.~Impl_(); +inline void Any::SharedDtor(MessageLite& self) { + Any& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.type_url_.Destroy(); + this_._impl_.value_.Destroy(); + this_._impl_.~Impl_(); } inline void* Any::PlacementNew_(const void*, void* mem, @@ -205,7 +206,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Any::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Any::SharedDtor, ::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 96bd00f777..87650f0842 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -72,6 +72,14 @@ class PROTOBUF_EXPORT Any final public: inline Any() : Any(nullptr) {} ~Any() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Any* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Any)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Any( ::google::protobuf::internal::ConstantInitialized); @@ -234,7 +242,7 @@ class PROTOBUF_EXPORT Any final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Any* other); private: template diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index ddec0837ce..6ff59bf2d1 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -324,15 +324,16 @@ inline void Api::SharedCtor(::_pb::Arena* arena) { } Api::~Api() { // @@protoc_insertion_point(destructor:google.protobuf.Api) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Api::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.version_.Destroy(); - delete _impl_.source_context_; - _impl_.~Impl_(); +inline void Api::SharedDtor(MessageLite& self) { + Api& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.version_.Destroy(); + delete this_._impl_.source_context_; + this_._impl_.~Impl_(); } inline void* Api::PlacementNew_(const void*, void* mem, @@ -373,7 +374,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Api::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Api::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Api::ByteSizeLong, &Api::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -785,15 +786,16 @@ inline void Method::SharedCtor(::_pb::Arena* arena) { } Method::~Method() { // @@protoc_insertion_point(destructor:google.protobuf.Method) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Method::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.request_type_url_.Destroy(); - _impl_.response_type_url_.Destroy(); - _impl_.~Impl_(); +inline void Method::SharedDtor(MessageLite& self) { + Method& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.request_type_url_.Destroy(); + this_._impl_.response_type_url_.Destroy(); + this_._impl_.~Impl_(); } inline void* Method::PlacementNew_(const void*, void* mem, @@ -826,7 +828,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Method::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Method::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Method::ByteSizeLong, &Method::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1182,14 +1184,15 @@ inline void Mixin::SharedCtor(::_pb::Arena* arena) { } Mixin::~Mixin() { // @@protoc_insertion_point(destructor:google.protobuf.Mixin) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Mixin::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.root_.Destroy(); - _impl_.~Impl_(); +inline void Mixin::SharedDtor(MessageLite& self) { + Mixin& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.root_.Destroy(); + this_._impl_.~Impl_(); } inline void* Mixin::PlacementNew_(const void*, void* mem, @@ -1211,7 +1214,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Mixin::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Mixin::SharedDtor, ::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 b69fbe91c1..65ac80ad03 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -80,6 +80,14 @@ class PROTOBUF_EXPORT Mixin final public: inline Mixin() : Mixin(nullptr) {} ~Mixin() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Mixin* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Mixin)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Mixin( ::google::protobuf::internal::ConstantInitialized); @@ -186,7 +194,7 @@ class PROTOBUF_EXPORT Mixin final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Mixin* other); private: template @@ -288,6 +296,14 @@ class PROTOBUF_EXPORT Method final public: inline Method() : Method(nullptr) {} ~Method() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Method* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Method)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Method( ::google::protobuf::internal::ConstantInitialized); @@ -394,7 +410,7 @@ class PROTOBUF_EXPORT Method final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Method* other); private: template @@ -569,6 +585,14 @@ class PROTOBUF_EXPORT Api final public: inline Api() : Api(nullptr) {} ~Api() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Api* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Api)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Api( ::google::protobuf::internal::ConstantInitialized); @@ -675,7 +699,7 @@ class PROTOBUF_EXPORT Api final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Api* other); private: template diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index 526fb9bd0a..68612c8ec1 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -144,12 +144,13 @@ inline void Duration::SharedCtor(::_pb::Arena* arena) { } Duration::~Duration() { // @@protoc_insertion_point(destructor:google.protobuf.Duration) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Duration::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.~Impl_(); +inline void Duration::SharedDtor(MessageLite& self) { + Duration& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); } inline void* Duration::PlacementNew_(const void*, void* mem, @@ -171,7 +172,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Duration::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Duration::SharedDtor, ::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 db1a56242b..896203cda2 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -72,6 +72,14 @@ class PROTOBUF_EXPORT Duration final public: inline Duration() : Duration(nullptr) {} ~Duration() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Duration* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Duration)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Duration( ::google::protobuf::internal::ConstantInitialized); @@ -178,7 +186,7 @@ class PROTOBUF_EXPORT Duration final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Duration* other); private: template diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 31811d5168..fb84f8debb 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -146,7 +146,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Empty::MergeImpl, ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::internal::ZeroFieldsBase::GetDeleteImpl(), + &Empty::SharedDtor, ::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 0fb6113886..28b7f76150 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -72,6 +72,14 @@ class PROTOBUF_EXPORT Empty final /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ { public: inline Empty() : Empty(nullptr) {} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Empty* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Empty)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Empty( ::google::protobuf::internal::ConstantInitialized); diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 8b0cebc802..cdc009c135 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -154,12 +154,13 @@ inline void FieldMask::SharedCtor(::_pb::Arena* arena) { } FieldMask::~FieldMask() { // @@protoc_insertion_point(destructor:google.protobuf.FieldMask) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void FieldMask::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.~Impl_(); +inline void FieldMask::SharedDtor(MessageLite& self) { + FieldMask& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); } inline void* FieldMask::PlacementNew_(const void*, void* mem, @@ -192,7 +193,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &FieldMask::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &FieldMask::SharedDtor, ::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 9734e5e11a..9a7127d03f 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -72,6 +72,14 @@ class PROTOBUF_EXPORT FieldMask final public: inline FieldMask() : FieldMask(nullptr) {} ~FieldMask() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(FieldMask* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(FieldMask)); + } +#endif + template explicit PROTOBUF_CONSTEXPR FieldMask( ::google::protobuf::internal::ConstantInitialized); @@ -178,7 +186,7 @@ class PROTOBUF_EXPORT FieldMask final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(FieldMask* other); private: template diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 86b0aefd44..4439b1d2ad 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -156,13 +156,14 @@ inline void SourceContext::SharedCtor(::_pb::Arena* arena) { } SourceContext::~SourceContext() { // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void SourceContext::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.file_name_.Destroy(); - _impl_.~Impl_(); +inline void SourceContext::SharedDtor(MessageLite& self) { + SourceContext& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.file_name_.Destroy(); + this_._impl_.~Impl_(); } inline void* SourceContext::PlacementNew_(const void*, void* mem, @@ -184,7 +185,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &SourceContext::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &SourceContext::SharedDtor, ::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 589afa5499..02e6f262a9 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -72,6 +72,14 @@ class PROTOBUF_EXPORT SourceContext final public: inline SourceContext() : SourceContext(nullptr) {} ~SourceContext() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SourceContext* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SourceContext)); + } +#endif + template explicit PROTOBUF_CONSTEXPR SourceContext( ::google::protobuf::internal::ConstantInitialized); @@ -178,7 +186,7 @@ class PROTOBUF_EXPORT SourceContext final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(SourceContext* other); private: template diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index d40e55bd1c..206c37a34a 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -264,7 +264,7 @@ bool NullValue_IsValid(int value) { &Struct_FieldsEntry_DoNotUse::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Struct_FieldsEntry_DoNotUse::SharedDtor, static_cast( &Struct_FieldsEntry_DoNotUse::ClearImpl), ::google::protobuf::Message::ByteSizeLongImpl, ::google::protobuf::Message::_InternalSerializeImpl @@ -373,12 +373,13 @@ inline void Struct::SharedCtor(::_pb::Arena* arena) { } Struct::~Struct() { // @@protoc_insertion_point(destructor:google.protobuf.Struct) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Struct::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.~Impl_(); +inline void Struct::SharedDtor(MessageLite& self) { + Struct& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); } inline void* Struct::PlacementNew_(const void*, void* mem, @@ -415,7 +416,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Struct::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Struct::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Struct::ByteSizeLong, &Struct::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -692,15 +693,16 @@ inline void Value::SharedCtor(::_pb::Arena* arena) { } Value::~Value() { // @@protoc_insertion_point(destructor:google.protobuf.Value) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Value::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - if (has_kind()) { - clear_kind(); +inline void Value::SharedDtor(MessageLite& self) { + Value& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + if (this_.has_kind()) { + this_.clear_kind(); } - _impl_.~Impl_(); + this_._impl_.~Impl_(); } void Value::clear_kind() { @@ -766,7 +768,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Value::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Value::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Value::ByteSizeLong, &Value::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1096,12 +1098,13 @@ inline void ListValue::SharedCtor(::_pb::Arena* arena) { } ListValue::~ListValue() { // @@protoc_insertion_point(destructor:google.protobuf.ListValue) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void ListValue::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.~Impl_(); +inline void ListValue::SharedDtor(MessageLite& self) { + ListValue& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); } inline void* ListValue::PlacementNew_(const void*, void* mem, @@ -1134,7 +1137,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &ListValue::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &ListValue::SharedDtor, ::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 4379f3c430..7aa0c1f356 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -117,6 +117,14 @@ class PROTOBUF_EXPORT ListValue final public: inline ListValue() : ListValue(nullptr) {} ~ListValue() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ListValue* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ListValue)); + } +#endif + template explicit PROTOBUF_CONSTEXPR ListValue( ::google::protobuf::internal::ConstantInitialized); @@ -223,7 +231,7 @@ class PROTOBUF_EXPORT ListValue final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(ListValue* other); private: template @@ -308,6 +316,14 @@ class PROTOBUF_EXPORT Struct final public: inline Struct() : Struct(nullptr) {} ~Struct() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Struct* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Struct)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Struct( ::google::protobuf::internal::ConstantInitialized); @@ -414,7 +430,7 @@ class PROTOBUF_EXPORT Struct final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Struct* other); private: template @@ -539,6 +555,14 @@ class PROTOBUF_EXPORT Value final public: inline Value() : Value(nullptr) {} ~Value() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Value* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Value)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Value( ::google::protobuf::internal::ConstantInitialized); @@ -654,7 +678,7 @@ class PROTOBUF_EXPORT Value final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Value* other); private: template diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 8f7597e322..1d31f2016c 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -144,12 +144,13 @@ inline void Timestamp::SharedCtor(::_pb::Arena* arena) { } Timestamp::~Timestamp() { // @@protoc_insertion_point(destructor:google.protobuf.Timestamp) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Timestamp::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.~Impl_(); +inline void Timestamp::SharedDtor(MessageLite& self) { + Timestamp& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); } inline void* Timestamp::PlacementNew_(const void*, void* mem, @@ -171,7 +172,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Timestamp::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Timestamp::SharedDtor, ::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 43fcee35aa..70a4c65947 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -72,6 +72,14 @@ class PROTOBUF_EXPORT Timestamp final public: inline Timestamp() : Timestamp(nullptr) {} ~Timestamp() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(Timestamp* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(Timestamp)); + } +#endif + template explicit PROTOBUF_CONSTEXPR Timestamp( ::google::protobuf::internal::ConstantInitialized); @@ -178,7 +186,7 @@ class PROTOBUF_EXPORT Timestamp final private: void SharedCtor(::google::protobuf::Arena* arena); - void SharedDtor(); + static void SharedDtor(MessageLite& self); void InternalSwap(Timestamp* other); private: template diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 654f3207e1..50e9caa6a4 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -516,15 +516,16 @@ inline void Type::SharedCtor(::_pb::Arena* arena) { } Type::~Type() { // @@protoc_insertion_point(destructor:google.protobuf.Type) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Type::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.edition_.Destroy(); - delete _impl_.source_context_; - _impl_.~Impl_(); +inline void Type::SharedDtor(MessageLite& self) { + Type& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.edition_.Destroy(); + delete this_._impl_.source_context_; + this_._impl_.~Impl_(); } inline void* Type::PlacementNew_(const void*, void* mem, @@ -565,7 +566,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Type::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Type::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Type::ByteSizeLong, &Type::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -973,16 +974,17 @@ inline void Field::SharedCtor(::_pb::Arena* arena) { } Field::~Field() { // @@protoc_insertion_point(destructor:google.protobuf.Field) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Field::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.type_url_.Destroy(); - _impl_.json_name_.Destroy(); - _impl_.default_value_.Destroy(); - _impl_.~Impl_(); +inline void Field::SharedDtor(MessageLite& self) { + Field& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.type_url_.Destroy(); + this_._impl_.json_name_.Destroy(); + this_._impl_.default_value_.Destroy(); + this_._impl_.~Impl_(); } inline void* Field::PlacementNew_(const void*, void* mem, @@ -1015,7 +1017,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Field::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Field::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Field::ByteSizeLong, &Field::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1469,15 +1471,16 @@ inline void Enum::SharedCtor(::_pb::Arena* arena) { } Enum::~Enum() { // @@protoc_insertion_point(destructor:google.protobuf.Enum) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Enum::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.edition_.Destroy(); - delete _impl_.source_context_; - _impl_.~Impl_(); +inline void Enum::SharedDtor(MessageLite& self) { + Enum& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.edition_.Destroy(); + delete this_._impl_.source_context_; + this_._impl_.~Impl_(); } inline void* Enum::PlacementNew_(const void*, void* mem, @@ -1514,7 +1517,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Enum::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &Enum::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &Enum::ByteSizeLong, &Enum::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -1879,13 +1882,14 @@ inline void EnumValue::SharedCtor(::_pb::Arena* arena) { } EnumValue::~EnumValue() { // @@protoc_insertion_point(destructor:google.protobuf.EnumValue) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void EnumValue::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - _impl_.~Impl_(); +inline void EnumValue::SharedDtor(MessageLite& self) { + EnumValue& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.~Impl_(); } inline void* EnumValue::PlacementNew_(const void*, void* mem, @@ -1918,7 +1922,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &EnumValue::MergeImpl, ::google::protobuf::Message::GetNewImpl(), #if defined(PROTOBUF_CUSTOM_VTABLE) - ::google::protobuf::Message::GetDeleteImpl(), + &EnumValue::SharedDtor, ::google::protobuf::Message::GetClearImpl(), &EnumValue::ByteSizeLong, &EnumValue::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE @@ -2190,14 +2194,15 @@ inline void Option::SharedCtor(::_pb::Arena* arena) { } Option::~Option() { // @@protoc_insertion_point(destructor:google.protobuf.Option) - _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - SharedDtor(); + SharedDtor(*this); } -inline void Option::SharedDtor() { - ABSL_DCHECK(GetArena() == nullptr); - _impl_.name_.Destroy(); - delete _impl_.value_; - _impl_.~Impl_(); +inline void Option::SharedDtor(MessageLite& self) { + Option& this_ = static_cast(self); + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + delete this_._impl_.value_; + this_._impl_.~Impl_(); } inline void* Option::PlacementNew_(const void*, void* mem, @@ -2219,7 +2224,7 @@ const ::google::protobuf::MessageLite::ClassDataFull &Option::MergeImpl, ::google::protobuf::Message::GetNewImpl