diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index c70acc3054..452c367768 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -201,9 +201,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Any::ByteSizeLong, + &Any::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Any, _impl_._cached_size_), false, @@ -272,60 +271,74 @@ PROTOBUF_NOINLINE void Any::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Any::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Any::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Any& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Any::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Any& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - // string type_url = 1; - if (!this->_internal_type_url().empty()) { - const std::string& _s = this->_internal_type_url(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } + // string type_url = 1; + if (!this_._internal_type_url().empty()) { + const std::string& _s = this_._internal_type_url(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } - // bytes value = 2; - if (!this->_internal_value().empty()) { - const std::string& _s = this->_internal_value(); - target = stream->WriteBytesMaybeAliased(2, _s, target); - } + // bytes value = 2; + if (!this_._internal_value().empty()) { + const std::string& _s = this_._internal_value(); + target = stream->WriteBytesMaybeAliased(2, _s, target); + } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Any) - return target; -} + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Any) + return target; + } -::size_t Any::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Any::ByteSizeLong(const MessageLite& base) { + const Any& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Any::ByteSizeLong() const { + const Any& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any) + ::size_t total_size = 0; - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // string type_url = 1; - if (!this->_internal_type_url().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_type_url()); - } - // bytes value = 2; - if (!this->_internal_value().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( - this->_internal_value()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // string type_url = 1; + if (!this_._internal_type_url().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_type_url()); + } + // bytes value = 2; + if (!this_._internal_value().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_value()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Any::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 89a405248b..9dc72a0dbf 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -208,10 +208,26 @@ class PROTOBUF_EXPORT Any final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 72816db055..0d35398088 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -347,9 +347,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Api::ByteSizeLong, + &Api::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Api, _impl_._cached_size_), false, @@ -463,147 +462,163 @@ PROTOBUF_NOINLINE void Api::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Api::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // repeated .google.protobuf.Method methods = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_methods_size()); - i < n; i++) { - const auto& repfield = this->_internal_methods().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.Option options = 3; - for (unsigned i = 0, n = static_cast( - this->_internal_options_size()); - i < n; i++) { - const auto& repfield = this->_internal_options().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, repfield, repfield.GetCachedSize(), - target, stream); - } - - // string version = 4; - if (!this->_internal_version().empty()) { - const std::string& _s = this->_internal_version(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); - target = stream->WriteStringMaybeAliased(4, _s, target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // .google.protobuf.SourceContext source_context = 5; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *_impl_.source_context_, _impl_.source_context_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.Mixin mixins = 6; - for (unsigned i = 0, n = static_cast( - this->_internal_mixins_size()); - i < n; i++) { - const auto& repfield = this->_internal_mixins().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, repfield, repfield.GetCachedSize(), - target, stream); - } - - // .google.protobuf.Syntax syntax = 7; - if (this->_internal_syntax() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 7, this->_internal_syntax(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api) - return target; -} - -::size_t Api::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Api::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Api& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Api::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Api& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string name = 1; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .google.protobuf.Method methods = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_methods_size()); + i < n; i++) { + const auto& repfield = this_._internal_methods().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.Option options = 3; + for (unsigned i = 0, n = static_cast( + this_._internal_options_size()); + i < n; i++) { + const auto& repfield = this_._internal_options().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + + // string version = 4; + if (!this_._internal_version().empty()) { + const std::string& _s = this_._internal_version(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // .google.protobuf.SourceContext source_context = 5; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.source_context_, this_._impl_.source_context_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.Mixin mixins = 6; + for (unsigned i = 0, n = static_cast( + this_._internal_mixins_size()); + i < n; i++) { + const auto& repfield = this_._internal_mixins().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + + // .google.protobuf.Syntax syntax = 7; + if (this_._internal_syntax() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 7, this_._internal_syntax(), target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.Method methods = 2; - { - total_size += 1UL * this->_internal_methods_size(); - for (const auto& msg : this->_internal_methods()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.Option options = 3; - { - total_size += 1UL * this->_internal_options_size(); - for (const auto& msg : this->_internal_options()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.Mixin mixins = 6; - { - total_size += 1UL * this->_internal_mixins_size(); - for (const auto& msg : this->_internal_mixins()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // string version = 4; - if (!this->_internal_version().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_version()); - } - } - { - // .google.protobuf.SourceContext source_context = 5; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.source_context_); - } - } - { - // .google.protobuf.Syntax syntax = 7; - if (this->_internal_syntax() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Api::ByteSizeLong(const MessageLite& base) { + const Api& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Api::ByteSizeLong() const { + const Api& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.Method methods = 2; + { + total_size += 1UL * this_._internal_methods_size(); + for (const auto& msg : this_._internal_methods()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.Option options = 3; + { + total_size += 1UL * this_._internal_options_size(); + for (const auto& msg : this_._internal_options()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.Mixin mixins = 6; + { + total_size += 1UL * this_._internal_mixins_size(); + for (const auto& msg : this_._internal_mixins()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // string name = 1; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // string version = 4; + if (!this_._internal_version().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_version()); + } + } + { + // .google.protobuf.SourceContext source_context = 5; + cached_has_bits = + this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.source_context_); + } + } + { + // .google.protobuf.Syntax syntax = 7; + if (this_._internal_syntax() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_syntax()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Api::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -768,9 +783,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Method::ByteSizeLong, + &Method::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Method, _impl_._cached_size_), false, @@ -877,129 +891,143 @@ PROTOBUF_NOINLINE void Method::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Method::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // string request_type_url = 2; - if (!this->_internal_request_type_url().empty()) { - const std::string& _s = this->_internal_request_type_url(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // bool request_streaming = 3; - if (this->_internal_request_streaming() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this->_internal_request_streaming(), target); - } - - // string response_type_url = 4; - if (!this->_internal_response_type_url().empty()) { - const std::string& _s = this->_internal_response_type_url(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); - target = stream->WriteStringMaybeAliased(4, _s, target); - } - - // bool response_streaming = 5; - if (this->_internal_response_streaming() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 5, this->_internal_response_streaming(), target); - } - - // repeated .google.protobuf.Option options = 6; - for (unsigned i = 0, n = static_cast( - this->_internal_options_size()); - i < n; i++) { - const auto& repfield = this->_internal_options().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, repfield, repfield.GetCachedSize(), - target, stream); - } - - // .google.protobuf.Syntax syntax = 7; - if (this->_internal_syntax() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 7, this->_internal_syntax(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method) - return target; -} - -::size_t Method::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Method::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Method& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Method::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Method& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string name = 1; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // string request_type_url = 2; + if (!this_._internal_request_type_url().empty()) { + const std::string& _s = this_._internal_request_type_url(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // bool request_streaming = 3; + if (this_._internal_request_streaming() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_request_streaming(), target); + } + + // string response_type_url = 4; + if (!this_._internal_response_type_url().empty()) { + const std::string& _s = this_._internal_response_type_url(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // bool response_streaming = 5; + if (this_._internal_response_streaming() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this_._internal_response_streaming(), target); + } + + // repeated .google.protobuf.Option options = 6; + for (unsigned i = 0, n = static_cast( + this_._internal_options_size()); + i < n; i++) { + const auto& repfield = this_._internal_options().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + + // .google.protobuf.Syntax syntax = 7; + if (this_._internal_syntax() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 7, this_._internal_syntax(), target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.Option options = 6; - { - total_size += 1UL * this->_internal_options_size(); - for (const auto& msg : this->_internal_options()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // string request_type_url = 2; - if (!this->_internal_request_type_url().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_request_type_url()); - } - // string response_type_url = 4; - if (!this->_internal_response_type_url().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_response_type_url()); - } - // bool request_streaming = 3; - if (this->_internal_request_streaming() != 0) { - total_size += 2; - } - // bool response_streaming = 5; - if (this->_internal_response_streaming() != 0) { - total_size += 2; - } - // .google.protobuf.Syntax syntax = 7; - if (this->_internal_syntax() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Method::ByteSizeLong(const MessageLite& base) { + const Method& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Method::ByteSizeLong() const { + const Method& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.Option options = 6; + { + total_size += 1UL * this_._internal_options_size(); + for (const auto& msg : this_._internal_options()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // string name = 1; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // string request_type_url = 2; + if (!this_._internal_request_type_url().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_request_type_url()); + } + // string response_type_url = 4; + if (!this_._internal_response_type_url().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_response_type_url()); + } + // bool request_streaming = 3; + if (this_._internal_request_streaming() != 0) { + total_size += 2; + } + // bool response_streaming = 5; + if (this_._internal_response_streaming() != 0) { + total_size += 2; + } + // .google.protobuf.Syntax syntax = 7; + if (this_._internal_syntax() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_syntax()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Method::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -1133,9 +1161,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Mixin::ByteSizeLong, + &Mixin::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Mixin, _impl_._cached_size_), false, @@ -1205,62 +1232,76 @@ PROTOBUF_NOINLINE void Mixin::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Mixin::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // string root = 2; - if (!this->_internal_root().empty()) { - const std::string& _s = this->_internal_root(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin) - return target; -} - -::size_t Mixin::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Mixin::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Mixin& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Mixin::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Mixin& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string name = 1; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // string root = 2; + if (!this_._internal_root().empty()) { + const std::string& _s = this_._internal_root(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // string root = 2; - if (!this->_internal_root().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_root()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Mixin::ByteSizeLong(const MessageLite& base) { + const Mixin& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Mixin::ByteSizeLong() const { + const Mixin& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // string name = 1; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // string root = 2; + if (!this_._internal_root().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_root()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Mixin::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 03a000ba4d..afa747e76b 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -168,10 +168,26 @@ class PROTOBUF_EXPORT Mixin final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: @@ -362,10 +378,26 @@ class PROTOBUF_EXPORT Method final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: @@ -629,10 +661,26 @@ class PROTOBUF_EXPORT Api final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index cb4924aafd..db186b229a 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -164,9 +164,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Duration::ByteSizeLong, + &Duration::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Duration, _impl_._cached_size_), false, @@ -233,60 +232,74 @@ PROTOBUF_NOINLINE void Duration::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Duration::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Duration::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Duration& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Duration::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Duration& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - // int64 seconds = 1; - if (this->_internal_seconds() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<1>( - stream, this->_internal_seconds(), target); - } + // int64 seconds = 1; + if (this_._internal_seconds() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<1>( + stream, this_._internal_seconds(), target); + } - // int32 nanos = 2; - if (this->_internal_nanos() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_nanos(), target); - } + // int32 nanos = 2; + if (this_._internal_nanos() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_nanos(), target); + } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration) - return target; -} + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration) + return target; + } -::size_t Duration::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Duration) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Duration::ByteSizeLong(const MessageLite& base) { + const Duration& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Duration::ByteSizeLong() const { + const Duration& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Duration) + ::size_t total_size = 0; - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // int64 seconds = 1; - if (this->_internal_seconds() != 0) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( - this->_internal_seconds()); - } - // int32 nanos = 2; - if (this->_internal_nanos() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_nanos()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // int64 seconds = 1; + if (this_._internal_seconds() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_seconds()); + } + // int32 nanos = 2; + if (this_._internal_nanos() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_nanos()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Duration::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 68bdd13190..569c9d8722 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -160,10 +160,26 @@ class PROTOBUF_EXPORT Duration final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 75c88dcddd..2331e4164e 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -139,9 +139,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::internal::ZeroFieldsBase::GetDeleteImpl(), ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), - ::google::protobuf::internal::ZeroFieldsBase::GetByteSizeLongImpl(), - ::google::protobuf::internal::ZeroFieldsBase::GetSerializeImpl(), + ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &Empty::ByteSizeLong, + &Empty::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Empty, _impl_._cached_size_), false, diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 6f683c5a2e..4ed647c52b 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -174,9 +174,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &FieldMask::ByteSizeLong, + &FieldMask::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FieldMask, _impl_._cached_size_), false, @@ -238,52 +237,67 @@ PROTOBUF_NOINLINE void FieldMask::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FieldMask::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FieldMask::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FieldMask& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FieldMask::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FieldMask& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - // repeated string paths = 1; - for (int i = 0, n = this->_internal_paths_size(); i < n; ++i) { - const auto& s = this->_internal_paths().Get(i); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); - target = stream->WriteString(1, s, target); - } + // repeated string paths = 1; + for (int i = 0, n = this_._internal_paths_size(); i < n; ++i) { + const auto& s = this_._internal_paths().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); + target = stream->WriteString(1, s, target); + } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask) - return target; -} + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask) + return target; + } -::size_t FieldMask::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FieldMask::ByteSizeLong(const MessageLite& base) { + const FieldMask& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FieldMask::ByteSizeLong() const { + const FieldMask& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask) + ::size_t total_size = 0; - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated string paths = 1; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_paths().size()); - for (int i = 0, n = _internal_paths().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_paths().Get(i)); - } - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated string paths = 1; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_paths().size()); + for (int i = 0, n = this_._internal_paths().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_paths().Get(i)); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FieldMask::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 5c4295d936..41fbf7a00f 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -160,10 +160,26 @@ class PROTOBUF_EXPORT FieldMask final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 8c93d1e2a1..0a0d49c784 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -177,9 +177,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &SourceContext::ByteSizeLong, + &SourceContext::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(SourceContext, _impl_._cached_size_), false, @@ -241,47 +240,62 @@ PROTOBUF_NOINLINE void SourceContext::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* SourceContext::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* SourceContext::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const SourceContext& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* SourceContext::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const SourceContext& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - // string file_name = 1; - if (!this->_internal_file_name().empty()) { - const std::string& _s = this->_internal_file_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } + // string file_name = 1; + if (!this_._internal_file_name().empty()) { + const std::string& _s = this_._internal_file_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext) - return target; -} + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext) + return target; + } -::size_t SourceContext::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t SourceContext::ByteSizeLong(const MessageLite& base) { + const SourceContext& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t SourceContext::ByteSizeLong() const { + const SourceContext& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext) + ::size_t total_size = 0; - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; - { - // string file_name = 1; - if (!this->_internal_file_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_file_name()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + { + // string file_name = 1; + if (!this_._internal_file_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_file_name()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void SourceContext::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 7736287390..65e7c9c124 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -160,10 +160,26 @@ class PROTOBUF_EXPORT SourceContext final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 36c1036bf3..ec724a21fd 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -384,9 +384,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Struct::ByteSizeLong, + &Struct::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Struct, _impl_._cached_size_), false, @@ -450,72 +449,87 @@ PROTOBUF_NOINLINE void Struct::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Struct::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // map fields = 1; - if (!_internal_fields().empty()) { - using MapType = ::google::protobuf::Map; - using WireHelper = _pbi::MapEntryFuncs; - const auto& field = _internal_fields(); - - if (stream->IsSerializationDeterministic() && field.size() > 1) { - for (const auto& entry : ::google::protobuf::internal::MapSorterPtr(field)) { - target = WireHelper::InternalSerialize( - 1, entry.first, entry.second, target, stream); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Struct::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Struct& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Struct::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Struct& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // map fields = 1; + if (!this_._internal_fields().empty()) { + using MapType = ::google::protobuf::Map; + using WireHelper = _pbi::MapEntryFuncs; + const auto& field = this_._internal_fields(); + + if (stream->IsSerializationDeterministic() && field.size() > 1) { + for (const auto& entry : ::google::protobuf::internal::MapSorterPtr(field)) { + target = WireHelper::InternalSerialize( + 1, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields"); - } - } else { - for (const auto& entry : field) { - target = WireHelper::InternalSerialize( - 1, entry.first, entry.second, target, stream); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), + } + } else { + for (const auto& entry : field) { + target = WireHelper::InternalSerialize( + 1, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields"); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) - return target; -} - -::size_t Struct::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; + } + } + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // map fields = 1; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_fields_size()); - for (const auto& entry : _internal_fields()) { - total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); - } - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Struct::ByteSizeLong(const MessageLite& base) { + const Struct& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Struct::ByteSizeLong() const { + const Struct& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // map fields = 1; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_fields_size()); + for (const auto& entry : this_._internal_fields()) { + total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Struct::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -714,9 +728,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Value::ByteSizeLong, + &Value::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Value, _impl_._cached_size_), false, @@ -792,110 +805,127 @@ PROTOBUF_NOINLINE void Value::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Value::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - switch (kind_case()) { - case kNullValue: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_null_value(), target); - break; - } - case kNumberValue: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray( - 2, this->_internal_number_value(), target); - break; - } - case kStringValue: { - const std::string& _s = this->_internal_string_value(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); - target = stream->WriteStringMaybeAliased(3, _s, target); - break; - } - case kBoolValue: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 4, this->_internal_bool_value(), target); - break; - } - case kStructValue: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *_impl_.kind_.struct_value_, _impl_.kind_.struct_value_->GetCachedSize(), target, stream); - break; - } - case kListValue: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, *_impl_.kind_.list_value_, _impl_.kind_.list_value_->GetCachedSize(), target, stream); - break; - } - default: - break; - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) - return target; -} - -::size_t Value::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Value::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Value& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Value::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Value& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + switch (this_.kind_case()) { + case kNullValue: { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this_._internal_null_value(), target); + break; + } + case kNumberValue: { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 2, this_._internal_number_value(), target); + break; + } + case kStringValue: { + const std::string& _s = this_._internal_string_value(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); + target = stream->WriteStringMaybeAliased(3, _s, target); + break; + } + case kBoolValue: { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this_._internal_bool_value(), target); + break; + } + case kStructValue: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.kind_.struct_value_, this_._impl_.kind_.struct_value_->GetCachedSize(), target, + stream); + break; + } + case kListValue: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, *this_._impl_.kind_.list_value_, this_._impl_.kind_.list_value_->GetCachedSize(), target, + stream); + break; + } + default: + break; + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) + return target; + } - switch (kind_case()) { - // .google.protobuf.NullValue null_value = 1; - case kNullValue: { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_null_value()); - break; - } - // double number_value = 2; - case kNumberValue: { - total_size += 9; - break; - } - // string string_value = 3; - case kStringValue: { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_string_value()); - break; - } - // bool bool_value = 4; - case kBoolValue: { - total_size += 2; - break; - } - // .google.protobuf.Struct struct_value = 5; - case kStructValue: { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.kind_.struct_value_); - break; - } - // .google.protobuf.ListValue list_value = 6; - case kListValue: { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.kind_.list_value_); - break; - } - case KIND_NOT_SET: { - break; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Value::ByteSizeLong(const MessageLite& base) { + const Value& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Value::ByteSizeLong() const { + const Value& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + switch (this_.kind_case()) { + // .google.protobuf.NullValue null_value = 1; + case kNullValue: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_null_value()); + break; + } + // double number_value = 2; + case kNumberValue: { + total_size += 9; + break; + } + // string string_value = 3; + case kStringValue: { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_string_value()); + break; + } + // bool bool_value = 4; + case kBoolValue: { + total_size += 2; + break; + } + // .google.protobuf.Struct struct_value = 5; + case kStructValue: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.struct_value_); + break; + } + // .google.protobuf.ListValue list_value = 6; + case kListValue: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.list_value_); + break; + } + case KIND_NOT_SET: { + break; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Value::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -1048,9 +1078,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &ListValue::ByteSizeLong, + &ListValue::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(ListValue, _impl_._cached_size_), false, @@ -1109,54 +1138,68 @@ PROTOBUF_NOINLINE void ListValue::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* ListValue::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.Value values = 1; - for (unsigned i = 0, n = static_cast( - this->_internal_values_size()); - i < n; i++) { - const auto& repfield = this->_internal_values().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) - return target; -} - -::size_t ListValue::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ListValue::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ListValue& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ListValue::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ListValue& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.Value values = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_values_size()); + i < n; i++) { + const auto& repfield = this_._internal_values().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.Value values = 1; - { - total_size += 1UL * this->_internal_values_size(); - for (const auto& msg : this->_internal_values()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ListValue::ByteSizeLong(const MessageLite& base) { + const ListValue& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ListValue::ByteSizeLong() const { + const ListValue& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.Value values = 1; + { + total_size += 1UL * this_._internal_values_size(); + for (const auto& msg : this_._internal_values()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void ListValue::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 667390080b..5906ab89cd 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -205,10 +205,26 @@ class PROTOBUF_EXPORT ListValue final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: @@ -382,10 +398,26 @@ class PROTOBUF_EXPORT Struct final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: @@ -603,10 +635,26 @@ class PROTOBUF_EXPORT Value final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 05a61ad00b..df90f6b0cf 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -164,9 +164,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Timestamp::ByteSizeLong, + &Timestamp::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Timestamp, _impl_._cached_size_), false, @@ -233,60 +232,74 @@ PROTOBUF_NOINLINE void Timestamp::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Timestamp::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Timestamp::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Timestamp& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Timestamp::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Timestamp& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - // int64 seconds = 1; - if (this->_internal_seconds() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<1>( - stream, this->_internal_seconds(), target); - } + // int64 seconds = 1; + if (this_._internal_seconds() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<1>( + stream, this_._internal_seconds(), target); + } - // int32 nanos = 2; - if (this->_internal_nanos() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_nanos(), target); - } + // int32 nanos = 2; + if (this_._internal_nanos() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_nanos(), target); + } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) - return target; -} + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) + return target; + } -::size_t Timestamp::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Timestamp::ByteSizeLong(const MessageLite& base) { + const Timestamp& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Timestamp::ByteSizeLong() const { + const Timestamp& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp) + ::size_t total_size = 0; - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // int64 seconds = 1; - if (this->_internal_seconds() != 0) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( - this->_internal_seconds()); - } - // int32 nanos = 2; - if (this->_internal_nanos() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_nanos()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // int64 seconds = 1; + if (this_._internal_seconds() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_seconds()); + } + // int32 nanos = 2; + if (this_._internal_nanos() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_nanos()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Timestamp::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 5c01aa9644..fc33f272d5 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -160,10 +160,26 @@ class PROTOBUF_EXPORT Timestamp final : public ::google::protobuf::Message return true; } ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - ::uint8_t* _InternalSerialize(::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index e74c2863af..fd91b84962 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -539,9 +539,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Type::ByteSizeLong, + &Type::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Type, _impl_._cached_size_), false, @@ -655,145 +654,162 @@ PROTOBUF_NOINLINE void Type::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Type::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // repeated .google.protobuf.Field fields = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_fields_size()); - i < n; i++) { - const auto& repfield = this->_internal_fields().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated string oneofs = 3; - for (int i = 0, n = this->_internal_oneofs_size(); i < n; ++i) { - const auto& s = this->_internal_oneofs().Get(i); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs"); - target = stream->WriteString(3, s, target); - } - - // repeated .google.protobuf.Option options = 4; - for (unsigned i = 0, n = static_cast( - this->_internal_options_size()); - i < n; i++) { - const auto& repfield = this->_internal_options().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // .google.protobuf.SourceContext source_context = 5; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *_impl_.source_context_, _impl_.source_context_->GetCachedSize(), target, stream); - } - - // .google.protobuf.Syntax syntax = 6; - if (this->_internal_syntax() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 6, this->_internal_syntax(), target); - } - - // string edition = 7; - if (!this->_internal_edition().empty()) { - const std::string& _s = this->_internal_edition(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.edition"); - target = stream->WriteStringMaybeAliased(7, _s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type) - return target; -} - -::size_t Type::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Type::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Type& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Type::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Type& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string name = 1; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .google.protobuf.Field fields = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_fields_size()); + i < n; i++) { + const auto& repfield = this_._internal_fields().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated string oneofs = 3; + for (int i = 0, n = this_._internal_oneofs_size(); i < n; ++i) { + const auto& s = this_._internal_oneofs().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs"); + target = stream->WriteString(3, s, target); + } + + // repeated .google.protobuf.Option options = 4; + for (unsigned i = 0, n = static_cast( + this_._internal_options_size()); + i < n; i++) { + const auto& repfield = this_._internal_options().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // .google.protobuf.SourceContext source_context = 5; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.source_context_, this_._impl_.source_context_->GetCachedSize(), target, + stream); + } + + // .google.protobuf.Syntax syntax = 6; + if (this_._internal_syntax() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this_._internal_syntax(), target); + } + + // string edition = 7; + if (!this_._internal_edition().empty()) { + const std::string& _s = this_._internal_edition(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.edition"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.Field fields = 2; - { - total_size += 1UL * this->_internal_fields_size(); - for (const auto& msg : this->_internal_fields()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated string oneofs = 3; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_oneofs().size()); - for (int i = 0, n = _internal_oneofs().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_oneofs().Get(i)); - } - } - // repeated .google.protobuf.Option options = 4; - { - total_size += 1UL * this->_internal_options_size(); - for (const auto& msg : this->_internal_options()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // string edition = 7; - if (!this->_internal_edition().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_edition()); - } - } - { - // .google.protobuf.SourceContext source_context = 5; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.source_context_); - } - } - { - // .google.protobuf.Syntax syntax = 6; - if (this->_internal_syntax() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Type::ByteSizeLong(const MessageLite& base) { + const Type& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Type::ByteSizeLong() const { + const Type& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.Field fields = 2; + { + total_size += 1UL * this_._internal_fields_size(); + for (const auto& msg : this_._internal_fields()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated string oneofs = 3; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_oneofs().size()); + for (int i = 0, n = this_._internal_oneofs().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_oneofs().Get(i)); + } + } + // repeated .google.protobuf.Option options = 4; + { + total_size += 1UL * this_._internal_options_size(); + for (const auto& msg : this_._internal_options()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // string name = 1; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // string edition = 7; + if (!this_._internal_edition().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_edition()); + } + } + { + // .google.protobuf.SourceContext source_context = 5; + cached_has_bits = + this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.source_context_); + } + } + { + // .google.protobuf.Syntax syntax = 6; + if (this_._internal_syntax() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_syntax()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Type::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -956,9 +972,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Field::ByteSizeLong, + &Field::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Field, _impl_._cached_size_), false, @@ -1090,167 +1105,181 @@ PROTOBUF_NOINLINE void Field::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Field::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .google.protobuf.Field.Kind kind = 1; - if (this->_internal_kind() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_kind(), target); - } - - // .google.protobuf.Field.Cardinality cardinality = 2; - if (this->_internal_cardinality() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_cardinality(), target); - } - - // int32 number = 3; - if (this->_internal_number() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<3>( - stream, this->_internal_number(), target); - } - - // string name = 4; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.name"); - target = stream->WriteStringMaybeAliased(4, _s, target); - } - - // string type_url = 6; - if (!this->_internal_type_url().empty()) { - const std::string& _s = this->_internal_type_url(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.type_url"); - target = stream->WriteStringMaybeAliased(6, _s, target); - } - - // int32 oneof_index = 7; - if (this->_internal_oneof_index() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<7>( - stream, this->_internal_oneof_index(), target); - } - - // bool packed = 8; - if (this->_internal_packed() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 8, this->_internal_packed(), target); - } - - // repeated .google.protobuf.Option options = 9; - for (unsigned i = 0, n = static_cast( - this->_internal_options_size()); - i < n; i++) { - const auto& repfield = this->_internal_options().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 9, repfield, repfield.GetCachedSize(), - target, stream); - } - - // string json_name = 10; - if (!this->_internal_json_name().empty()) { - const std::string& _s = this->_internal_json_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.json_name"); - target = stream->WriteStringMaybeAliased(10, _s, target); - } - - // string default_value = 11; - if (!this->_internal_default_value().empty()) { - const std::string& _s = this->_internal_default_value(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.default_value"); - target = stream->WriteStringMaybeAliased(11, _s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field) - return target; -} - -::size_t Field::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Field::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Field& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Field::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Field& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // .google.protobuf.Field.Kind kind = 1; + if (this_._internal_kind() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this_._internal_kind(), target); + } + + // .google.protobuf.Field.Cardinality cardinality = 2; + if (this_._internal_cardinality() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this_._internal_cardinality(), target); + } + + // int32 number = 3; + if (this_._internal_number() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this_._internal_number(), target); + } + + // string name = 4; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.name"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // string type_url = 6; + if (!this_._internal_type_url().empty()) { + const std::string& _s = this_._internal_type_url(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.type_url"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // int32 oneof_index = 7; + if (this_._internal_oneof_index() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<7>( + stream, this_._internal_oneof_index(), target); + } + + // bool packed = 8; + if (this_._internal_packed() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 8, this_._internal_packed(), target); + } + + // repeated .google.protobuf.Option options = 9; + for (unsigned i = 0, n = static_cast( + this_._internal_options_size()); + i < n; i++) { + const auto& repfield = this_._internal_options().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), + target, stream); + } + + // string json_name = 10; + if (!this_._internal_json_name().empty()) { + const std::string& _s = this_._internal_json_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.json_name"); + target = stream->WriteStringMaybeAliased(10, _s, target); + } + + // string default_value = 11; + if (!this_._internal_default_value().empty()) { + const std::string& _s = this_._internal_default_value(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.default_value"); + target = stream->WriteStringMaybeAliased(11, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.Option options = 9; - { - total_size += 1UL * this->_internal_options_size(); - for (const auto& msg : this->_internal_options()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 4; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // string type_url = 6; - if (!this->_internal_type_url().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_type_url()); - } - // string json_name = 10; - if (!this->_internal_json_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_json_name()); - } - // string default_value = 11; - if (!this->_internal_default_value().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_default_value()); - } - // .google.protobuf.Field.Kind kind = 1; - if (this->_internal_kind() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_kind()); - } - // .google.protobuf.Field.Cardinality cardinality = 2; - if (this->_internal_cardinality() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_cardinality()); - } - // int32 number = 3; - if (this->_internal_number() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_number()); - } - // int32 oneof_index = 7; - if (this->_internal_oneof_index() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_oneof_index()); - } - // bool packed = 8; - if (this->_internal_packed() != 0) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Field::ByteSizeLong(const MessageLite& base) { + const Field& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Field::ByteSizeLong() const { + const Field& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.Option options = 9; + { + total_size += 1UL * this_._internal_options_size(); + for (const auto& msg : this_._internal_options()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // string name = 4; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // string type_url = 6; + if (!this_._internal_type_url().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_type_url()); + } + // string json_name = 10; + if (!this_._internal_json_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_json_name()); + } + // string default_value = 11; + if (!this_._internal_default_value().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_default_value()); + } + // .google.protobuf.Field.Kind kind = 1; + if (this_._internal_kind() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_kind()); + } + // .google.protobuf.Field.Cardinality cardinality = 2; + if (this_._internal_cardinality() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_cardinality()); + } + // int32 number = 3; + if (this_._internal_number() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_number()); + } + // int32 oneof_index = 7; + if (this_._internal_oneof_index() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_oneof_index()); + } + // bool packed = 8; + if (this_._internal_packed() != 0) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Field::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -1420,9 +1449,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &Enum::ByteSizeLong, + &Enum::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Enum, _impl_._cached_size_), false, @@ -1529,129 +1557,145 @@ PROTOBUF_NOINLINE void Enum::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Enum::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // repeated .google.protobuf.EnumValue enumvalue = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_enumvalue_size()); - i < n; i++) { - const auto& repfield = this->_internal_enumvalue().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.Option options = 3; - for (unsigned i = 0, n = static_cast( - this->_internal_options_size()); - i < n; i++) { - const auto& repfield = this->_internal_options().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, repfield, repfield.GetCachedSize(), - target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // .google.protobuf.SourceContext source_context = 4; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *_impl_.source_context_, _impl_.source_context_->GetCachedSize(), target, stream); - } - - // .google.protobuf.Syntax syntax = 5; - if (this->_internal_syntax() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 5, this->_internal_syntax(), target); - } - - // string edition = 6; - if (!this->_internal_edition().empty()) { - const std::string& _s = this->_internal_edition(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.edition"); - target = stream->WriteStringMaybeAliased(6, _s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum) - return target; -} - -::size_t Enum::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* Enum::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Enum& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Enum::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Enum& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string name = 1; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .google.protobuf.EnumValue enumvalue = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_enumvalue_size()); + i < n; i++) { + const auto& repfield = this_._internal_enumvalue().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.Option options = 3; + for (unsigned i = 0, n = static_cast( + this_._internal_options_size()); + i < n; i++) { + const auto& repfield = this_._internal_options().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // .google.protobuf.SourceContext source_context = 4; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.source_context_, this_._impl_.source_context_->GetCachedSize(), target, + stream); + } + + // .google.protobuf.Syntax syntax = 5; + if (this_._internal_syntax() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this_._internal_syntax(), target); + } + + // string edition = 6; + if (!this_._internal_edition().empty()) { + const std::string& _s = this_._internal_edition(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.edition"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.EnumValue enumvalue = 2; - { - total_size += 1UL * this->_internal_enumvalue_size(); - for (const auto& msg : this->_internal_enumvalue()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.Option options = 3; - { - total_size += 1UL * this->_internal_options_size(); - for (const auto& msg : this->_internal_options()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // string edition = 6; - if (!this->_internal_edition().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_edition()); - } - } - { - // .google.protobuf.SourceContext source_context = 4; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.source_context_); - } - } - { - // .google.protobuf.Syntax syntax = 5; - if (this->_internal_syntax() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Enum::ByteSizeLong(const MessageLite& base) { + const Enum& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Enum::ByteSizeLong() const { + const Enum& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.EnumValue enumvalue = 2; + { + total_size += 1UL * this_._internal_enumvalue_size(); + for (const auto& msg : this_._internal_enumvalue()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.Option options = 3; + { + total_size += 1UL * this_._internal_options_size(); + for (const auto& msg : this_._internal_options()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // string name = 1; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // string edition = 6; + if (!this_._internal_edition().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_edition()); + } + } + { + // .google.protobuf.SourceContext source_context = 4; + cached_has_bits = + this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.source_context_); + } + } + { + // .google.protobuf.Syntax syntax = 5; + if (this_._internal_syntax() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_syntax()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Enum::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -1792,9 +1836,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl(), ::google::protobuf::Message::GetNewImpl(), - ::google::protobuf::Message::GetClearImpl(), - ::google::protobuf::Message::GetByteSizeLongImpl(), - ::google::protobuf::Message::GetSerializeImpl(), + ::google::protobuf::Message::GetClearImpl(), &EnumValue::ByteSizeLong, + &EnumValue::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(EnumValue, _impl_._cached_size_), false, @@ -1871,81 +1914,95 @@ PROTOBUF_NOINLINE void EnumValue::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* EnumValue::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.EnumValue.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // int32 number = 2; - if (this->_internal_number() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_number(), target); - } - - // repeated .google.protobuf.Option options = 3; - for (unsigned i = 0, n = static_cast( - this->_internal_options_size()); - i < n; i++) { - const auto& repfield = this->_internal_options().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, repfield, repfield.GetCachedSize(), - target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue) - return target; -} - -::size_t EnumValue::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* EnumValue::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const EnumValue& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* EnumValue::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const EnumValue& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string name = 1; + if (!this_._internal_name().empty()) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.EnumValue.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // int32 number = 2; + if (this_._internal_number() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_number(), target); + } + + // repeated .google.protobuf.Option options = 3; + for (unsigned i = 0, n = static_cast( + this_._internal_options_size()); + i < n; i++) { + const auto& repfield = this_._internal_options().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.Option options = 3; - { - total_size += 1UL * this->_internal_options_size(); - for (const auto& msg : this->_internal_options()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // int32 number = 2; - if (this->_internal_number() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_number()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t EnumValue::ByteSizeLong(const MessageLite& base) { + const EnumValue& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t EnumValue::ByteSizeLong() const { + const EnumValue& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .google.protobuf.Option options = 3; + { + total_size += 1UL * this_._internal_options_size(); + for (const auto& msg : this_._internal_options()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // string name = 1; + if (!this_._internal_name().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // int32 number = 2; + if (this_._internal_number() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_number()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void EnumValue::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -2073,9 +2130,8 @@ const ::google::protobuf::MessageLite::ClassDataFull #if defined(PROTOBUF_CUSTOM_VTABLE) ::google::protobuf::Message::GetDeleteImpl