diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index 4c5d4b6c06..eeea527a5e 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -26,21 +26,21 @@ namespace _fl = ::google::protobuf::internal::field_layout; #endif // __llvm__ namespace google { namespace protobuf { - template + +inline constexpr Any::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : type_url_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0}, + _any_metadata_{&type_url_, &value_} {} + +template PROTOBUF_CONSTEXPR Any::Any(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.type_url_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.value_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_._any_metadata_)*/ {&_impl_.type_url_, - &_impl_.value_}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct AnyDefaultTypeInternal { PROTOBUF_CONSTEXPR AnyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~AnyDefaultTypeInternal() {} @@ -150,54 +150,36 @@ Any::Any(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Any) } -Any::Any(const Any& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : type_url_(arena, from.type_url_), + value_(arena, from.value_), + _cached_size_{0}, + _any_metadata_{&type_url_, &value_} {} + +Any::Any( + ::google::protobuf::Arena* arena, + const Any& from) + : ::google::protobuf::Message(arena) { Any* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.type_url_){}, - decltype(_impl_.value_){}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_._any_metadata_)*/ { - &_impl_.type_url_, - &_impl_.value_, - }, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_type_url().empty()) { - _this->_impl_.type_url_.Set(from._internal_type_url(), _this->GetArenaForAllocation()); - } - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), _this->GetArenaForAllocation()); - } + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Any) } +inline PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : type_url_(arena), + value_(arena), + _cached_size_{0}, + _any_metadata_{&type_url_, &value_} {} + inline void Any::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.type_url_){}, - decltype(_impl_.value_){}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_._any_metadata_)*/ {&_impl_.type_url_, - &_impl_.value_}, - }; - _impl_.type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); } Any::~Any() { // @@protoc_insertion_point(destructor:google.protobuf.Any) @@ -208,7 +190,7 @@ inline void Any::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.type_url_.Destroy(); _impl_.value_.Destroy(); - _impl_._any_metadata_.~AnyMetadata(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Any::Clear() { diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index fc78ba08b9..08e1c9ca67 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -77,16 +77,14 @@ class PROTOBUF_EXPORT Any final : template explicit PROTOBUF_CONSTEXPR Any(::google::protobuf::internal::ConstantInitialized); - Any(const Any& from); + Any(::google::protobuf::Arena* arena, const Any& from); + inline Any(const Any& from) + : Any(nullptr, from) {} Any(Any&& from) noexcept : Any() { *this = ::std::move(from); } - inline Any(::google::protobuf::Arena* arena, const Any& from) - : Any(arena) { - MergeFrom(from); - } inline Any& operator=(const Any& from) { CopyFrom(from); return *this; @@ -282,10 +280,19 @@ class PROTOBUF_EXPORT Any final : 1, 2, 0, 36, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::ArenaStringPtr type_url_; ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 2753119e81..c764978479 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -22,19 +22,20 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr Mixin::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + root_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Mixin::Mixin(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.root_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct MixinDefaultTypeInternal { PROTOBUF_CONSTEXPR MixinDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~MixinDefaultTypeInternal() {} @@ -45,27 +46,27 @@ struct MixinDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MixinDefaultTypeInternal _Mixin_default_instance_; - template + +inline constexpr Method::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : options_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + request_type_url_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + response_type_url_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + request_streaming_{false}, + response_streaming_{false}, + syntax_{static_cast< ::google::protobuf::Syntax >(0)}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Method::Method(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.request_type_url_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.response_type_url_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.request_streaming_)*/ false, - /*decltype(_impl_.response_streaming_)*/ false, - /*decltype(_impl_.syntax_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct MethodDefaultTypeInternal { PROTOBUF_CONSTEXPR MethodDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~MethodDefaultTypeInternal() {} @@ -76,25 +77,25 @@ struct MethodDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDefaultTypeInternal _Method_default_instance_; - template + +inline constexpr Api::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + methods_{}, + options_{}, + mixins_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + version_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + source_context_{nullptr}, + syntax_{static_cast< ::google::protobuf::Syntax >(0)} {} + +template PROTOBUF_CONSTEXPR Api::Api(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_._has_bits_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.methods_)*/ {}, - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.mixins_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.version_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.source_context_)*/ nullptr, - /*decltype(_impl_.syntax_)*/ 0, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct ApiDefaultTypeInternal { PROTOBUF_CONSTEXPR ApiDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ApiDefaultTypeInternal() {} @@ -269,64 +270,52 @@ Api::Api(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Api) } -Api::Api(const Api& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Api::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + methods_{visibility, arena, from.methods_}, + options_{visibility, arena, from.options_}, + mixins_{visibility, arena, from.mixins_}, + name_(arena, from.name_), + version_(arena, from.version_) {} + +Api::Api( + ::google::protobuf::Arena* arena, + const Api& from) + : ::google::protobuf::Message(arena) { Api* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.methods_){from._impl_.methods_}, - decltype(_impl_.options_){from._impl_.options_}, - decltype(_impl_.mixins_){from._impl_.mixins_}, - decltype(_impl_.name_){}, - decltype(_impl_.version_){}, - decltype(_impl_.source_context_){nullptr}, - decltype(_impl_.syntax_){}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _impl_.version_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_version().empty()) { - _this->_impl_.version_.Set(from._internal_version(), _this->GetArenaForAllocation()); - } - if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { - _this->_impl_.source_context_ = new ::google::protobuf::SourceContext(*from._impl_.source_context_); - } - _this->_impl_.syntax_ = from._impl_.syntax_; + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.source_context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::google::protobuf::SourceContext>(arena, *from._impl_.source_context_) + : nullptr; + _impl_.syntax_ = from._impl_.syntax_; // @@protoc_insertion_point(copy_constructor:google.protobuf.Api) } +inline PROTOBUF_NDEBUG_INLINE Api::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + methods_{visibility, arena}, + options_{visibility, arena}, + mixins_{visibility, arena}, + name_(arena), + version_(arena) {} + inline void Api::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.methods_){arena}, - decltype(_impl_.options_){arena}, - decltype(_impl_.mixins_){arena}, - decltype(_impl_.name_){}, - decltype(_impl_.version_){}, - decltype(_impl_.source_context_){nullptr}, - decltype(_impl_.syntax_){0}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, source_context_), + 0, + offsetof(Impl_, syntax_) - + offsetof(Impl_, source_context_) + + sizeof(Impl_::syntax_)); } Api::~Api() { // @@protoc_insertion_point(destructor:google.protobuf.Api) @@ -335,12 +324,10 @@ Api::~Api() { } inline void Api::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.methods_.~RepeatedPtrField(); - _impl_.options_.~RepeatedPtrField(); - _impl_.mixins_.~RepeatedPtrField(); _impl_.name_.Destroy(); _impl_.version_.Destroy(); if (this != internal_default_instance()) delete _impl_.source_context_; + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Api::Clear() { @@ -664,72 +651,51 @@ Method::Method(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Method) } -Method::Method(const Method& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Method::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : options_{visibility, arena, from.options_}, + name_(arena, from.name_), + request_type_url_(arena, from.request_type_url_), + response_type_url_(arena, from.response_type_url_), + _cached_size_{0} {} + +Method::Method( + ::google::protobuf::Arena* arena, + const Method& from) + : ::google::protobuf::Message(arena) { Method* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.options_){from._impl_.options_}, - decltype(_impl_.name_){}, - decltype(_impl_.request_type_url_){}, - decltype(_impl_.response_type_url_){}, - decltype(_impl_.request_streaming_){}, - decltype(_impl_.response_streaming_){}, - decltype(_impl_.syntax_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _impl_.request_type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.request_type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_request_type_url().empty()) { - _this->_impl_.request_type_url_.Set(from._internal_request_type_url(), _this->GetArenaForAllocation()); - } - _impl_.response_type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.response_type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_response_type_url().empty()) { - _this->_impl_.response_type_url_.Set(from._internal_response_type_url(), _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.request_streaming_, &from._impl_.request_streaming_, - static_cast<::size_t>(reinterpret_cast(&_impl_.syntax_) - - reinterpret_cast(&_impl_.request_streaming_)) + sizeof(_impl_.syntax_)); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, request_streaming_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, request_streaming_), + offsetof(Impl_, syntax_) - + offsetof(Impl_, request_streaming_) + + sizeof(Impl_::syntax_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.Method) } +inline PROTOBUF_NDEBUG_INLINE Method::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : options_{visibility, arena}, + name_(arena), + request_type_url_(arena), + response_type_url_(arena), + _cached_size_{0} {} + inline void Method::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.options_){arena}, - decltype(_impl_.name_){}, - decltype(_impl_.request_type_url_){}, - decltype(_impl_.response_type_url_){}, - decltype(_impl_.request_streaming_){false}, - decltype(_impl_.response_streaming_){false}, - decltype(_impl_.syntax_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.request_type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.request_type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.response_type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.response_type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, request_streaming_), + 0, + offsetof(Impl_, syntax_) - + offsetof(Impl_, request_streaming_) + + sizeof(Impl_::syntax_)); } Method::~Method() { // @@protoc_insertion_point(destructor:google.protobuf.Method) @@ -738,10 +704,10 @@ Method::~Method() { } inline void Method::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); _impl_.request_type_url_.Destroy(); _impl_.response_type_url_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Method::Clear() { @@ -1048,48 +1014,34 @@ Mixin::Mixin(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin) } -Mixin::Mixin(const Mixin& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Mixin::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : name_(arena, from.name_), + root_(arena, from.root_), + _cached_size_{0} {} + +Mixin::Mixin( + ::google::protobuf::Arena* arena, + const Mixin& from) + : ::google::protobuf::Message(arena) { Mixin* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.name_){}, - decltype(_impl_.root_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _impl_.root_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.root_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_root().empty()) { - _this->_impl_.root_.Set(from._internal_root(), _this->GetArenaForAllocation()); - } + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin) } +inline PROTOBUF_NDEBUG_INLINE Mixin::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : name_(arena), + root_(arena), + _cached_size_{0} {} + inline void Mixin::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.name_){}, - decltype(_impl_.root_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.root_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.root_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); } Mixin::~Mixin() { // @@protoc_insertion_point(destructor:google.protobuf.Mixin) @@ -1100,6 +1052,7 @@ inline void Mixin::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.Destroy(); _impl_.root_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Mixin::Clear() { diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 86491ca092..b5a6febf55 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -85,16 +85,14 @@ class PROTOBUF_EXPORT Mixin final : template explicit PROTOBUF_CONSTEXPR Mixin(::google::protobuf::internal::ConstantInitialized); - Mixin(const Mixin& from); + Mixin(::google::protobuf::Arena* arena, const Mixin& from); + inline Mixin(const Mixin& from) + : Mixin(nullptr, from) {} Mixin(Mixin&& from) noexcept : Mixin() { *this = ::std::move(from); } - inline Mixin(::google::protobuf::Arena* arena, const Mixin& from) - : Mixin(arena) { - MergeFrom(from); - } inline Mixin& operator=(const Mixin& from) { CopyFrom(from); return *this; @@ -255,10 +253,19 @@ class PROTOBUF_EXPORT Mixin final : 1, 2, 0, 38, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr root_; mutable ::google::protobuf::internal::CachedSize _cached_size_; @@ -276,16 +283,14 @@ class PROTOBUF_EXPORT Method final : template explicit PROTOBUF_CONSTEXPR Method(::google::protobuf::internal::ConstantInitialized); - Method(const Method& from); + Method(::google::protobuf::Arena* arena, const Method& from); + inline Method(const Method& from) + : Method(nullptr, from) {} Method(Method&& from) noexcept : Method() { *this = ::std::move(from); } - inline Method(::google::protobuf::Arena* arena, const Method& from) - : Method(arena) { - MergeFrom(from); - } inline Method& operator=(const Method& from) { CopyFrom(from); return *this; @@ -515,10 +520,19 @@ class PROTOBUF_EXPORT Method final : 3, 7, 1, 68, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr request_type_url_; @@ -541,16 +555,14 @@ class PROTOBUF_EXPORT Api final : template explicit PROTOBUF_CONSTEXPR Api(::google::protobuf::internal::ConstantInitialized); - Api(const Api& from); + Api(::google::protobuf::Arena* arena, const Api& from); + inline Api(const Api& from) + : Api(nullptr, from) {} Api(Api&& from) noexcept : Api() { *this = ::std::move(from); } - inline Api(::google::protobuf::Arena* arena, const Api& from) - : Api(arena) { - MergeFrom(from); - } inline Api& operator=(const Api& from) { CopyFrom(from); return *this; @@ -795,10 +807,19 @@ class PROTOBUF_EXPORT Api final : 3, 7, 4, 39, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method > methods_; diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index 05fed6b8d8..921c961fc3 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -22,13 +22,16 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr Duration::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : seconds_{::int64_t{0}}, + nanos_{0}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Duration::Duration(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.seconds_)*/ ::int64_t{0}, - /*decltype(_impl_.nanos_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct DurationDefaultTypeInternal { PROTOBUF_CONSTEXPR DurationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~DurationDefaultTypeInternal() {} @@ -125,19 +128,24 @@ Duration::Duration(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Duration) } -Duration::Duration(const Duration& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.Duration) +Duration::Duration( + ::google::protobuf::Arena* arena, const Duration& from) + : Duration(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE Duration::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void Duration::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.seconds_){::int64_t{0}}, - decltype(_impl_.nanos_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, seconds_), + 0, + offsetof(Impl_, nanos_) - + offsetof(Impl_, seconds_) + + sizeof(Impl_::nanos_)); } Duration::~Duration() { // @@protoc_insertion_point(destructor:google.protobuf.Duration) @@ -146,6 +154,7 @@ Duration::~Duration() { } inline void Duration::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Duration::Clear() { diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 5990cda125..da39458d4b 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -77,16 +77,14 @@ class PROTOBUF_EXPORT Duration final : template explicit PROTOBUF_CONSTEXPR Duration(::google::protobuf::internal::ConstantInitialized); - Duration(const Duration& from); + Duration(::google::protobuf::Arena* arena, const Duration& from); + inline Duration(const Duration& from) + : Duration(nullptr, from) {} Duration(Duration&& from) noexcept : Duration() { *this = ::std::move(from); } - inline Duration(::google::protobuf::Arena* arena, const Duration& from) - : Duration(arena) { - MergeFrom(from); - } inline Duration& operator=(const Duration& from) { CopyFrom(from); return *this; @@ -235,10 +233,19 @@ class PROTOBUF_EXPORT Duration final : 1, 2, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::int64_t seconds_; ::int32_t nanos_; mutable ::google::protobuf::internal::CachedSize _cached_size_; diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 629ec27f88..39c69d1bf9 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -116,7 +116,10 @@ Empty::Empty(::google::protobuf::Arena* arena) : ::google::protobuf::internal::ZeroFieldsBase(arena) { // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) } -Empty::Empty(const Empty& from) : ::google::protobuf::internal::ZeroFieldsBase() { +Empty::Empty( + ::google::protobuf::Arena* arena, + const Empty& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { Empty* const _this = this; (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index d1459b1546..8240913c39 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -77,16 +77,14 @@ class PROTOBUF_EXPORT Empty final : template explicit PROTOBUF_CONSTEXPR Empty(::google::protobuf::internal::ConstantInitialized); - Empty(const Empty& from); + Empty(::google::protobuf::Arena* arena, const Empty& from); + inline Empty(const Empty& from) + : Empty(nullptr, from) {} Empty(Empty&& from) noexcept : Empty() { *this = ::std::move(from); } - inline Empty(::google::protobuf::Arena* arena, const Empty& from) - : Empty(arena) { - MergeFrom(from); - } inline Empty& operator=(const Empty& from) { CopyFrom(from); return *this; @@ -192,10 +190,19 @@ class PROTOBUF_EXPORT Empty final : private: class _Internal; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); PROTOBUF_TSAN_DECLARE_MEMBER }; friend struct ::TableStruct_google_2fprotobuf_2fempty_2eproto; diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index a215c47328..d539f8d5ec 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -22,12 +22,15 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr FieldMask::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : paths_{}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR FieldMask::FieldMask(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.paths_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct FieldMaskDefaultTypeInternal { PROTOBUF_CONSTEXPR FieldMaskDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~FieldMaskDefaultTypeInternal() {} @@ -123,24 +126,32 @@ FieldMask::FieldMask(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask) } -FieldMask::FieldMask(const FieldMask& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE FieldMask::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : paths_{visibility, arena, from.paths_}, + _cached_size_{0} {} + +FieldMask::FieldMask( + ::google::protobuf::Arena* arena, + const FieldMask& from) + : ::google::protobuf::Message(arena) { FieldMask* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.paths_){from._impl_.paths_}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask) } +inline PROTOBUF_NDEBUG_INLINE FieldMask::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : paths_{visibility, arena}, + _cached_size_{0} {} + inline void FieldMask::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.paths_){arena}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); } FieldMask::~FieldMask() { // @@protoc_insertion_point(destructor:google.protobuf.FieldMask) @@ -149,7 +160,7 @@ FieldMask::~FieldMask() { } inline void FieldMask::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _internal_mutable_paths()->~RepeatedPtrField(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void FieldMask::Clear() { diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 273ccc5b5b..79e5ea089d 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -77,16 +77,14 @@ class PROTOBUF_EXPORT FieldMask final : template explicit PROTOBUF_CONSTEXPR FieldMask(::google::protobuf::internal::ConstantInitialized); - FieldMask(const FieldMask& from); + FieldMask(::google::protobuf::Arena* arena, const FieldMask& from); + inline FieldMask(const FieldMask& from) + : FieldMask(nullptr, from) {} FieldMask(FieldMask&& from) noexcept : FieldMask() { *this = ::std::move(from); } - inline FieldMask(::google::protobuf::Arena* arena, const FieldMask& from) - : FieldMask(arena) { - MergeFrom(from); - } inline FieldMask& operator=(const FieldMask& from) { CopyFrom(from); return *this; @@ -242,10 +240,19 @@ class PROTOBUF_EXPORT FieldMask final : 0, 1, 0, 39, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField paths_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 95f1ed4090..664d6979a6 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -22,15 +22,17 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr SourceContext::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : file_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR SourceContext::SourceContext(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.file_name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct SourceContextDefaultTypeInternal { PROTOBUF_CONSTEXPR SourceContextDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~SourceContextDefaultTypeInternal() {} @@ -126,35 +128,32 @@ SourceContext::SourceContext(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceContext) } -SourceContext::SourceContext(const SourceContext& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE SourceContext::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : file_name_(arena, from.file_name_), + _cached_size_{0} {} + +SourceContext::SourceContext( + ::google::protobuf::Arena* arena, + const SourceContext& from) + : ::google::protobuf::Message(arena) { SourceContext* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.file_name_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.file_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.file_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_file_name().empty()) { - _this->_impl_.file_name_.Set(from._internal_file_name(), _this->GetArenaForAllocation()); - } + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext) } +inline PROTOBUF_NDEBUG_INLINE SourceContext::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : file_name_(arena), + _cached_size_{0} {} + inline void SourceContext::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.file_name_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.file_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.file_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); } SourceContext::~SourceContext() { // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) @@ -164,6 +163,7 @@ SourceContext::~SourceContext() { inline void SourceContext::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.file_name_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void SourceContext::Clear() { diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 8e07826409..78f1f410b5 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -77,16 +77,14 @@ class PROTOBUF_EXPORT SourceContext final : template explicit PROTOBUF_CONSTEXPR SourceContext(::google::protobuf::internal::ConstantInitialized); - SourceContext(const SourceContext& from); + SourceContext(::google::protobuf::Arena* arena, const SourceContext& from); + inline SourceContext(const SourceContext& from) + : SourceContext(nullptr, from) {} SourceContext(SourceContext&& from) noexcept : SourceContext() { *this = ::std::move(from); } - inline SourceContext(::google::protobuf::Arena* arena, const SourceContext& from) - : SourceContext(arena) { - MergeFrom(from); - } inline SourceContext& operator=(const SourceContext& from) { CopyFrom(from); return *this; @@ -230,10 +228,19 @@ class PROTOBUF_EXPORT SourceContext final : 0, 1, 0, 47, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::ArenaStringPtr file_name_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 3bc957282c..07872740d1 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -22,12 +22,15 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr ListValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : values_{}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR ListValue::ListValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.values_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct ListValueDefaultTypeInternal { PROTOBUF_CONSTEXPR ListValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ListValueDefaultTypeInternal() {} @@ -38,12 +41,15 @@ struct ListValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListValueDefaultTypeInternal _ListValue_default_instance_; - template + +inline constexpr Struct::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : fields_{}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Struct::Struct(::_pbi::ConstantInitialized) - : _impl_{ - /* decltype(_impl_.fields_) */ {}, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct StructDefaultTypeInternal { PROTOBUF_CONSTEXPR StructDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~StructDefaultTypeInternal() {} @@ -66,13 +72,16 @@ struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_; - template + +inline constexpr Value::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : kind_{}, + _cached_size_{0}, + _oneof_case_{} {} + +template PROTOBUF_CONSTEXPR Value::Value(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.kind_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_._oneof_case_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct ValueDefaultTypeInternal { PROTOBUF_CONSTEXPR ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ValueDefaultTypeInternal() {} @@ -241,25 +250,32 @@ Struct::Struct(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct) } -Struct::Struct(const Struct& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Struct::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : fields_{visibility, arena, from.fields_}, + _cached_size_{0} {} + +Struct::Struct( + ::google::protobuf::Arena* arena, + const Struct& from) + : ::google::protobuf::Message(arena) { Struct* const _this = this; (void)_this; - new (&_impl_) Impl_{ - /* decltype(_impl_.fields_) */ {}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _this->_impl_.fields_.MergeFrom(from._impl_.fields_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct) } +inline PROTOBUF_NDEBUG_INLINE Struct::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : fields_{visibility, arena}, + _cached_size_{0} {} + inline void Struct::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - /* decltype(_impl_.fields_) */ {::google::protobuf::internal::ArenaInitialized(), arena}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); } Struct::~Struct() { // @@protoc_insertion_point(destructor:google.protobuf.Struct) @@ -268,7 +284,7 @@ Struct::~Struct() { } inline void Struct::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.fields_.~MapField(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Struct::Clear() { @@ -478,59 +494,56 @@ Value::Value(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Value) } -Value::Value(const Value& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : kind_{}, + _cached_size_{0}, + _oneof_case_{from._oneof_case_[0]} {} + +Value::Value( + ::google::protobuf::Arena* arena, + const Value& from) + : ::google::protobuf::Message(arena) { Value* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.kind_){}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_._oneof_case_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - clear_has_kind(); - switch (from.kind_case()) { - case kNullValue: { - _this->_internal_set_null_value(from._internal_null_value()); - break; - } - case kNumberValue: { - _this->_internal_set_number_value(from._internal_number_value()); - break; - } - case kStringValue: { - _this->_internal_set_string_value(from._internal_string_value()); - break; - } - case kBoolValue: { - _this->_internal_set_bool_value(from._internal_bool_value()); - break; - } - case kStructValue: { - _this->_internal_mutable_struct_value()->::google::protobuf::Struct::MergeFrom( - from._internal_struct_value()); - break; - } - case kListValue: { - _this->_internal_mutable_list_value()->::google::protobuf::ListValue::MergeFrom( - from._internal_list_value()); - break; - } - case KIND_NOT_SET: { + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + switch (kind_case()) { + case KIND_NOT_SET: break; - } + case kNullValue: + _impl_.kind_.null_value_ = from._impl_.kind_.null_value_; + break; + case kNumberValue: + _impl_.kind_.number_value_ = from._impl_.kind_.number_value_; + break; + case kStringValue: + new (&_impl_.kind_.string_value_) decltype(_impl_.kind_.string_value_){arena, from._impl_.kind_.string_value_}; + break; + case kBoolValue: + _impl_.kind_.bool_value_ = from._impl_.kind_.bool_value_; + break; + case kStructValue: + _impl_.kind_.struct_value_ = CreateMaybeMessage<::google::protobuf::Struct>(arena, *from._impl_.kind_.struct_value_); + break; + case kListValue: + _impl_.kind_.list_value_ = CreateMaybeMessage<::google::protobuf::ListValue>(arena, *from._impl_.kind_.list_value_); + break; } // @@protoc_insertion_point(copy_constructor:google.protobuf.Value) } +inline PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : kind_{}, + _cached_size_{0}, + _oneof_case_{} {} + inline void Value::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.kind_){}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_._oneof_case_)*/ {}, - }; - clear_has_kind(); + new (&_impl_) Impl_(internal_visibility(), arena); } Value::~Value() { // @@protoc_insertion_point(destructor:google.protobuf.Value) @@ -542,6 +555,7 @@ inline void Value::SharedDtor() { if (has_kind()) { clear_kind(); } + _impl_.~Impl_(); } void Value::clear_kind() { @@ -844,24 +858,32 @@ ListValue::ListValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue) } -ListValue::ListValue(const ListValue& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE ListValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : values_{visibility, arena, from.values_}, + _cached_size_{0} {} + +ListValue::ListValue( + ::google::protobuf::Arena* arena, + const ListValue& from) + : ::google::protobuf::Message(arena) { ListValue* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.values_){from._impl_.values_}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue) } +inline PROTOBUF_NDEBUG_INLINE ListValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : values_{visibility, arena}, + _cached_size_{0} {} + inline void ListValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.values_){arena}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); } ListValue::~ListValue() { // @@protoc_insertion_point(destructor:google.protobuf.ListValue) @@ -870,7 +892,7 @@ ListValue::~ListValue() { } inline void ListValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.values_.~RepeatedPtrField(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void ListValue::Clear() { diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 2a45fd6c83..90ba743daf 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -122,16 +122,14 @@ class PROTOBUF_EXPORT ListValue final : template explicit PROTOBUF_CONSTEXPR ListValue(::google::protobuf::internal::ConstantInitialized); - ListValue(const ListValue& from); + ListValue(::google::protobuf::Arena* arena, const ListValue& from); + inline ListValue(const ListValue& from) + : ListValue(nullptr, from) {} ListValue(ListValue&& from) noexcept : ListValue() { *this = ::std::move(from); } - inline ListValue(::google::protobuf::Arena* arena, const ListValue& from) - : ListValue(arena) { - MergeFrom(from); - } inline ListValue& operator=(const ListValue& from) { CopyFrom(from); return *this; @@ -277,10 +275,19 @@ class PROTOBUF_EXPORT ListValue final : 0, 1, 1, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -297,16 +304,14 @@ class PROTOBUF_EXPORT Struct final : template explicit PROTOBUF_CONSTEXPR Struct(::google::protobuf::internal::ConstantInitialized); - Struct(const Struct& from); + Struct(::google::protobuf::Arena* arena, const Struct& from); + inline Struct(const Struct& from) + : Struct(nullptr, from) {} Struct(Struct&& from) noexcept : Struct() { *this = ::std::move(from); } - inline Struct(::google::protobuf::Arena* arena, const Struct& from) - : Struct(arena) { - MergeFrom(from); - } inline Struct& operator=(const Struct& from) { CopyFrom(from); return *this; @@ -450,10 +455,19 @@ class PROTOBUF_EXPORT Struct final : 0, 1, 2, 37, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::MapField @@ -499,16 +513,14 @@ class PROTOBUF_EXPORT Value final : template explicit PROTOBUF_CONSTEXPR Value(::google::protobuf::internal::ConstantInitialized); - Value(const Value& from); + Value(::google::protobuf::Arena* arena, const Value& from); + inline Value(const Value& from) + : Value(nullptr, from) {} Value(Value&& from) noexcept : Value() { *this = ::std::move(from); } - inline Value(::google::protobuf::Arena* arena, const Value& from) - : Value(arena) { - MergeFrom(from); - } inline Value& operator=(const Value& from) { CopyFrom(from); return *this; @@ -750,10 +762,19 @@ class PROTOBUF_EXPORT Value final : 0, 6, 2, 42, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); union KindUnion { constexpr KindUnion() : _constinit_{} {} ::google::protobuf::internal::ConstantInitialized _constinit_; diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index d8a4fd9bb6..e8913e01ec 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -22,13 +22,16 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr Timestamp::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : seconds_{::int64_t{0}}, + nanos_{0}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Timestamp::Timestamp(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.seconds_)*/ ::int64_t{0}, - /*decltype(_impl_.nanos_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct TimestampDefaultTypeInternal { PROTOBUF_CONSTEXPR TimestampDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~TimestampDefaultTypeInternal() {} @@ -125,19 +128,24 @@ Timestamp::Timestamp(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp) } -Timestamp::Timestamp(const Timestamp& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp) +Timestamp::Timestamp( + ::google::protobuf::Arena* arena, const Timestamp& from) + : Timestamp(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE Timestamp::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void Timestamp::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.seconds_){::int64_t{0}}, - decltype(_impl_.nanos_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, seconds_), + 0, + offsetof(Impl_, nanos_) - + offsetof(Impl_, seconds_) + + sizeof(Impl_::nanos_)); } Timestamp::~Timestamp() { // @@protoc_insertion_point(destructor:google.protobuf.Timestamp) @@ -146,6 +154,7 @@ Timestamp::~Timestamp() { } inline void Timestamp::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Timestamp::Clear() { diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index d7fbb643e4..983223a421 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -77,16 +77,14 @@ class PROTOBUF_EXPORT Timestamp final : template explicit PROTOBUF_CONSTEXPR Timestamp(::google::protobuf::internal::ConstantInitialized); - Timestamp(const Timestamp& from); + Timestamp(::google::protobuf::Arena* arena, const Timestamp& from); + inline Timestamp(const Timestamp& from) + : Timestamp(nullptr, from) {} Timestamp(Timestamp&& from) noexcept : Timestamp() { *this = ::std::move(from); } - inline Timestamp(::google::protobuf::Arena* arena, const Timestamp& from) - : Timestamp(arena) { - MergeFrom(from); - } inline Timestamp& operator=(const Timestamp& from) { CopyFrom(from); return *this; @@ -235,10 +233,19 @@ class PROTOBUF_EXPORT Timestamp final : 1, 2, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::int64_t seconds_; ::int32_t nanos_; mutable ::google::protobuf::internal::CachedSize _cached_size_; diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index a541790446..2576aaa19b 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -22,17 +22,18 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr Option::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_{nullptr} {} + +template PROTOBUF_CONSTEXPR Option::Option(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_._has_bits_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.value_)*/ nullptr, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct OptionDefaultTypeInternal { PROTOBUF_CONSTEXPR OptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~OptionDefaultTypeInternal() {} @@ -43,33 +44,32 @@ struct OptionDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionDefaultTypeInternal _Option_default_instance_; - template + +inline constexpr Field::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : options_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + type_url_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + json_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + default_value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + kind_{static_cast< ::google::protobuf::Field_Kind >(0)}, + cardinality_{static_cast< ::google::protobuf::Field_Cardinality >(0)}, + number_{0}, + oneof_index_{0}, + packed_{false}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Field::Field(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.type_url_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.json_name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.default_value_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.kind_)*/ 0, - /*decltype(_impl_.cardinality_)*/ 0, - /*decltype(_impl_.number_)*/ 0, - /*decltype(_impl_.oneof_index_)*/ 0, - /*decltype(_impl_.packed_)*/ false, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct FieldDefaultTypeInternal { PROTOBUF_CONSTEXPR FieldDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~FieldDefaultTypeInternal() {} @@ -80,17 +80,19 @@ struct FieldDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDefaultTypeInternal _Field_default_instance_; - template + +inline constexpr EnumValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : options_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + number_{0}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR EnumValue::EnumValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.number_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct EnumValueDefaultTypeInternal { PROTOBUF_CONSTEXPR EnumValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~EnumValueDefaultTypeInternal() {} @@ -101,25 +103,25 @@ struct EnumValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDefaultTypeInternal _EnumValue_default_instance_; - template + +inline constexpr Type::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + fields_{}, + oneofs_{}, + options_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + edition_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + source_context_{nullptr}, + syntax_{static_cast< ::google::protobuf::Syntax >(0)} {} + +template PROTOBUF_CONSTEXPR Type::Type(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_._has_bits_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.fields_)*/ {}, - /*decltype(_impl_.oneofs_)*/ {}, - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.edition_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.source_context_)*/ nullptr, - /*decltype(_impl_.syntax_)*/ 0, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct TypeDefaultTypeInternal { PROTOBUF_CONSTEXPR TypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~TypeDefaultTypeInternal() {} @@ -130,24 +132,24 @@ struct TypeDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_; - template + +inline constexpr Enum::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + enumvalue_{}, + options_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + edition_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + source_context_{nullptr}, + syntax_{static_cast< ::google::protobuf::Syntax >(0)} {} + +template PROTOBUF_CONSTEXPR Enum::Enum(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_._has_bits_)*/ {}, - /*decltype(_impl_._cached_size_)*/ {}, - /*decltype(_impl_.enumvalue_)*/ {}, - /*decltype(_impl_.options_)*/ {}, - /*decltype(_impl_.name_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.edition_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_.source_context_)*/ nullptr, - /*decltype(_impl_.syntax_)*/ 0, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct EnumDefaultTypeInternal { PROTOBUF_CONSTEXPR EnumDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~EnumDefaultTypeInternal() {} @@ -448,64 +450,52 @@ Type::Type(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Type) } -Type::Type(const Type& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + fields_{visibility, arena, from.fields_}, + oneofs_{visibility, arena, from.oneofs_}, + options_{visibility, arena, from.options_}, + name_(arena, from.name_), + edition_(arena, from.edition_) {} + +Type::Type( + ::google::protobuf::Arena* arena, + const Type& from) + : ::google::protobuf::Message(arena) { Type* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.fields_){from._impl_.fields_}, - decltype(_impl_.oneofs_){from._impl_.oneofs_}, - decltype(_impl_.options_){from._impl_.options_}, - decltype(_impl_.name_){}, - decltype(_impl_.edition_){}, - decltype(_impl_.source_context_){nullptr}, - decltype(_impl_.syntax_){}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _impl_.edition_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.edition_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_edition().empty()) { - _this->_impl_.edition_.Set(from._internal_edition(), _this->GetArenaForAllocation()); - } - if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { - _this->_impl_.source_context_ = new ::google::protobuf::SourceContext(*from._impl_.source_context_); - } - _this->_impl_.syntax_ = from._impl_.syntax_; + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.source_context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::google::protobuf::SourceContext>(arena, *from._impl_.source_context_) + : nullptr; + _impl_.syntax_ = from._impl_.syntax_; // @@protoc_insertion_point(copy_constructor:google.protobuf.Type) } +inline PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + fields_{visibility, arena}, + oneofs_{visibility, arena}, + options_{visibility, arena}, + name_(arena), + edition_(arena) {} + inline void Type::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.fields_){arena}, - decltype(_impl_.oneofs_){arena}, - decltype(_impl_.options_){arena}, - decltype(_impl_.name_){}, - decltype(_impl_.edition_){}, - decltype(_impl_.source_context_){nullptr}, - decltype(_impl_.syntax_){0}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.edition_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.edition_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, source_context_), + 0, + offsetof(Impl_, syntax_) - + offsetof(Impl_, source_context_) + + sizeof(Impl_::syntax_)); } Type::~Type() { // @@protoc_insertion_point(destructor:google.protobuf.Type) @@ -514,12 +504,10 @@ Type::~Type() { } inline void Type::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.fields_.~RepeatedPtrField(); - _internal_mutable_oneofs()->~RepeatedPtrField(); - _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); _impl_.edition_.Destroy(); if (this != internal_default_instance()) delete _impl_.source_context_; + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Type::Clear() { @@ -838,89 +826,53 @@ Field::Field(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Field) } -Field::Field(const Field& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Field::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : options_{visibility, arena, from.options_}, + name_(arena, from.name_), + type_url_(arena, from.type_url_), + json_name_(arena, from.json_name_), + default_value_(arena, from.default_value_), + _cached_size_{0} {} + +Field::Field( + ::google::protobuf::Arena* arena, + const Field& from) + : ::google::protobuf::Message(arena) { Field* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.options_){from._impl_.options_}, - decltype(_impl_.name_){}, - decltype(_impl_.type_url_){}, - decltype(_impl_.json_name_){}, - decltype(_impl_.default_value_){}, - decltype(_impl_.kind_){}, - decltype(_impl_.cardinality_){}, - decltype(_impl_.number_){}, - decltype(_impl_.oneof_index_){}, - decltype(_impl_.packed_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _impl_.type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_type_url().empty()) { - _this->_impl_.type_url_.Set(from._internal_type_url(), _this->GetArenaForAllocation()); - } - _impl_.json_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.json_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_json_name().empty()) { - _this->_impl_.json_name_.Set(from._internal_json_name(), _this->GetArenaForAllocation()); - } - _impl_.default_value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.default_value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_default_value().empty()) { - _this->_impl_.default_value_.Set(from._internal_default_value(), _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.kind_, &from._impl_.kind_, - static_cast<::size_t>(reinterpret_cast(&_impl_.packed_) - - reinterpret_cast(&_impl_.kind_)) + sizeof(_impl_.packed_)); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, kind_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, kind_), + offsetof(Impl_, packed_) - + offsetof(Impl_, kind_) + + sizeof(Impl_::packed_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.Field) } +inline PROTOBUF_NDEBUG_INLINE Field::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : options_{visibility, arena}, + name_(arena), + type_url_(arena), + json_name_(arena), + default_value_(arena), + _cached_size_{0} {} + inline void Field::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.options_){arena}, - decltype(_impl_.name_){}, - decltype(_impl_.type_url_){}, - decltype(_impl_.json_name_){}, - decltype(_impl_.default_value_){}, - decltype(_impl_.kind_){0}, - decltype(_impl_.cardinality_){0}, - decltype(_impl_.number_){0}, - decltype(_impl_.oneof_index_){0}, - decltype(_impl_.packed_){false}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.type_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.type_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.json_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.json_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.default_value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.default_value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, kind_), + 0, + offsetof(Impl_, packed_) - + offsetof(Impl_, kind_) + + sizeof(Impl_::packed_)); } Field::~Field() { // @@protoc_insertion_point(destructor:google.protobuf.Field) @@ -929,11 +881,11 @@ Field::~Field() { } inline void Field::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); _impl_.type_url_.Destroy(); _impl_.json_name_.Destroy(); _impl_.default_value_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Field::Clear() { @@ -1332,62 +1284,50 @@ Enum::Enum(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum) } -Enum::Enum(const Enum& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Enum::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + enumvalue_{visibility, arena, from.enumvalue_}, + options_{visibility, arena, from.options_}, + name_(arena, from.name_), + edition_(arena, from.edition_) {} + +Enum::Enum( + ::google::protobuf::Arena* arena, + const Enum& from) + : ::google::protobuf::Message(arena) { Enum* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.enumvalue_){from._impl_.enumvalue_}, - decltype(_impl_.options_){from._impl_.options_}, - decltype(_impl_.name_){}, - decltype(_impl_.edition_){}, - decltype(_impl_.source_context_){nullptr}, - decltype(_impl_.syntax_){}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _impl_.edition_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.edition_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_edition().empty()) { - _this->_impl_.edition_.Set(from._internal_edition(), _this->GetArenaForAllocation()); - } - if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { - _this->_impl_.source_context_ = new ::google::protobuf::SourceContext(*from._impl_.source_context_); - } - _this->_impl_.syntax_ = from._impl_.syntax_; + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.source_context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::google::protobuf::SourceContext>(arena, *from._impl_.source_context_) + : nullptr; + _impl_.syntax_ = from._impl_.syntax_; // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum) } +inline PROTOBUF_NDEBUG_INLINE Enum::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + enumvalue_{visibility, arena}, + options_{visibility, arena}, + name_(arena), + edition_(arena) {} + inline void Enum::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.enumvalue_){arena}, - decltype(_impl_.options_){arena}, - decltype(_impl_.name_){}, - decltype(_impl_.edition_){}, - decltype(_impl_.source_context_){nullptr}, - decltype(_impl_.syntax_){0}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.edition_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.edition_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, source_context_), + 0, + offsetof(Impl_, syntax_) - + offsetof(Impl_, source_context_) + + sizeof(Impl_::syntax_)); } Enum::~Enum() { // @@protoc_insertion_point(destructor:google.protobuf.Enum) @@ -1396,11 +1336,10 @@ Enum::~Enum() { } inline void Enum::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.enumvalue_.~RepeatedPtrField(); - _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); _impl_.edition_.Destroy(); if (this != internal_default_instance()) delete _impl_.source_context_; + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Enum::Clear() { @@ -1696,40 +1635,36 @@ EnumValue::EnumValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue) } -EnumValue::EnumValue(const EnumValue& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE EnumValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : options_{visibility, arena, from.options_}, + name_(arena, from.name_), + _cached_size_{0} {} + +EnumValue::EnumValue( + ::google::protobuf::Arena* arena, + const EnumValue& from) + : ::google::protobuf::Message(arena) { EnumValue* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.options_){from._impl_.options_}, - decltype(_impl_.name_){}, - decltype(_impl_.number_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - _this->_impl_.number_ = from._impl_.number_; + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + _impl_.number_ = from._impl_.number_; // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue) } +inline PROTOBUF_NDEBUG_INLINE EnumValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : options_{visibility, arena}, + name_(arena), + _cached_size_{0} {} + inline void EnumValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.options_){arena}, - decltype(_impl_.name_){}, - decltype(_impl_.number_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.number_ = {}; } EnumValue::~EnumValue() { // @@protoc_insertion_point(destructor:google.protobuf.EnumValue) @@ -1738,8 +1673,8 @@ EnumValue::~EnumValue() { } inline void EnumValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void EnumValue::Clear() { @@ -1958,42 +1893,38 @@ Option::Option(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Option) } -Option::Option(const Option& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE Option::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + name_(arena, from.name_) {} + +Option::Option( + ::google::protobuf::Arena* arena, + const Option& from) + : ::google::protobuf::Message(arena) { Option* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.name_){}, - decltype(_impl_.value_){nullptr}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); - } - if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { - _this->_impl_.value_ = new ::google::protobuf::Any(*from._impl_.value_); - } + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.value_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::google::protobuf::Any>(arena, *from._impl_.value_) + : nullptr; // @@protoc_insertion_point(copy_constructor:google.protobuf.Option) } +inline PROTOBUF_NDEBUG_INLINE Option::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + name_(arena) {} + inline void Option::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){}, - /*decltype(_impl_._cached_size_)*/ {}, - decltype(_impl_.name_){}, - decltype(_impl_.value_){nullptr}, - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } Option::~Option() { // @@protoc_insertion_point(destructor:google.protobuf.Option) @@ -2004,6 +1935,7 @@ inline void Option::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.value_; + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Option::Clear() { diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 8009fcd4ca..e2c3f4288a 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -211,16 +211,14 @@ class PROTOBUF_EXPORT Option final : template explicit PROTOBUF_CONSTEXPR Option(::google::protobuf::internal::ConstantInitialized); - Option(const Option& from); + Option(::google::protobuf::Arena* arena, const Option& from); + inline Option(const Option& from) + : Option(nullptr, from) {} Option(Option&& from) noexcept : Option() { *this = ::std::move(from); } - inline Option(::google::protobuf::Arena* arena, const Option& from) - : Option(arena) { - MergeFrom(from); - } inline Option& operator=(const Option& from) { CopyFrom(from); return *this; @@ -380,10 +378,19 @@ class PROTOBUF_EXPORT Option final : 1, 2, 1, 35, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr name_; @@ -402,16 +409,14 @@ class PROTOBUF_EXPORT Field final : template explicit PROTOBUF_CONSTEXPR Field(::google::protobuf::internal::ConstantInitialized); - Field(const Field& from); + Field(::google::protobuf::Arena* arena, const Field& from); + inline Field(const Field& from) + : Field(nullptr, from) {} Field(Field&& from) noexcept : Field() { *this = ::std::move(from); } - inline Field(::google::protobuf::Arena* arena, const Field& from) - : Field(arena) { - MergeFrom(from); - } inline Field& operator=(const Field& from) { CopyFrom(from); return *this; @@ -739,10 +744,19 @@ class PROTOBUF_EXPORT Field final : 4, 10, 1, 72, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr type_url_; @@ -768,16 +782,14 @@ class PROTOBUF_EXPORT EnumValue final : template explicit PROTOBUF_CONSTEXPR EnumValue(::google::protobuf::internal::ConstantInitialized); - EnumValue(const EnumValue& from); + EnumValue(::google::protobuf::Arena* arena, const EnumValue& from); + inline EnumValue(const EnumValue& from) + : EnumValue(nullptr, from) {} EnumValue(EnumValue&& from) noexcept : EnumValue() { *this = ::std::move(from); } - inline EnumValue(::google::protobuf::Arena* arena, const EnumValue& from) - : EnumValue(arena) { - MergeFrom(from); - } inline EnumValue& operator=(const EnumValue& from) { CopyFrom(from); return *this; @@ -951,10 +963,19 @@ class PROTOBUF_EXPORT EnumValue final : 2, 3, 1, 38, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; ::google::protobuf::internal::ArenaStringPtr name_; ::int32_t number_; @@ -973,16 +994,14 @@ class PROTOBUF_EXPORT Type final : template explicit PROTOBUF_CONSTEXPR Type(::google::protobuf::internal::ConstantInitialized); - Type(const Type& from); + Type(::google::protobuf::Arena* arena, const Type& from); + inline Type(const Type& from) + : Type(nullptr, from) {} Type(Type&& from) noexcept : Type() { *this = ::std::move(from); } - inline Type(::google::protobuf::Arena* arena, const Type& from) - : Type(arena) { - MergeFrom(from); - } inline Type& operator=(const Type& from) { CopyFrom(from); return *this; @@ -1237,10 +1256,19 @@ class PROTOBUF_EXPORT Type final : 3, 7, 3, 46, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field > fields_; @@ -1264,16 +1292,14 @@ class PROTOBUF_EXPORT Enum final : template explicit PROTOBUF_CONSTEXPR Enum(::google::protobuf::internal::ConstantInitialized); - Enum(const Enum& from); + Enum(::google::protobuf::Arena* arena, const Enum& from); + inline Enum(const Enum& from) + : Enum(nullptr, from) {} Enum(Enum&& from) noexcept : Enum() { *this = ::std::move(from); } - inline Enum(::google::protobuf::Arena* arena, const Enum& from) - : Enum(arena) { - MergeFrom(from); - } inline Enum& operator=(const Enum& from) { CopyFrom(from); return *this; @@ -1499,10 +1525,19 @@ class PROTOBUF_EXPORT Enum final : 3, 6, 3, 40, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue > enumvalue_; diff --git a/src/google/protobuf/wrappers.pb.cc b/src/google/protobuf/wrappers.pb.cc index 1a3656456a..2c97c959e0 100644 --- a/src/google/protobuf/wrappers.pb.cc +++ b/src/google/protobuf/wrappers.pb.cc @@ -22,12 +22,15 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { - template + +inline constexpr UInt64Value::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{::uint64_t{0u}}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR UInt64Value::UInt64Value(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ ::uint64_t{0u}, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct UInt64ValueDefaultTypeInternal { PROTOBUF_CONSTEXPR UInt64ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~UInt64ValueDefaultTypeInternal() {} @@ -38,12 +41,15 @@ struct UInt64ValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UInt64ValueDefaultTypeInternal _UInt64Value_default_instance_; - template + +inline constexpr UInt32Value::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{0u}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR UInt32Value::UInt32Value(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ 0u, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct UInt32ValueDefaultTypeInternal { PROTOBUF_CONSTEXPR UInt32ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~UInt32ValueDefaultTypeInternal() {} @@ -54,15 +60,17 @@ struct UInt32ValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UInt32ValueDefaultTypeInternal _UInt32Value_default_instance_; - template + +inline constexpr StringValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR StringValue::StringValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct StringValueDefaultTypeInternal { PROTOBUF_CONSTEXPR StringValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~StringValueDefaultTypeInternal() {} @@ -73,12 +81,15 @@ struct StringValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StringValueDefaultTypeInternal _StringValue_default_instance_; - template + +inline constexpr Int64Value::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{::int64_t{0}}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Int64Value::Int64Value(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ ::int64_t{0}, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct Int64ValueDefaultTypeInternal { PROTOBUF_CONSTEXPR Int64ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~Int64ValueDefaultTypeInternal() {} @@ -89,12 +100,15 @@ struct Int64ValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int64ValueDefaultTypeInternal _Int64Value_default_instance_; - template + +inline constexpr Int32Value::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{0}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR Int32Value::Int32Value(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct Int32ValueDefaultTypeInternal { PROTOBUF_CONSTEXPR Int32ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~Int32ValueDefaultTypeInternal() {} @@ -105,12 +119,15 @@ struct Int32ValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int32ValueDefaultTypeInternal _Int32Value_default_instance_; - template + +inline constexpr FloatValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{0}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR FloatValue::FloatValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct FloatValueDefaultTypeInternal { PROTOBUF_CONSTEXPR FloatValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~FloatValueDefaultTypeInternal() {} @@ -121,12 +138,15 @@ struct FloatValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FloatValueDefaultTypeInternal _FloatValue_default_instance_; - template + +inline constexpr DoubleValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{0}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR DoubleValue::DoubleValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ 0, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct DoubleValueDefaultTypeInternal { PROTOBUF_CONSTEXPR DoubleValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~DoubleValueDefaultTypeInternal() {} @@ -137,15 +157,17 @@ struct DoubleValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DoubleValueDefaultTypeInternal _DoubleValue_default_instance_; - template + +inline constexpr BytesValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR BytesValue::BytesValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ { - &::_pbi::fixed_address_empty_string, - ::_pbi::ConstantInitialized{}, - }, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct BytesValueDefaultTypeInternal { PROTOBUF_CONSTEXPR BytesValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~BytesValueDefaultTypeInternal() {} @@ -156,12 +178,15 @@ struct BytesValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BytesValueDefaultTypeInternal _BytesValue_default_instance_; - template + +inline constexpr BoolValue::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : value_{false}, + _cached_size_{0} {} + +template PROTOBUF_CONSTEXPR BoolValue::BoolValue(::_pbi::ConstantInitialized) - : _impl_{ - /*decltype(_impl_.value_)*/ false, - /*decltype(_impl_._cached_size_)*/ {}, - } {} + : _impl_(::_pbi::ConstantInitialized()) {} struct BoolValueDefaultTypeInternal { PROTOBUF_CONSTEXPR BoolValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~BoolValueDefaultTypeInternal() {} @@ -351,18 +376,19 @@ DoubleValue::DoubleValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DoubleValue) } -DoubleValue::DoubleValue(const DoubleValue& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue) +DoubleValue::DoubleValue( + ::google::protobuf::Arena* arena, const DoubleValue& from) + : DoubleValue(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE DoubleValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void DoubleValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } DoubleValue::~DoubleValue() { // @@protoc_insertion_point(destructor:google.protobuf.DoubleValue) @@ -371,6 +397,7 @@ DoubleValue::~DoubleValue() { } inline void DoubleValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void DoubleValue::Clear() { @@ -532,18 +559,19 @@ FloatValue::FloatValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FloatValue) } -FloatValue::FloatValue(const FloatValue& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue) +FloatValue::FloatValue( + ::google::protobuf::Arena* arena, const FloatValue& from) + : FloatValue(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE FloatValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void FloatValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } FloatValue::~FloatValue() { // @@protoc_insertion_point(destructor:google.protobuf.FloatValue) @@ -552,6 +580,7 @@ FloatValue::~FloatValue() { } inline void FloatValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void FloatValue::Clear() { @@ -713,18 +742,19 @@ Int64Value::Int64Value(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Int64Value) } -Int64Value::Int64Value(const Int64Value& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value) +Int64Value::Int64Value( + ::google::protobuf::Arena* arena, const Int64Value& from) + : Int64Value(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE Int64Value::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void Int64Value::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){::int64_t{0}}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } Int64Value::~Int64Value() { // @@protoc_insertion_point(destructor:google.protobuf.Int64Value) @@ -733,6 +763,7 @@ Int64Value::~Int64Value() { } inline void Int64Value::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Int64Value::Clear() { @@ -880,18 +911,19 @@ UInt64Value::UInt64Value(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt64Value) } -UInt64Value::UInt64Value(const UInt64Value& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value) +UInt64Value::UInt64Value( + ::google::protobuf::Arena* arena, const UInt64Value& from) + : UInt64Value(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE UInt64Value::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void UInt64Value::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){::uint64_t{0u}}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } UInt64Value::~UInt64Value() { // @@protoc_insertion_point(destructor:google.protobuf.UInt64Value) @@ -900,6 +932,7 @@ UInt64Value::~UInt64Value() { } inline void UInt64Value::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void UInt64Value::Clear() { @@ -1047,18 +1080,19 @@ Int32Value::Int32Value(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Int32Value) } -Int32Value::Int32Value(const Int32Value& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value) +Int32Value::Int32Value( + ::google::protobuf::Arena* arena, const Int32Value& from) + : Int32Value(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE Int32Value::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void Int32Value::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){0}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } Int32Value::~Int32Value() { // @@protoc_insertion_point(destructor:google.protobuf.Int32Value) @@ -1067,6 +1101,7 @@ Int32Value::~Int32Value() { } inline void Int32Value::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void Int32Value::Clear() { @@ -1214,18 +1249,19 @@ UInt32Value::UInt32Value(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt32Value) } -UInt32Value::UInt32Value(const UInt32Value& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value) +UInt32Value::UInt32Value( + ::google::protobuf::Arena* arena, const UInt32Value& from) + : UInt32Value(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE UInt32Value::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void UInt32Value::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){0u}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } UInt32Value::~UInt32Value() { // @@protoc_insertion_point(destructor:google.protobuf.UInt32Value) @@ -1234,6 +1270,7 @@ UInt32Value::~UInt32Value() { } inline void UInt32Value::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void UInt32Value::Clear() { @@ -1381,18 +1418,19 @@ BoolValue::BoolValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.BoolValue) } -BoolValue::BoolValue(const BoolValue& from) - : ::google::protobuf::Message(), _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue) +BoolValue::BoolValue( + ::google::protobuf::Arena* arena, const BoolValue& from) + : BoolValue(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE BoolValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + inline void BoolValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){false}, - /*decltype(_impl_._cached_size_)*/ {}, - }; + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.value_ = {}; } BoolValue::~BoolValue() { // @@protoc_insertion_point(destructor:google.protobuf.BoolValue) @@ -1401,6 +1439,7 @@ BoolValue::~BoolValue() { } inline void BoolValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void BoolValue::Clear() { @@ -1547,35 +1586,32 @@ StringValue::StringValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.StringValue) } -StringValue::StringValue(const StringValue& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE StringValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : value_(arena, from.value_), + _cached_size_{0} {} + +StringValue::StringValue( + ::google::protobuf::Arena* arena, + const StringValue& from) + : ::google::protobuf::Message(arena) { StringValue* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.value_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), _this->GetArenaForAllocation()); - } + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue) } +inline PROTOBUF_NDEBUG_INLINE StringValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : value_(arena), + _cached_size_{0} {} + inline void StringValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); } StringValue::~StringValue() { // @@protoc_insertion_point(destructor:google.protobuf.StringValue) @@ -1585,6 +1621,7 @@ StringValue::~StringValue() { inline void StringValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.value_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void StringValue::Clear() { @@ -1739,35 +1776,32 @@ BytesValue::BytesValue(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.BytesValue) } -BytesValue::BytesValue(const BytesValue& from) : ::google::protobuf::Message() { +inline PROTOBUF_NDEBUG_INLINE BytesValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : value_(arena, from.value_), + _cached_size_{0} {} + +BytesValue::BytesValue( + ::google::protobuf::Arena* arena, + const BytesValue& from) + : ::google::protobuf::Message(arena) { BytesValue* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.value_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), _this->GetArenaForAllocation()); - } + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue) } +inline PROTOBUF_NDEBUG_INLINE BytesValue::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : value_(arena), + _cached_size_{0} {} + inline void BytesValue::SharedCtor(::_pb::Arena* arena) { - (void)arena; - new (&_impl_) Impl_{ - decltype(_impl_.value_){}, - /*decltype(_impl_._cached_size_)*/ {}, - }; - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + new (&_impl_) Impl_(internal_visibility(), arena); } BytesValue::~BytesValue() { // @@protoc_insertion_point(destructor:google.protobuf.BytesValue) @@ -1777,6 +1811,7 @@ BytesValue::~BytesValue() { inline void BytesValue::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); _impl_.value_.Destroy(); + _impl_.~Impl_(); } PROTOBUF_NOINLINE void BytesValue::Clear() { diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 30dfb801db..210b872122 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -101,16 +101,14 @@ class PROTOBUF_EXPORT UInt64Value final : template explicit PROTOBUF_CONSTEXPR UInt64Value(::google::protobuf::internal::ConstantInitialized); - UInt64Value(const UInt64Value& from); + UInt64Value(::google::protobuf::Arena* arena, const UInt64Value& from); + inline UInt64Value(const UInt64Value& from) + : UInt64Value(nullptr, from) {} UInt64Value(UInt64Value&& from) noexcept : UInt64Value() { *this = ::std::move(from); } - inline UInt64Value(::google::protobuf::Arena* arena, const UInt64Value& from) - : UInt64Value(arena) { - MergeFrom(from); - } inline UInt64Value& operator=(const UInt64Value& from) { CopyFrom(from); return *this; @@ -248,10 +246,19 @@ class PROTOBUF_EXPORT UInt64Value final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::uint64_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -268,16 +275,14 @@ class PROTOBUF_EXPORT UInt32Value final : template explicit PROTOBUF_CONSTEXPR UInt32Value(::google::protobuf::internal::ConstantInitialized); - UInt32Value(const UInt32Value& from); + UInt32Value(::google::protobuf::Arena* arena, const UInt32Value& from); + inline UInt32Value(const UInt32Value& from) + : UInt32Value(nullptr, from) {} UInt32Value(UInt32Value&& from) noexcept : UInt32Value() { *this = ::std::move(from); } - inline UInt32Value(::google::protobuf::Arena* arena, const UInt32Value& from) - : UInt32Value(arena) { - MergeFrom(from); - } inline UInt32Value& operator=(const UInt32Value& from) { CopyFrom(from); return *this; @@ -415,10 +420,19 @@ class PROTOBUF_EXPORT UInt32Value final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::uint32_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -435,16 +449,14 @@ class PROTOBUF_EXPORT StringValue final : template explicit PROTOBUF_CONSTEXPR StringValue(::google::protobuf::internal::ConstantInitialized); - StringValue(const StringValue& from); + StringValue(::google::protobuf::Arena* arena, const StringValue& from); + inline StringValue(const StringValue& from) + : StringValue(nullptr, from) {} StringValue(StringValue&& from) noexcept : StringValue() { *this = ::std::move(from); } - inline StringValue(::google::protobuf::Arena* arena, const StringValue& from) - : StringValue(arena) { - MergeFrom(from); - } inline StringValue& operator=(const StringValue& from) { CopyFrom(from); return *this; @@ -588,10 +600,19 @@ class PROTOBUF_EXPORT StringValue final : 0, 1, 0, 41, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -608,16 +629,14 @@ class PROTOBUF_EXPORT Int64Value final : template explicit PROTOBUF_CONSTEXPR Int64Value(::google::protobuf::internal::ConstantInitialized); - Int64Value(const Int64Value& from); + Int64Value(::google::protobuf::Arena* arena, const Int64Value& from); + inline Int64Value(const Int64Value& from) + : Int64Value(nullptr, from) {} Int64Value(Int64Value&& from) noexcept : Int64Value() { *this = ::std::move(from); } - inline Int64Value(::google::protobuf::Arena* arena, const Int64Value& from) - : Int64Value(arena) { - MergeFrom(from); - } inline Int64Value& operator=(const Int64Value& from) { CopyFrom(from); return *this; @@ -755,10 +774,19 @@ class PROTOBUF_EXPORT Int64Value final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::int64_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -775,16 +803,14 @@ class PROTOBUF_EXPORT Int32Value final : template explicit PROTOBUF_CONSTEXPR Int32Value(::google::protobuf::internal::ConstantInitialized); - Int32Value(const Int32Value& from); + Int32Value(::google::protobuf::Arena* arena, const Int32Value& from); + inline Int32Value(const Int32Value& from) + : Int32Value(nullptr, from) {} Int32Value(Int32Value&& from) noexcept : Int32Value() { *this = ::std::move(from); } - inline Int32Value(::google::protobuf::Arena* arena, const Int32Value& from) - : Int32Value(arena) { - MergeFrom(from); - } inline Int32Value& operator=(const Int32Value& from) { CopyFrom(from); return *this; @@ -922,10 +948,19 @@ class PROTOBUF_EXPORT Int32Value final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::int32_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -942,16 +977,14 @@ class PROTOBUF_EXPORT FloatValue final : template explicit PROTOBUF_CONSTEXPR FloatValue(::google::protobuf::internal::ConstantInitialized); - FloatValue(const FloatValue& from); + FloatValue(::google::protobuf::Arena* arena, const FloatValue& from); + inline FloatValue(const FloatValue& from) + : FloatValue(nullptr, from) {} FloatValue(FloatValue&& from) noexcept : FloatValue() { *this = ::std::move(from); } - inline FloatValue(::google::protobuf::Arena* arena, const FloatValue& from) - : FloatValue(arena) { - MergeFrom(from); - } inline FloatValue& operator=(const FloatValue& from) { CopyFrom(from); return *this; @@ -1089,10 +1122,19 @@ class PROTOBUF_EXPORT FloatValue final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); float value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -1109,16 +1151,14 @@ class PROTOBUF_EXPORT DoubleValue final : template explicit PROTOBUF_CONSTEXPR DoubleValue(::google::protobuf::internal::ConstantInitialized); - DoubleValue(const DoubleValue& from); + DoubleValue(::google::protobuf::Arena* arena, const DoubleValue& from); + inline DoubleValue(const DoubleValue& from) + : DoubleValue(nullptr, from) {} DoubleValue(DoubleValue&& from) noexcept : DoubleValue() { *this = ::std::move(from); } - inline DoubleValue(::google::protobuf::Arena* arena, const DoubleValue& from) - : DoubleValue(arena) { - MergeFrom(from); - } inline DoubleValue& operator=(const DoubleValue& from) { CopyFrom(from); return *this; @@ -1256,10 +1296,19 @@ class PROTOBUF_EXPORT DoubleValue final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); double value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -1276,16 +1325,14 @@ class PROTOBUF_EXPORT BytesValue final : template explicit PROTOBUF_CONSTEXPR BytesValue(::google::protobuf::internal::ConstantInitialized); - BytesValue(const BytesValue& from); + BytesValue(::google::protobuf::Arena* arena, const BytesValue& from); + inline BytesValue(const BytesValue& from) + : BytesValue(nullptr, from) {} BytesValue(BytesValue&& from) noexcept : BytesValue() { *this = ::std::move(from); } - inline BytesValue(::google::protobuf::Arena* arena, const BytesValue& from) - : BytesValue(arena) { - MergeFrom(from); - } inline BytesValue& operator=(const BytesValue& from) { CopyFrom(from); return *this; @@ -1429,10 +1476,19 @@ class PROTOBUF_EXPORT BytesValue final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -1449,16 +1505,14 @@ class PROTOBUF_EXPORT BoolValue final : template explicit PROTOBUF_CONSTEXPR BoolValue(::google::protobuf::internal::ConstantInitialized); - BoolValue(const BoolValue& from); + BoolValue(::google::protobuf::Arena* arena, const BoolValue& from); + inline BoolValue(const BoolValue& from) + : BoolValue(nullptr, from) {} BoolValue(BoolValue&& from) noexcept : BoolValue() { *this = ::std::move(from); } - inline BoolValue(::google::protobuf::Arena* arena, const BoolValue& from) - : BoolValue(arena) { - MergeFrom(from); - } inline BoolValue& operator=(const BoolValue& from) { CopyFrom(from); return *this; @@ -1596,10 +1650,19 @@ class PROTOBUF_EXPORT BoolValue final : 0, 1, 0, 0, 2> _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - struct Impl_ { + struct PROTOBUF_EXPORT Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); bool value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER