diff --git a/editions/golden/compare_cpp_codegen_failure.txt b/editions/golden/compare_cpp_codegen_failure.txt index 27ef82e033..ff5fbdaffc 100644 --- a/editions/golden/compare_cpp_codegen_failure.txt +++ b/editions/golden/compare_cpp_codegen_failure.txt @@ -16,23 +16,23 @@ (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, }}, @@ @@ - (void)cached_has_bits; + (void)cached_has_bits; - cached_has_bits = _impl_._has_bits_[0]; -- // optional int32 int32_field = 1; -+ // int32 int32_field = 1; - if (cached_has_bits & 0x00000001u) { - target = ::proto2::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( + cached_has_bits = this_._impl_._has_bits_[0]; +- // optional int32 int32_field = 1; ++ // int32 int32_field = 1; + if (cached_has_bits & 0x00000001u) { + target = ::proto2::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( @@ @@ - (void)cached_has_bits; + (void)cached_has_bits; - { -- // optional int32 int32_field = 1; -+ // int32 int32_field = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + { +- // optional int32 int32_field = 1; ++ // int32 int32_field = 1; + cached_has_bits = + this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { [ FAILED ] third_party/protobuf/editions/golden/simple_proto3.pb.cc [ RUN ] third_party/protobuf/editions/golden/simple_proto3.pb.h @@ @@ diff --git a/editions/golden/compare_cpp_codegen_failure.xml b/editions/golden/compare_cpp_codegen_failure.xml index be11fd5c95..fe38a8825b 100644 --- a/editions/golden/compare_cpp_codegen_failure.xml +++ b/editions/golden/compare_cpp_codegen_failure.xml @@ -2,7 +2,7 @@ - + diff --git a/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc b/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc index 2ce65df945..e1c2116a20 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc @@ -262,12 +262,12 @@ void CordFieldGenerator::GenerateSerializeWithCachedSizesToArray( if (field_->type() == FieldDescriptor::TYPE_STRING) { GenerateUtf8CheckCodeForCord( field_, options_, false, - absl::Substitute("this->_internal_$0(), ", printer->LookupVar("name")), + absl::Substitute("this_._internal_$0(), ", printer->LookupVar("name")), format); } format( "target = stream->Write$declared_type$($number$, " - "this->_internal_$name$(), " + "this_._internal_$name$(), " "target);\n"); } @@ -276,7 +276,7 @@ void CordFieldGenerator::GenerateByteSize(io::Printer* printer) const { format( "total_size += $tag_size$ +\n" " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(\n" - " this->_internal_$name$());\n"); + " this_._internal_$name$());\n"); } void CordFieldGenerator::GenerateConstexprAggregateInitializer( diff --git a/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc b/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc index 9e83ad2f50..e8d894c700 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc @@ -103,14 +103,14 @@ class SingularEnum : public FieldGeneratorBase { p->Emit(R"cc( target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - $number$, this->_internal_$name$(), target); + $number$, this_._internal_$name$(), target); )cc"); } void GenerateByteSize(io::Printer* p) const override { p->Emit(R"cc( total_size += $kTagBytes$ + - ::_pbi::WireFormatLite::EnumSize(this->_internal_$name$()); + ::_pbi::WireFormatLite::EnumSize(this_._internal_$name$()); )cc"); } @@ -481,16 +481,16 @@ void RepeatedEnum::GenerateSerializeWithCachedSizesToArray( {"byte_size", [&] { if (has_cached_size_) { - p->Emit( - R"cc(std::size_t byte_size = $cached_size_$.Get();)cc"); + p->Emit(R"cc(std::size_t byte_size = + this_.$cached_size_$.Get();)cc"); } else { p->Emit(R"cc( std::size_t byte_size = 0; - auto count = static_cast(this->_internal_$name$_size()); + auto count = static_cast(this_._internal_$name$_size()); for (std::size_t i = 0; i < count; ++i) { byte_size += ::_pbi::WireFormatLite::EnumSize( - this->_internal_$name$().Get(static_cast(i))); + this_._internal_$name$().Get(static_cast(i))); } )cc"); } @@ -500,18 +500,18 @@ void RepeatedEnum::GenerateSerializeWithCachedSizesToArray( { $byte_size$; if (byte_size > 0) { - target = stream->WriteEnumPacked($number$, _internal_$name$(), - byte_size, target); + target = stream->WriteEnumPacked( + $number$, this_._internal_$name$(), byte_size, target); } } )cc"); return; } p->Emit(R"cc( - for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { + for (int i = 0, n = this_._internal_$name$_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - $number$, static_cast<$Enum$>(this->_internal_$name$().Get(i)), + $number$, static_cast<$Enum$>(this_._internal_$name$().Get(i)), target); } )cc"); @@ -538,18 +538,18 @@ void RepeatedEnum::GenerateByteSize(io::Printer* p) const { )cc"); if (has_cached_size_) { p->Emit(R"cc( - $cached_size_$.Set(::_pbi::ToCachedSize(data_size)); + this_.$cached_size_$.Set(::_pbi::ToCachedSize(data_size)); )cc"); } }}, }, R"cc( std::size_t data_size = 0; - auto count = static_cast(this->_internal_$name$_size()); + auto count = static_cast(this_._internal_$name$_size()); for (std::size_t i = 0; i < count; ++i) { data_size += ::_pbi::WireFormatLite::EnumSize( - this->_internal_$name$().Get(static_cast(i))); + this_._internal_$name$().Get(static_cast(i))); } total_size += data_size; $add_to_size$; diff --git a/src/google/protobuf/compiler/cpp/field_generators/map_field.cc b/src/google/protobuf/compiler/cpp/field_generators/map_field.cc index 73e00b1c39..bd6221732b 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/map_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/map_field.cc @@ -276,10 +276,10 @@ void Map::GenerateSerializeWithCachedSizesToArray(io::Printer* p) const { }}, }, R"cc( - if (!_internal_$name$().empty()) { + if (!this_._internal_$name$().empty()) { using MapType = $Map$; using WireHelper = $Funcs$; - const auto& field = _internal_$name$(); + const auto& field = this_._internal_$name$(); if (stream->IsSerializationDeterministic() && field.size() > 1) { for (const auto& entry : $pbi$::$Sorter$(field)) { @@ -304,8 +304,9 @@ void Map::GenerateByteSize(io::Printer* p) const { {"Funcs", [&] { EmitFuncs(field_, p); }}, }, R"cc( - total_size += $kTagBytes$ * $pbi$::FromIntSize(_internal_$name$_size()); - for (const auto& entry : _internal_$name$()) { + total_size += + $kTagBytes$ * $pbi$::FromIntSize(this_._internal_$name$_size()); + for (const auto& entry : this_._internal_$name$()) { total_size += $Funcs$::ByteSizeLong(entry.first, entry.second); } )cc"); diff --git a/src/google/protobuf/compiler/cpp/field_generators/message_field.cc b/src/google/protobuf/compiler/cpp/field_generators/message_field.cc index 197a32088d..37a89fe7b8 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/message_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/message_field.cc @@ -400,21 +400,22 @@ void SingularMessage::GenerateSerializeWithCachedSizesToArray( if (!is_group()) { p->Emit(R"cc( target = $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, *$field_$, $field_$->GetCachedSize(), target, stream); + $number$, *this_.$field_$, this_.$field_$->GetCachedSize(), target, + stream); )cc"); } else { p->Emit(R"cc( target = stream->EnsureSpace(target); target = $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, *$field_$, target, stream); + $number$, *this_.$field_$, target, stream); )cc"); } } void SingularMessage::GenerateByteSize(io::Printer* p) const { p->Emit(R"cc( - total_size += - $tag_size$ + $pbi$::WireFormatLite::$declared_type$Size(*$field_$); + total_size += $tag_size$ + + $pbi$::WireFormatLite::$declared_type$Size(*this_.$field_$); )cc"); } @@ -953,8 +954,8 @@ void RepeatedMessage::GenerateSerializeWithCachedSizesToArray( } }}}, R"cc( - for (auto it = this->$field_$.pointer_begin(), - end = this->$field_$.pointer_end(); + for (auto it = this_.$field_$.pointer_begin(), + end = this_.$field_$.pointer_end(); it < end; ++it) { $serialize_field$; } @@ -965,7 +966,7 @@ void RepeatedMessage::GenerateSerializeWithCachedSizesToArray( if (field_->type() == FieldDescriptor::TYPE_MESSAGE) { p->Emit( R"cc( - const auto& repfield = this->_internal_$name$().Get(i); + const auto& repfield = this_._internal_$name$().Get(i); target = $pbi$::WireFormatLite::InternalWrite$declared_type$( $number$, repfield, repfield.GetCachedSize(), @@ -977,14 +978,14 @@ void RepeatedMessage::GenerateSerializeWithCachedSizesToArray( target = stream->EnsureSpace(target); target = $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, this->_internal_$name$().Get(i), + $number$, this_._internal_$name$().Get(i), target, stream); )cc"); } }}}, R"cc( for (unsigned i = 0, n = static_cast( - this->_internal_$name$_size()); + this_._internal_$name$_size()); i < n; i++) { $serialize_field$; } @@ -995,8 +996,8 @@ void RepeatedMessage::GenerateSerializeWithCachedSizesToArray( void RepeatedMessage::GenerateByteSize(io::Printer* p) const { p->Emit( R"cc( - total_size += $tag_size$UL * this->_internal_$name$_size(); - for (const auto& msg : this->_internal$_weak$_$name$()) { + total_size += $tag_size$UL * this_._internal_$name$_size(); + for (const auto& msg : this_._internal$_weak$_$name$()) { total_size += $pbi$::WireFormatLite::$declared_type$Size(msg); } )cc"); diff --git a/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc b/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc index 22279db2bf..918d708554 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc @@ -248,13 +248,13 @@ void SingularPrimitive::GenerateSerializeWithCachedSizesToArray( p->Emit(R"cc( target = ::$proto_ns$::internal::WireFormatLite:: Write$declared_type$ToArrayWithField<$number$>( - stream, this->_internal_$name$(), target); + stream, this_._internal_$name$(), target); )cc"); } else { p->Emit(R"cc( target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::Write$DeclaredType$ToArray( - $number$, this->_internal_$name$(), target); + $number$, this_._internal_$name$(), target); )cc"); } } @@ -275,14 +275,14 @@ void SingularPrimitive::GenerateByteSize(io::Printer* p) const { if (tag_size == 1) { p->Emit(R"cc( total_size += ::_pbi::WireFormatLite::$DeclaredType$SizePlusOne( - this->_internal_$name$()); + this_._internal_$name$()); )cc"); return; } p->Emit(R"cc( total_size += $kTagBytes$ + ::_pbi::WireFormatLite::$DeclaredType$Size( - this->_internal_$name$()); + this_._internal_$name$()); )cc"); } @@ -546,10 +546,10 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( io::Printer* p) const { if (!field_->is_packed()) { p->Emit(R"cc( - for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { + for (int i = 0, n = this_._internal_$name$_size(); i < n; ++i) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::Write$DeclaredType$ToArray( - $number$, this->_internal_$name$().Get(i), target); + $number$, this_._internal_$name$().Get(i), target); } )cc"); return; @@ -557,8 +557,8 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( if (FixedSize(field_->type()).has_value()) { p->Emit(R"cc( - if (this->_internal_$name$_size() > 0) { - target = stream->WriteFixedPacked($number$, _internal_$name$(), target); + if (this_._internal_$name$_size() > 0) { + target = stream->WriteFixedPacked($number$, this_._internal_$name$(), target); } )cc"); return; @@ -569,11 +569,11 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( {"byte_size", [&] { if (HasCachedSize()) { - p->Emit(R"cc($_field_cached_byte_size_$.Get();)cc"); + p->Emit(R"cc(this_.$_field_cached_byte_size_$.Get();)cc"); } else { p->Emit(R"cc( ::_pbi::WireFormatLite::$DeclaredType$Size( - this->_internal_$name$()); + this_._internal_$name$()); )cc"); } }}, @@ -583,7 +583,7 @@ void RepeatedPrimitive::GenerateSerializeWithCachedSizesToArray( int byte_size = $byte_size$; if (byte_size > 0) { target = stream->Write$DeclaredType$Packed( - $number$, _internal_$name$(), byte_size, target); + $number$, this_._internal_$name$(), byte_size, target); } } )cc"); @@ -598,12 +598,12 @@ void RepeatedPrimitive::GenerateByteSize(io::Printer* p) const { if (fixed_size.has_value()) { p->Emit({{"kFixed", *fixed_size}}, R"cc( std::size_t{$kFixed$} * - ::_pbi::FromIntSize(this->_internal_$name$_size()) + ::_pbi::FromIntSize(this_._internal_$name$_size()) )cc"); } else { p->Emit(R"cc( ::_pbi::WireFormatLite::$DeclaredType$Size( - this->_internal_$name$()) + this_._internal_$name$()) )cc"); } }} // Here and below, we need to disable the default ;-chomping @@ -613,7 +613,8 @@ void RepeatedPrimitive::GenerateByteSize(io::Printer* p) const { [&] { if (!HasCachedSize()) return; p->Emit(R"cc( - $_field_cached_byte_size_$.Set(::_pbi::ToCachedSize(data_size)); + this_.$_field_cached_byte_size_$.Set( + ::_pbi::ToCachedSize(data_size)); )cc"); }}, Sub{"tag_size", @@ -628,7 +629,7 @@ void RepeatedPrimitive::GenerateByteSize(io::Printer* p) const { } else { p->Emit(R"cc( std::size_t{$kTagBytes$} * - ::_pbi::FromIntSize(this->_internal_$name$_size()); + ::_pbi::FromIntSize(this_._internal_$name$_size()); )cc"); } }} diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc index d42e4a5d26..fcca9dfc33 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc @@ -133,7 +133,7 @@ class SingularString : public FieldGeneratorBase { void GenerateByteSize(io::Printer* p) const override { p->Emit(R"cc( total_size += $kTagBytes$ + $pbi$::WireFormatLite::$DeclaredType$Size( - this->_internal_$name$()); + this_._internal_$name$()); )cc"); } @@ -688,7 +688,7 @@ void SingularString::GenerateSerializeWithCachedSizesToArray( "static_cast(_s.length()),"); }}}, R"cc( - const std::string& _s = this->_internal_$name$(); + const std::string& _s = this_._internal_$name$(); $utf8_check$; target = stream->Write$DeclaredType$MaybeAliased($number$, _s, target); )cc"); @@ -804,10 +804,11 @@ class RepeatedString : public FieldGeneratorBase { void GenerateByteSize(io::Printer* p) const override { p->Emit(R"cc( - total_size += $kTagBytes$ * $pbi$::FromIntSize(_internal_$name$().size()); - for (int i = 0, n = _internal_$name$().size(); i < n; ++i) { + total_size += + $kTagBytes$ * $pbi$::FromIntSize(this_._internal_$name$().size()); + for (int i = 0, n = this_._internal_$name$().size(); i < n; ++i) { total_size += $pbi$::WireFormatLite::$DeclaredType$Size( - _internal_$name$().Get(i)); + this_._internal_$name$().Get(i)); } )cc"); } @@ -974,8 +975,8 @@ void RepeatedString::GenerateSerializeWithCachedSizesToArray( "s.data(), static_cast(s.length()),"); }}}, R"cc( - for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { - const auto& s = this->_internal_$name$().Get(i); + for (int i = 0, n = this_._internal_$name$_size(); i < n; ++i) { + const auto& s = this_._internal_$name$().Get(i); $utf8_check$; target = stream->Write$DeclaredType$($number$, s, target); } diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc index 6e73c0f5a3..204cabc6a9 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc @@ -133,7 +133,7 @@ class SingularStringView : public FieldGeneratorBase { void GenerateByteSize(io::Printer* p) const override { p->Emit(R"cc( total_size += $kTagBytes$ + $pbi$::WireFormatLite::$DeclaredType$Size( - this->_internal_$name$()); + this_._internal_$name$()); )cc"); } @@ -515,7 +515,7 @@ void SingularStringView::GenerateSerializeWithCachedSizesToArray( "static_cast(_s.length()),"); }}}, R"cc( - const std::string& _s = this->_internal_$name$(); + const std::string& _s = this_._internal_$name$(); $utf8_check$; target = stream->Write$DeclaredType$MaybeAliased($number$, _s, target); )cc"); @@ -631,10 +631,11 @@ class RepeatedStringView : public FieldGeneratorBase { void GenerateByteSize(io::Printer* p) const override { p->Emit(R"cc( - total_size += $kTagBytes$ * $pbi$::FromIntSize(_internal_$name$().size()); - for (int i = 0, n = _internal_$name$().size(); i < n; ++i) { + total_size += + $kTagBytes$ * $pbi$::FromIntSize(this_._internal_$name$().size()); + for (int i = 0, n = this_._internal_$name$().size(); i < n; ++i) { total_size += $pbi$::WireFormatLite::$DeclaredType$Size( - _internal_$name$().Get(i)); + this_._internal_$name$().Get(i)); } )cc"); } @@ -816,8 +817,8 @@ void RepeatedStringView::GenerateSerializeWithCachedSizesToArray( "s.data(), static_cast(s.length()),"); }}}, R"cc( - for (int i = 0, n = this->_internal_$name$_size(); i < n; ++i) { - const auto& s = this->_internal_$name$().Get(i); + for (int i = 0, n = this_._internal_$name$_size(); i < n; ++i) { + const auto& s = this_._internal_$name$().Get(i); $utf8_check$; target = stream->Write$DeclaredType$($number$, s, target); } diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index abd431e655..1f868e5897 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -209,7 +209,7 @@ void EmitNonDefaultCheck(io::Printer* p, const std::string& prefix, p->Emit("$prefix$_internal_$name$() != 0"); } } else if (field->real_containing_oneof()) { - p->Emit("$has_field$"); + p->Emit("$prefix$$has_field$"); } } @@ -1760,12 +1760,34 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) { } if (!HasSimpleBaseClass(descriptor_, options_)) { + // In custom vtable mode, the functions are implemented as static + // functions, which are the ones we put in the custom vtable. The + // non-static functions are small trampolines. In normal mode, the + // functions implemented are the non-static members which are a + // virtual overrides. This reduces the number of functions in the + // binary in both modes. p->Emit(R"cc( ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - ::size_t ByteSizeLong() const PROTOBUF_FINAL; - $uint8$* _InternalSerialize($uint8$* target, - ::$proto_ns$::io::EpsCopyOutputStream* - stream) const PROTOBUF_FINAL; +#if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::$proto_ns$::MessageLite& msg); + static $uint8$* _InternalSerialize( + const MessageLite& msg, $uint8$* target, + ::$proto_ns$::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + $uint8$* _InternalSerialize( + $uint8$* target, + ::$proto_ns$::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + $uint8$* _InternalSerialize( + $uint8$* target, + ::$proto_ns$::io::EpsCopyOutputStream* stream) const final; +#endif // PROTOBUF_CUSTOM_VTABLE )cc"); } }}, @@ -3711,9 +3733,8 @@ void MessageGenerator::GenerateClassData(io::Printer* p) { if (HasGeneratedMethods(descriptor_->file(), options_) && !IsMapEntryMessage(descriptor_)) { p->Emit(R"cc( - $superclass$::GetClearImpl<$classname$>(), - $superclass$::GetByteSizeLongImpl<$classname$>(), - $superclass$::GetSerializeImpl<$classname$>(), + $superclass$::GetClearImpl<$classname$>(), &$classname$::ByteSizeLong, + &$classname$::_InternalSerialize, )cc"); } else { p->Emit(R"cc( @@ -4158,7 +4179,7 @@ void MessageGenerator::GenerateSerializeOneofFields( } }}}, R"cc( - switch ($name$_case()) { + switch (this_.$name$_case()) { $cases$; default: break; @@ -4193,7 +4214,8 @@ void MessageGenerator::GenerateSerializeOneField(io::Printer* p, if (cached_has_bits_index == has_bit_index / 32) { p->Emit("cached_has_bits & $has_mask$"); } else { - p->Emit("($has_bits$[$has_array_index$] & $has_mask$) != 0"); + p->Emit( + "(this_.$has_bits$[$has_array_index$] & $has_mask$) != 0"); } }}, }, @@ -4203,7 +4225,7 @@ void MessageGenerator::GenerateSerializeOneField(io::Printer* p, } )cc"); } else if (field->is_optional()) { - bool have_enclosing_if = MayEmitIfNonDefaultCheck(p, "this->", field); + bool have_enclosing_if = MayEmitIfNonDefaultCheck(p, "this_.", field); if (have_enclosing_if) p->Indent(); emit_body(); if (have_enclosing_if) { @@ -4224,7 +4246,7 @@ void MessageGenerator::GenerateSerializeOneExtensionRange(io::Printer* p, p->Emit({{"start", start}, {"end", end}}, R"cc( // Extension range [$start$, $end$) - target = $extensions$._InternalSerialize( + target = this_.$extensions$._InternalSerialize( internal_default_instance(), $start$, $end$, target, stream); )cc"); } @@ -4234,14 +4256,23 @@ void MessageGenerator::GenerateSerializeWithCachedSizesToArray(io::Printer* p) { if (descriptor_->options().message_set_wire_format()) { // Special-case MessageSet. p->Emit(R"cc( +#if defined(PROTOBUF_CUSTOM_VTABLE) + $uint8$* $classname$::_InternalSerialize( + const MessageLite& base, $uint8$* target, + ::$proto_ns$::io::EpsCopyOutputStream* stream) { + const $classname$& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE $uint8$* $classname$::_InternalSerialize( $uint8$* target, ::$proto_ns$::io::EpsCopyOutputStream* stream) const { + const $classname$& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE $annotate_serialize$ target = - $extensions$.InternalSerializeMessageSetWithCachedSizesToArray( - internal_default_instance(), target, stream); + this_.$extensions$ + .InternalSerializeMessageSetWithCachedSizesToArray( + internal_default_instance(), target, stream); target = ::_pbi::InternalSerializeUnknownMessageSetItemsToArray( - $unknown_fields$, target, stream); + this_.$unknown_fields$, target, stream); return target; } )cc"); @@ -4272,9 +4303,17 @@ void MessageGenerator::GenerateSerializeWithCachedSizesToArray(io::Printer* p) { }}, }, R"cc( +#if defined(PROTOBUF_CUSTOM_VTABLE) + $uint8$* $classname$::_InternalSerialize( + const MessageLite& base, $uint8$* target, + ::$proto_ns$::io::EpsCopyOutputStream* stream) { + const $classname$& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE $uint8$* $classname$::_InternalSerialize( $uint8$* target, ::$proto_ns$::io::EpsCopyOutputStream* stream) const { + const $classname$& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE $annotate_serialize$; // @@protoc_insertion_point(serialize_to_array_start:$full_name$) $ifdef$; @@ -4318,7 +4357,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody(io::Printer* p) { int new_index = has_bit_index / 32; p_->Emit({{"index", new_index}}, R"cc( - cached_has_bits = _impl_._has_bits_[$index$]; + cached_has_bits = this_._impl_._has_bits_[$index$]; )cc"); cached_has_bit_index_ = new_index; } @@ -4429,7 +4468,8 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody(io::Printer* p) { [&] { if (num_weak_fields_ == 0) return; p->Emit(R"cc( - ::_pbi::WeakFieldMap::FieldWriter field_writer($weak_field_map$); + ::_pbi::WeakFieldMap::FieldWriter field_writer( + this_.$weak_field_map$); )cc"); }}, {"handle_lazy_fields", @@ -4469,13 +4509,13 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody(io::Printer* p) { p->Emit(R"cc( target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - $unknown_fields$, target, stream); + this_.$unknown_fields$, target, stream); )cc"); } else { p->Emit(R"cc( target = stream->WriteRaw( - $unknown_fields$.data(), - static_cast($unknown_fields$.size()), target); + this_.$unknown_fields$.data(), + static_cast(this_.$unknown_fields$.size()), target); )cc"); } }}, @@ -4486,7 +4526,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody(io::Printer* p) { (void)cached_has_bits; $handle_lazy_fields$; - if (PROTOBUF_PREDICT_FALSE($have_unknown_fields$)) { + if (PROTOBUF_PREDICT_FALSE(this_.$have_unknown_fields$)) { $handle_unknown_fields$; } )cc"); @@ -4517,7 +4557,8 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBodyShuffled( [&] { if (num_weak_fields_ == 0) return; p->Emit(R"cc( - ::_pbi::WeakFieldMap::FieldWriter field_writer($weak_field_map$); + ::_pbi::WeakFieldMap::FieldWriter field_writer( + this_.$weak_field_map$); )cc"); }}, {"ordered_cases", @@ -4558,13 +4599,13 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBodyShuffled( p->Emit(R"cc( target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - $unknown_fields$, target, stream); + this_.$unknown_fields$, target, stream); )cc"); } else { p->Emit(R"cc( target = stream->WriteRaw( - $unknown_fields$.data(), - static_cast($unknown_fields$.size()), target); + this_.$unknown_fields$.data(), + static_cast(this_.$unknown_fields$.size()), target); )cc"); } }}, @@ -4580,7 +4621,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBodyShuffled( } } } - if (PROTOBUF_PREDICT_FALSE($have_unknown_fields$)) { + if (PROTOBUF_PREDICT_FALSE(this_.$have_unknown_fields$)) { $handle_unknown_fields$; } )cc"); @@ -4609,15 +4650,22 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { // Special-case MessageSet. p->Emit( R"cc( - PROTOBUF_NOINLINE ::size_t $classname$::ByteSizeLong() const { +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t $classname$::ByteSizeLong(const MessageLite& base) { + const $classname$& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t $classname$::ByteSizeLong() const { + const $classname$& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE $WeakDescriptorSelfPin$; $annotate_bytesize$; // @@protoc_insertion_point(message_set_byte_size_start:$full_name$) - ::size_t total_size = $extensions$.MessageSetByteSize(); - if ($have_unknown_fields$) { - total_size += ::_pbi::ComputeUnknownMessageSetItemsSize($unknown_fields$); + ::size_t total_size = this_.$extensions$.MessageSetByteSize(); + if (this_.$have_unknown_fields$) { + total_size += ::_pbi::ComputeUnknownMessageSetItemsSize( + this_.$unknown_fields$); } - $cached_size$.Set(::_pbi::ToCachedSize(total_size)); + this_.$cached_size$.Set(::_pbi::ToCachedSize(total_size)); return total_size; } )cc"); @@ -4637,7 +4685,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { [&] { if (descriptor_->extension_range_count() == 0) return; p->Emit(R"cc( - total_size += $extensions$.ByteSize(); + total_size += this_.$extensions$.ByteSize(); )cc"); }}, {"prefetch", @@ -4663,8 +4711,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { return; } p->Emit(R"cc( - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); + ::_pbi::Prefetch5LinesFrom7Lines(&this_); )cc"); }}, {"handle_fields", @@ -4678,7 +4725,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { FindNextUnequalChunk(it, end, MayGroupChunksForHaswordsCheck); bool has_haswords_check = MaybeEmitHaswordsCheck(it, next, options_, has_bit_indices_, - cached_has_word_index, "", p); + cached_has_word_index, "this_.", p); while (it != next) { const auto& fields = it->fields; @@ -4715,7 +4762,8 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { cached_has_word_index = (has_bit_index / 32); p->Emit({{"index", cached_has_word_index}}, R"cc( - cached_has_bits = $has_bits$[$index$]; + cached_has_bits = + this_.$has_bits$[$index$]; )cc"); }}, {"check_if_field_present", @@ -4739,7 +4787,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { // value. p->Emit({{"non_default_check", [&] { - EmitNonDefaultCheck(p, "this->", + EmitNonDefaultCheck(p, "this_.", field); }}}, "if ($non_default_check$)"); @@ -4764,7 +4812,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { cached_has_word_index = HasWordIndex(fields.front()); p->Emit({{"index", cached_has_word_index}}, R"cc( - cached_has_bits = $has_bits$[$index$]; + cached_has_bits = this_.$has_bits$[$index$]; )cc"); }}, {"check_if_chunk_present", @@ -4840,7 +4888,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { } }}}, R"cc( - switch ($oneof_name$_case()) { + switch (this_.$oneof_name$_case()) { $case_per_field$; case $oneof_case_name$_NOT_SET: { break; @@ -4854,7 +4902,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { if (num_weak_fields_ == 0) return; // TagSize + MessageSize p->Emit(R"cc( - total_size += $weak_field_map$.ByteSizeLong(); + total_size += this_.$weak_field_map$.ByteSizeLong(); )cc"); }}, {"handle_unknown_fields", @@ -4864,7 +4912,8 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { // path of unknown fields in tail position. This allows for // better code generation of this function for simple protos. p->Emit(R"cc( - return MaybeComputeUnknownFieldsSize(total_size, &$cached_size$); + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_.$cached_size$); )cc"); } else { // We update _cached_size_ even though this is a const method. @@ -4877,16 +4926,22 @@ void MessageGenerator::GenerateByteSize(io::Printer* p) { // even relaxed memory order might have perf impact to replace it // with ordinary loads and stores. p->Emit(R"cc( - if (PROTOBUF_PREDICT_FALSE($have_unknown_fields$)) { - total_size += $unknown_fields$.size(); + if (PROTOBUF_PREDICT_FALSE(this_.$have_unknown_fields$)) { + total_size += this_.$unknown_fields$.size(); } - $cached_size$.Set(::_pbi::ToCachedSize(total_size)); + this_.$cached_size$.Set(::_pbi::ToCachedSize(total_size)); return total_size; )cc"); } }}}, R"cc( +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t $classname$::ByteSizeLong(const MessageLite& base) { + const $classname$& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE ::size_t $classname$::ByteSizeLong() const { + const $classname$& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE $WeakDescriptorSelfPin$; $annotate_bytesize$; // @@protoc_insertion_point(message_byte_size_start:$full_name$) diff --git a/src/google/protobuf/compiler/cpp/tracker.cc b/src/google/protobuf/compiler/cpp/tracker.cc index 4c565c5e81..ae6edc013e 100644 --- a/src/google/protobuf/compiler/cpp/tracker.cc +++ b/src/google/protobuf/compiler/cpp/tracker.cc @@ -148,14 +148,14 @@ std::vector MakeTrackerCalls(const Descriptor* message, return GenerateTrackerCalls( opts, message, absl::nullopt, { - Call("serialize", "OnSerialize"), + Call("serialize", "OnSerialize").This("&this_"), Call("deserialize", "OnDeserialize").This("_this"), // TODO: Ideally annotate_reflection should not exist and we // need to annotate all reflective calls on our own, however, as this // is a cause for side effects, i.e. reading values dynamically, we // want the users know that dynamic access can happen. Call("reflection", "OnGetMetadata").This(absl::nullopt), - Call("bytesize", "OnByteSize"), + Call("bytesize", "OnByteSize").This("&this_"), Call("mergefrom", "OnMergeFrom").This("_this").Arg("&from"), Call("unknown_fields", "OnUnknownFields"), Call("mutable_unknown_fields", "OnMutableUnknownFields"), diff --git a/src/google/protobuf/compiler/java/java_features.pb.cc b/src/google/protobuf/compiler/java/java_features.pb.cc index 1710798f4e..b292f00f4b 100644 --- a/src/google/protobuf/compiler/java/java_features.pb.cc +++ b/src/google/protobuf/compiler/java/java_features.pb.cc @@ -206,9 +206,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(), &JavaFeatures::ByteSizeLong, + &JavaFeatures::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(JavaFeatures, _impl_._cached_size_), false, @@ -279,61 +278,75 @@ PROTOBUF_NOINLINE void JavaFeatures::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* JavaFeatures::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:pb.JavaFeatures) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* JavaFeatures::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const JavaFeatures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* JavaFeatures::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const JavaFeatures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:pb.JavaFeatures) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - cached_has_bits = _impl_._has_bits_[0]; - // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 1, this->_internal_legacy_closed_enum(), target); - } + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this_._internal_legacy_closed_enum(), target); + } - // optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_utf8_validation(), target); - } + // optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this_._internal_utf8_validation(), 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:pb.JavaFeatures) - 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:pb.JavaFeatures) + return target; + } -::size_t JavaFeatures::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:pb.JavaFeatures) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t JavaFeatures::ByteSizeLong(const MessageLite& base) { + const JavaFeatures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t JavaFeatures::ByteSizeLong() const { + const JavaFeatures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:pb.JavaFeatures) + ::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)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000001u) { - total_size += 2; - } - // optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_utf8_validation()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000001u) { + total_size += 2; + } + // optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_utf8_validation()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void JavaFeatures::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/compiler/java/java_features.pb.h b/src/google/protobuf/compiler/java/java_features.pb.h index d0a8367f82..50bc2acb4f 100644 --- a/src/google/protobuf/compiler/java/java_features.pb.h +++ b/src/google/protobuf/compiler/java/java_features.pb.h @@ -193,10 +193,26 @@ class PROTOC_EXPORT JavaFeatures 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/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index bcd287ee76..3320a3bd6d 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -404,9 +404,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(), &Version::ByteSizeLong, + &Version::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(Version, _impl_._cached_size_), false, @@ -495,87 +494,101 @@ PROTOBUF_NOINLINE void Version::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* Version::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional int32 major = 1; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this->_internal_major(), target); - } - - // optional int32 minor = 2; - if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_minor(), target); - } - - // optional int32 patch = 3; - if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<3>( - stream, this->_internal_patch(), target); - } - - // optional string suffix = 4; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_suffix(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.Version.suffix"); - target = stream->WriteStringMaybeAliased(4, _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.compiler.Version) - return target; -} - -::size_t Version::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version) - ::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* Version::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const Version& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* Version::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const Version& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 major = 1; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_major(), target); + } + + // optional int32 minor = 2; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_minor(), target); + } + + // optional int32 patch = 3; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this_._internal_patch(), target); + } + + // optional string suffix = 4; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_suffix(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.Version.suffix"); + target = stream->WriteStringMaybeAliased(4, _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.compiler.Version) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional string suffix = 4; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_suffix()); - } - // optional int32 major = 1; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_major()); - } - // optional int32 minor = 2; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_minor()); - } - // optional int32 patch = 3; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_patch()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t Version::ByteSizeLong(const MessageLite& base) { + const Version& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t Version::ByteSizeLong() const { + const Version& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string suffix = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_suffix()); + } + // optional int32 major = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_major()); + } + // optional int32 minor = 2; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_minor()); + } + // optional int32 patch = 3; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_patch()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void Version::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -725,9 +738,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(), &CodeGeneratorRequest::ByteSizeLong, + &CodeGeneratorRequest::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(CodeGeneratorRequest, _impl_._cached_size_), false, @@ -830,116 +842,132 @@ PROTOBUF_NOINLINE void CodeGeneratorRequest::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* CodeGeneratorRequest::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated string file_to_generate = 1; - for (int i = 0, n = this->_internal_file_to_generate_size(); i < n; ++i) { - const auto& s = this->_internal_file_to_generate().Get(i); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); - target = stream->WriteString(1, s, target); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional string parameter = 2; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_parameter(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorRequest.parameter"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional .google.protobuf.compiler.Version compiler_version = 3; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *_impl_.compiler_version_, _impl_.compiler_version_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - for (unsigned i = 0, n = static_cast( - this->_internal_proto_file_size()); - i < n; i++) { - const auto& repfield = this->_internal_proto_file().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 15, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17; - for (unsigned i = 0, n = static_cast( - this->_internal_source_file_descriptors_size()); - i < n; i++) { - const auto& repfield = this->_internal_source_file_descriptors().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 17, 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.compiler.CodeGeneratorRequest) - return target; -} - -::size_t CodeGeneratorRequest::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest) - ::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* CodeGeneratorRequest::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const CodeGeneratorRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* CodeGeneratorRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const CodeGeneratorRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated string file_to_generate = 1; + for (int i = 0, n = this_._internal_file_to_generate_size(); i < n; ++i) { + const auto& s = this_._internal_file_to_generate().Get(i); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); + target = stream->WriteString(1, s, target); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string parameter = 2; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_parameter(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorRequest.parameter"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional .google.protobuf.compiler.Version compiler_version = 3; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.compiler_version_, this_._impl_.compiler_version_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.FileDescriptorProto proto_file = 15; + for (unsigned i = 0, n = static_cast( + this_._internal_proto_file_size()); + i < n; i++) { + const auto& repfield = this_._internal_proto_file().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17; + for (unsigned i = 0, n = static_cast( + this_._internal_source_file_descriptors_size()); + i < n; i++) { + const auto& repfield = this_._internal_source_file_descriptors().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 17, 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.compiler.CodeGeneratorRequest) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated string file_to_generate = 1; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_file_to_generate().size()); - for (int i = 0, n = _internal_file_to_generate().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_file_to_generate().Get(i)); - } - } - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - { - total_size += 1UL * this->_internal_proto_file_size(); - for (const auto& msg : this->_internal_proto_file()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17; - { - total_size += 2UL * this->_internal_source_file_descriptors_size(); - for (const auto& msg : this->_internal_source_file_descriptors()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string parameter = 2; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_parameter()); - } - // optional .google.protobuf.compiler.Version compiler_version = 3; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.compiler_version_); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t CodeGeneratorRequest::ByteSizeLong(const MessageLite& base) { + const CodeGeneratorRequest& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t CodeGeneratorRequest::ByteSizeLong() const { + const CodeGeneratorRequest& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest) + ::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 string file_to_generate = 1; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_file_to_generate().size()); + for (int i = 0, n = this_._internal_file_to_generate().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_file_to_generate().Get(i)); + } + } + // repeated .google.protobuf.FileDescriptorProto proto_file = 15; + { + total_size += 1UL * this_._internal_proto_file_size(); + for (const auto& msg : this_._internal_proto_file()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17; + { + total_size += 2UL * this_._internal_source_file_descriptors_size(); + for (const auto& msg : this_._internal_source_file_descriptors()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string parameter = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_parameter()); + } + // optional .google.protobuf.compiler.Version compiler_version = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.compiler_version_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void CodeGeneratorRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -1099,9 +1127,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(), &CodeGeneratorResponse_File::ByteSizeLong, + &CodeGeneratorResponse_File::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse_File, _impl_._cached_size_), false, @@ -1199,88 +1226,103 @@ PROTOBUF_NOINLINE void CodeGeneratorResponse_File::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* CodeGeneratorResponse_File::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.File.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional string insertion_point = 2; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_insertion_point(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional string content = 15; - if (cached_has_bits & 0x00000004u) { - const std::string& _s = this->_internal_content(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.File.content"); - target = stream->WriteStringMaybeAliased(15, _s, target); - } - - // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16; - if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 16, *_impl_.generated_code_info_, _impl_.generated_code_info_->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.compiler.CodeGeneratorResponse.File) - return target; -} - -::size_t CodeGeneratorResponse_File::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File) - ::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* CodeGeneratorResponse_File::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const CodeGeneratorResponse_File& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* CodeGeneratorResponse_File::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const CodeGeneratorResponse_File& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorResponse.File.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string insertion_point = 2; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_insertion_point(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional string content = 15; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_content(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorResponse.File.content"); + target = stream->WriteStringMaybeAliased(15, _s, target); + } + + // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 16, *this_._impl_.generated_code_info_, this_._impl_.generated_code_info_->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.compiler.CodeGeneratorResponse.File) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional string insertion_point = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_insertion_point()); - } - // optional string content = 15; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_content()); - } - // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16; - if (cached_has_bits & 0x00000008u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.generated_code_info_); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t CodeGeneratorResponse_File::ByteSizeLong(const MessageLite& base) { + const CodeGeneratorResponse_File& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t CodeGeneratorResponse_File::ByteSizeLong() const { + const CodeGeneratorResponse_File& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string insertion_point = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_insertion_point()); + } + // optional string content = 15; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_content()); + } + // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16; + if (cached_has_bits & 0x00000008u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.generated_code_info_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void CodeGeneratorResponse_File::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -1429,9 +1471,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(), &CodeGeneratorResponse::ByteSizeLong, + &CodeGeneratorResponse::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(CodeGeneratorResponse, _impl_._cached_size_), false, @@ -1530,107 +1571,121 @@ PROTOBUF_NOINLINE void CodeGeneratorResponse::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* CodeGeneratorResponse::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string error = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_error(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.error"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional uint64 supported_features = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray( - 2, this->_internal_supported_features(), target); - } - - // optional int32 minimum_edition = 3; - if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<3>( - stream, this->_internal_minimum_edition(), target); - } - - // optional int32 maximum_edition = 4; - if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<4>( - stream, this->_internal_maximum_edition(), target); - } - - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - for (unsigned i = 0, n = static_cast( - this->_internal_file_size()); - i < n; i++) { - const auto& repfield = this->_internal_file().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 15, 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.compiler.CodeGeneratorResponse) - return target; -} - -::size_t CodeGeneratorResponse::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse) - ::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* CodeGeneratorResponse::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const CodeGeneratorResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* CodeGeneratorResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const CodeGeneratorResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string error = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_error(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.compiler.CodeGeneratorResponse.error"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional uint64 supported_features = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this_._internal_supported_features(), target); + } + + // optional int32 minimum_edition = 3; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this_._internal_minimum_edition(), target); + } + + // optional int32 maximum_edition = 4; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<4>( + stream, this_._internal_maximum_edition(), target); + } + + // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; + for (unsigned i = 0, n = static_cast( + this_._internal_file_size()); + i < n; i++) { + const auto& repfield = this_._internal_file().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, 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.compiler.CodeGeneratorResponse) + return target; + } - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - { - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - { - total_size += 1UL * this->_internal_file_size(); - for (const auto& msg : this->_internal_file()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional string error = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_error()); - } - // optional uint64 supported_features = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( - this->_internal_supported_features()); - } - // optional int32 minimum_edition = 3; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_minimum_edition()); - } - // optional int32 maximum_edition = 4; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_maximum_edition()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t CodeGeneratorResponse::ByteSizeLong(const MessageLite& base) { + const CodeGeneratorResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t CodeGeneratorResponse::ByteSizeLong() const { + const CodeGeneratorResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse) + ::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.compiler.CodeGeneratorResponse.File file = 15; + { + total_size += 1UL * this_._internal_file_size(); + for (const auto& msg : this_._internal_file()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string error = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_error()); + } + // optional uint64 supported_features = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_supported_features()); + } + // optional int32 minimum_edition = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_minimum_edition()); + } + // optional int32 maximum_edition = 4; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_maximum_edition()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void CodeGeneratorResponse::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/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index eb06e14aff..3ffa5ff739 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -210,10 +210,26 @@ class PROTOC_EXPORT Version 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: @@ -427,10 +443,26 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : public ::google::protobuf 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: @@ -660,10 +692,26 @@ class PROTOC_EXPORT CodeGeneratorResponse final : public ::google::protobuf::Mes 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: @@ -922,10 +970,26 @@ class PROTOC_EXPORT CodeGeneratorRequest final : public ::google::protobuf::Mess public: 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/cpp_features.pb.cc b/src/google/protobuf/cpp_features.pb.cc index b55bcf2cea..037da6bd20 100644 --- a/src/google/protobuf/cpp_features.pb.cc +++ b/src/google/protobuf/cpp_features.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(), &CppFeatures::ByteSizeLong, + &CppFeatures::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(CppFeatures, _impl_._cached_size_), false, @@ -274,61 +273,75 @@ PROTOBUF_NOINLINE void CppFeatures::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* CppFeatures::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:pb.CppFeatures) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* CppFeatures::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const CppFeatures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* CppFeatures::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const CppFeatures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:pb.CppFeatures) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; - cached_has_bits = _impl_._has_bits_[0]; - // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 1, this->_internal_legacy_closed_enum(), target); - } + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this_._internal_legacy_closed_enum(), target); + } - // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_string_type(), target); - } + // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this_._internal_string_type(), 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:pb.CppFeatures) - 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:pb.CppFeatures) + return target; + } -::size_t CppFeatures::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:pb.CppFeatures) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t CppFeatures::ByteSizeLong(const MessageLite& base) { + const CppFeatures& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t CppFeatures::ByteSizeLong() const { + const CppFeatures& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:pb.CppFeatures) + ::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)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000001u) { - total_size += 2; - } - // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_string_type()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000001u) { + total_size += 2; + } + // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_string_type()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void CppFeatures::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/cpp_features.pb.h b/src/google/protobuf/cpp_features.pb.h index dbde2ceb78..180a90d55c 100644 --- a/src/google/protobuf/cpp_features.pb.h +++ b/src/google/protobuf/cpp_features.pb.h @@ -194,10 +194,26 @@ class PROTOBUF_EXPORT CppFeatures 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/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 77b23c6891..d934fd2d0f 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -2668,9 +2668,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(), &FileDescriptorSet::ByteSizeLong, + &FileDescriptorSet::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FileDescriptorSet, _impl_._cached_size_), false, @@ -2728,54 +2727,68 @@ PROTOBUF_NOINLINE void FileDescriptorSet::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FileDescriptorSet::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.FileDescriptorProto file = 1; - for (unsigned i = 0, n = static_cast( - this->_internal_file_size()); - i < n; i++) { - const auto& repfield = this->_internal_file().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.FileDescriptorSet) - return target; -} - -::size_t FileDescriptorSet::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorSet) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.FileDescriptorProto file = 1; - { - total_size += 1UL * this->_internal_file_size(); - for (const auto& msg : this->_internal_file()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FileDescriptorSet::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FileDescriptorSet& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FileDescriptorSet::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FileDescriptorSet& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.FileDescriptorProto file = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_file_size()); + i < n; i++) { + const auto& repfield = this_._internal_file().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.FileDescriptorSet) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FileDescriptorSet::ByteSizeLong(const MessageLite& base) { + const FileDescriptorSet& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FileDescriptorSet::ByteSizeLong() const { + const FileDescriptorSet& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorSet) + ::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.FileDescriptorProto file = 1; + { + total_size += 1UL * this_._internal_file_size(); + for (const auto& msg : this_._internal_file()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FileDescriptorSet::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -2925,9 +2938,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(), &FileDescriptorProto::ByteSizeLong, + &FileDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FileDescriptorProto, _impl_._cached_size_), false, @@ -3100,235 +3112,252 @@ PROTOBUF_NOINLINE void FileDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FileDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional string package = 2; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_package(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.package"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // repeated string dependency = 3; - for (int i = 0, n = this->_internal_dependency_size(); i < n; ++i) { - const auto& s = this->_internal_dependency().Get(i); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.dependency"); - target = stream->WriteString(3, s, target); - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - for (unsigned i = 0, n = static_cast( - this->_internal_message_type_size()); - i < n; i++) { - const auto& repfield = this->_internal_message_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - for (unsigned i = 0, n = static_cast( - this->_internal_enum_type_size()); - i < n; i++) { - const auto& repfield = this->_internal_enum_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - for (unsigned i = 0, n = static_cast( - this->_internal_service_size()); - i < n; i++) { - const auto& repfield = this->_internal_service().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - for (unsigned i = 0, n = static_cast( - this->_internal_extension_size()); - i < n; i++) { - const auto& repfield = this->_internal_extension().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 7, repfield, repfield.GetCachedSize(), - target, stream); - } - - // optional .google.protobuf.FileOptions options = 8; - if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, *_impl_.options_, _impl_.options_->GetCachedSize(), target, stream); - } - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - if (cached_has_bits & 0x00000010u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 9, *_impl_.source_code_info_, _impl_.source_code_info_->GetCachedSize(), target, stream); - } - - // repeated int32 public_dependency = 10; - for (int i = 0, n = this->_internal_public_dependency_size(); i < n; ++i) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray( - 10, this->_internal_public_dependency().Get(i), target); - } - - // repeated int32 weak_dependency = 11; - for (int i = 0, n = this->_internal_weak_dependency_size(); i < n; ++i) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray( - 11, this->_internal_weak_dependency().Get(i), target); - } - - // optional string syntax = 12; - if (cached_has_bits & 0x00000004u) { - const std::string& _s = this->_internal_syntax(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.syntax"); - target = stream->WriteStringMaybeAliased(12, _s, target); - } - - // optional .google.protobuf.Edition edition = 14; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 14, this->_internal_edition(), 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.FileDescriptorProto) - return target; -} - -::size_t FileDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto) - ::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( - reinterpret_cast(this)); - { - // repeated string dependency = 3; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_dependency().size()); - for (int i = 0, n = _internal_dependency().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_dependency().Get(i)); - } - } - // repeated .google.protobuf.DescriptorProto message_type = 4; - { - total_size += 1UL * this->_internal_message_type_size(); - for (const auto& msg : this->_internal_message_type()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - { - total_size += 1UL * this->_internal_enum_type_size(); - for (const auto& msg : this->_internal_enum_type()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - { - total_size += 1UL * this->_internal_service_size(); - for (const auto& msg : this->_internal_service()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - { - total_size += 1UL * this->_internal_extension_size(); - for (const auto& msg : this->_internal_extension()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated int32 public_dependency = 10; - { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( - this->_internal_public_dependency()) - ; - std::size_t tag_size = std::size_t{1} * - ::_pbi::FromIntSize(this->_internal_public_dependency_size()); - ; - total_size += tag_size + data_size; - } - // repeated int32 weak_dependency = 11; - { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( - this->_internal_weak_dependency()) - ; - std::size_t tag_size = std::size_t{1} * - ::_pbi::FromIntSize(this->_internal_weak_dependency_size()); - ; - total_size += tag_size + data_size; - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional string package = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_package()); - } - // optional string syntax = 12; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_syntax()); - } - // optional .google.protobuf.FileOptions options = 8; - if (cached_has_bits & 0x00000008u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - if (cached_has_bits & 0x00000010u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.source_code_info_); - } - // optional .google.protobuf.Edition edition = 14; - if (cached_has_bits & 0x00000020u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_edition()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FileDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FileDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FileDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FileDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string package = 2; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_package(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileDescriptorProto.package"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // repeated string dependency = 3; + for (int i = 0, n = this_._internal_dependency_size(); i < n; ++i) { + const auto& s = this_._internal_dependency().Get(i); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileDescriptorProto.dependency"); + target = stream->WriteString(3, s, target); + } + + // repeated .google.protobuf.DescriptorProto message_type = 4; + for (unsigned i = 0, n = static_cast( + this_._internal_message_type_size()); + i < n; i++) { + const auto& repfield = this_._internal_message_type().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; + for (unsigned i = 0, n = static_cast( + this_._internal_enum_type_size()); + i < n; i++) { + const auto& repfield = this_._internal_enum_type().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.ServiceDescriptorProto service = 6; + for (unsigned i = 0, n = static_cast( + this_._internal_service_size()); + i < n; i++) { + const auto& repfield = this_._internal_service().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.FieldDescriptorProto extension = 7; + for (unsigned i = 0, n = static_cast( + this_._internal_extension_size()); + i < n; i++) { + const auto& repfield = this_._internal_extension().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .google.protobuf.FileOptions options = 8; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, *this_._impl_.options_, this_._impl_.options_->GetCachedSize(), target, + stream); + } + + // optional .google.protobuf.SourceCodeInfo source_code_info = 9; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, *this_._impl_.source_code_info_, this_._impl_.source_code_info_->GetCachedSize(), target, + stream); + } + + // repeated int32 public_dependency = 10; + for (int i = 0, n = this_._internal_public_dependency_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 10, this_._internal_public_dependency().Get(i), target); + } + + // repeated int32 weak_dependency = 11; + for (int i = 0, n = this_._internal_weak_dependency_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 11, this_._internal_weak_dependency().Get(i), target); + } + + // optional string syntax = 12; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_syntax(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileDescriptorProto.syntax"); + target = stream->WriteStringMaybeAliased(12, _s, target); + } + + // optional .google.protobuf.Edition edition = 14; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 14, this_._internal_edition(), 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.FileDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FileDescriptorProto::ByteSizeLong(const MessageLite& base) { + const FileDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FileDescriptorProto::ByteSizeLong() const { + const FileDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto) + ::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 string dependency = 3; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_dependency().size()); + for (int i = 0, n = this_._internal_dependency().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_dependency().Get(i)); + } + } + // repeated .google.protobuf.DescriptorProto message_type = 4; + { + total_size += 1UL * this_._internal_message_type_size(); + for (const auto& msg : this_._internal_message_type()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; + { + total_size += 1UL * this_._internal_enum_type_size(); + for (const auto& msg : this_._internal_enum_type()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.ServiceDescriptorProto service = 6; + { + total_size += 1UL * this_._internal_service_size(); + for (const auto& msg : this_._internal_service()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.FieldDescriptorProto extension = 7; + { + total_size += 1UL * this_._internal_extension_size(); + for (const auto& msg : this_._internal_extension()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated int32 public_dependency = 10; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this_._internal_public_dependency()) + ; + std::size_t tag_size = std::size_t{1} * + ::_pbi::FromIntSize(this_._internal_public_dependency_size()); + ; + total_size += tag_size + data_size; + } + // repeated int32 weak_dependency = 11; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this_._internal_weak_dependency()) + ; + std::size_t tag_size = std::size_t{1} * + ::_pbi::FromIntSize(this_._internal_weak_dependency_size()); + ; + total_size += tag_size + data_size; + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string package = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_package()); + } + // optional string syntax = 12; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_syntax()); + } + // optional .google.protobuf.FileOptions options = 8; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + // optional .google.protobuf.SourceCodeInfo source_code_info = 9; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.source_code_info_); + } + // optional .google.protobuf.Edition edition = 14; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_edition()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FileDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -3528,9 +3557,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(), &DescriptorProto_ExtensionRange::ByteSizeLong, + &DescriptorProto_ExtensionRange::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, _impl_._cached_size_), false, @@ -3611,73 +3639,88 @@ PROTOBUF_NOINLINE void DescriptorProto_ExtensionRange::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional int32 start = 1; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this->_internal_start(), target); - } - - // optional int32 end = 2; - if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_end(), target); - } - - // optional .google.protobuf.ExtensionRangeOptions options = 3; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *_impl_.options_, _impl_.options_->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.DescriptorProto.ExtensionRange) - return target; -} - -::size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ExtensionRange) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - // optional .google.protobuf.ExtensionRangeOptions options = 3; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - // optional int32 start = 1; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_start()); - } - // optional int32 end = 2; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_end()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const DescriptorProto_ExtensionRange& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const DescriptorProto_ExtensionRange& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 start = 1; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_start(), target); + } + + // optional int32 end = 2; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_end(), target); + } + + // optional .google.protobuf.ExtensionRangeOptions options = 3; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.options_, this_._impl_.options_->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.DescriptorProto.ExtensionRange) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t DescriptorProto_ExtensionRange::ByteSizeLong(const MessageLite& base) { + const DescriptorProto_ExtensionRange& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { + const DescriptorProto_ExtensionRange& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ExtensionRange) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .google.protobuf.ExtensionRangeOptions options = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + // optional int32 start = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_start()); + } + // optional int32 end = 2; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_end()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void DescriptorProto_ExtensionRange::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -3802,9 +3845,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(), &DescriptorProto_ReservedRange::ByteSizeLong, + &DescriptorProto_ReservedRange::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, _impl_._cached_size_), false, @@ -3874,62 +3916,76 @@ PROTOBUF_NOINLINE void DescriptorProto_ReservedRange::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* DescriptorProto_ReservedRange::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional int32 start = 1; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this->_internal_start(), target); - } - - // optional int32 end = 2; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_end(), 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.DescriptorProto.ReservedRange) - return target; -} - -::size_t DescriptorProto_ReservedRange::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ReservedRange) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional int32 start = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_start()); - } - // optional int32 end = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_end()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* DescriptorProto_ReservedRange::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const DescriptorProto_ReservedRange& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* DescriptorProto_ReservedRange::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const DescriptorProto_ReservedRange& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 start = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_start(), target); + } + + // optional int32 end = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_end(), 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.DescriptorProto.ReservedRange) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t DescriptorProto_ReservedRange::ByteSizeLong(const MessageLite& base) { + const DescriptorProto_ReservedRange& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t DescriptorProto_ReservedRange::ByteSizeLong() const { + const DescriptorProto_ReservedRange& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ReservedRange) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int32 start = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_start()); + } + // optional int32 end = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_end()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void DescriptorProto_ReservedRange::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -4072,9 +4128,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(), &DescriptorProto::ByteSizeLong, + &DescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(DescriptorProto, _impl_._cached_size_), false, @@ -4221,206 +4276,222 @@ PROTOBUF_NOINLINE void DescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* DescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.DescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // repeated .google.protobuf.FieldDescriptorProto field = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_field_size()); - i < n; i++) { - const auto& repfield = this->_internal_field().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - for (unsigned i = 0, n = static_cast( - this->_internal_nested_type_size()); - i < n; i++) { - const auto& repfield = this->_internal_nested_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - for (unsigned i = 0, n = static_cast( - this->_internal_enum_type_size()); - i < n; i++) { - const auto& repfield = this->_internal_enum_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - for (unsigned i = 0, n = static_cast( - this->_internal_extension_range_size()); - i < n; i++) { - const auto& repfield = this->_internal_extension_range().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - for (unsigned i = 0, n = static_cast( - this->_internal_extension_size()); - i < n; i++) { - const auto& repfield = this->_internal_extension().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, repfield, repfield.GetCachedSize(), - target, stream); - } - - // optional .google.protobuf.MessageOptions options = 7; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 7, *_impl_.options_, _impl_.options_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - for (unsigned i = 0, n = static_cast( - this->_internal_oneof_decl_size()); - i < n; i++) { - const auto& repfield = this->_internal_oneof_decl().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - for (unsigned i = 0, n = static_cast( - this->_internal_reserved_range_size()); - i < n; i++) { - const auto& repfield = this->_internal_reserved_range().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 9, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated string reserved_name = 10; - for (int i = 0, n = this->_internal_reserved_name_size(); i < n; ++i) { - const auto& s = this->_internal_reserved_name().Get(i); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.DescriptorProto.reserved_name"); - target = stream->WriteString(10, 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.DescriptorProto) - return target; -} - -::size_t DescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.FieldDescriptorProto field = 2; - { - total_size += 1UL * this->_internal_field_size(); - for (const auto& msg : this->_internal_field()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.DescriptorProto nested_type = 3; - { - total_size += 1UL * this->_internal_nested_type_size(); - for (const auto& msg : this->_internal_nested_type()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - { - total_size += 1UL * this->_internal_enum_type_size(); - for (const auto& msg : this->_internal_enum_type()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - { - total_size += 1UL * this->_internal_extension_range_size(); - for (const auto& msg : this->_internal_extension_range()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - { - total_size += 1UL * this->_internal_extension_size(); - for (const auto& msg : this->_internal_extension()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - { - total_size += 1UL * this->_internal_oneof_decl_size(); - for (const auto& msg : this->_internal_oneof_decl()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - { - total_size += 1UL * this->_internal_reserved_range_size(); - for (const auto& msg : this->_internal_reserved_range()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated string reserved_name = 10; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_reserved_name().size()); - for (int i = 0, n = _internal_reserved_name().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_reserved_name().Get(i)); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional .google.protobuf.MessageOptions options = 7; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* DescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const DescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* DescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const DescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.DescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .google.protobuf.FieldDescriptorProto field = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_field_size()); + i < n; i++) { + const auto& repfield = this_._internal_field().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.DescriptorProto nested_type = 3; + for (unsigned i = 0, n = static_cast( + this_._internal_nested_type_size()); + i < n; i++) { + const auto& repfield = this_._internal_nested_type().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; + for (unsigned i = 0, n = static_cast( + this_._internal_enum_type_size()); + i < n; i++) { + const auto& repfield = this_._internal_enum_type().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; + for (unsigned i = 0, n = static_cast( + this_._internal_extension_range_size()); + i < n; i++) { + const auto& repfield = this_._internal_extension_range().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.FieldDescriptorProto extension = 6; + for (unsigned i = 0, n = static_cast( + this_._internal_extension_size()); + i < n; i++) { + const auto& repfield = this_._internal_extension().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .google.protobuf.MessageOptions options = 7; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, *this_._impl_.options_, this_._impl_.options_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; + for (unsigned i = 0, n = static_cast( + this_._internal_oneof_decl_size()); + i < n; i++) { + const auto& repfield = this_._internal_oneof_decl().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; + for (unsigned i = 0, n = static_cast( + this_._internal_reserved_range_size()); + i < n; i++) { + const auto& repfield = this_._internal_reserved_range().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated string reserved_name = 10; + for (int i = 0, n = this_._internal_reserved_name_size(); i < n; ++i) { + const auto& s = this_._internal_reserved_name().Get(i); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.DescriptorProto.reserved_name"); + target = stream->WriteString(10, 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.DescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t DescriptorProto::ByteSizeLong(const MessageLite& base) { + const DescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t DescriptorProto::ByteSizeLong() const { + const DescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto) + ::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.FieldDescriptorProto field = 2; + { + total_size += 1UL * this_._internal_field_size(); + for (const auto& msg : this_._internal_field()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.DescriptorProto nested_type = 3; + { + total_size += 1UL * this_._internal_nested_type_size(); + for (const auto& msg : this_._internal_nested_type()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; + { + total_size += 1UL * this_._internal_enum_type_size(); + for (const auto& msg : this_._internal_enum_type()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; + { + total_size += 1UL * this_._internal_extension_range_size(); + for (const auto& msg : this_._internal_extension_range()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.FieldDescriptorProto extension = 6; + { + total_size += 1UL * this_._internal_extension_size(); + for (const auto& msg : this_._internal_extension()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; + { + total_size += 1UL * this_._internal_oneof_decl_size(); + for (const auto& msg : this_._internal_oneof_decl()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; + { + total_size += 1UL * this_._internal_reserved_range_size(); + for (const auto& msg : this_._internal_reserved_range()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated string reserved_name = 10; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_reserved_name().size()); + for (int i = 0, n = this_._internal_reserved_name().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_reserved_name().Get(i)); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional .google.protobuf.MessageOptions options = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void DescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -4605,9 +4676,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(), &ExtensionRangeOptions_Declaration::ByteSizeLong, + &ExtensionRangeOptions_Declaration::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(ExtensionRangeOptions_Declaration, _impl_._cached_size_), false, @@ -4710,104 +4780,118 @@ PROTOBUF_NOINLINE void ExtensionRangeOptions_Declaration::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* ExtensionRangeOptions_Declaration::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions.Declaration) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional int32 number = 1; - if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this->_internal_number(), target); - } - - // optional string full_name = 2; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_full_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.ExtensionRangeOptions.Declaration.full_name"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional string type = 3; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_type(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.ExtensionRangeOptions.Declaration.type"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // optional bool reserved = 5; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 5, this->_internal_reserved(), target); - } - - // optional bool repeated = 6; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 6, this->_internal_repeated(), 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.ExtensionRangeOptions.Declaration) - return target; -} - -::size_t ExtensionRangeOptions_Declaration::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions.Declaration) - ::size_t total_size = 0; +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ExtensionRangeOptions_Declaration::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ExtensionRangeOptions_Declaration& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ExtensionRangeOptions_Declaration::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ExtensionRangeOptions_Declaration& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions.Declaration) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 number = 1; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_number(), target); + } + + // optional string full_name = 2; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_full_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.ExtensionRangeOptions.Declaration.full_name"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional string type = 3; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_type(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.ExtensionRangeOptions.Declaration.type"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional bool reserved = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this_._internal_reserved(), target); + } + + // optional bool repeated = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 6, this_._internal_repeated(), 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.ExtensionRangeOptions.Declaration) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ExtensionRangeOptions_Declaration::ByteSizeLong(const MessageLite& base) { + const ExtensionRangeOptions_Declaration& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ExtensionRangeOptions_Declaration::ByteSizeLong() const { + const ExtensionRangeOptions_Declaration& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions.Declaration) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional string full_name = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_full_name()); + } + // optional string type = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_type()); + } + // optional int32 number = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_number()); + } + // optional bool reserved = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 2; + } + // optional bool repeated = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000001fu) { - // optional string full_name = 2; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_full_name()); - } - // optional string type = 3; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_type()); - } - // optional int32 number = 1; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_number()); - } - // optional bool reserved = 5; - if (cached_has_bits & 0x00000008u) { - total_size += 2; - } - // optional bool repeated = 6; - if (cached_has_bits & 0x00000010u) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -void ExtensionRangeOptions_Declaration::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions.Declaration) - ABSL_DCHECK_NE(&from, _this); +void ExtensionRangeOptions_Declaration::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions.Declaration) + ABSL_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -4947,9 +5031,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(), &ExtensionRangeOptions::ByteSizeLong, + &ExtensionRangeOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(ExtensionRangeOptions, _impl_._cached_size_), false, @@ -5044,103 +5127,118 @@ PROTOBUF_NOINLINE void ExtensionRangeOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* ExtensionRangeOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; - for (unsigned i = 0, n = static_cast( - this->_internal_declaration_size()); - i < n; i++) { - const auto& repfield = this->_internal_declaration().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_verification(), target); - } - - // optional .google.protobuf.FeatureSet features = 50; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 50, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.ExtensionRangeOptions) - return target; -} - -::size_t ExtensionRangeOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; - { - total_size += 1UL * this->_internal_declaration_size(); - for (const auto& msg : this->_internal_declaration()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional .google.protobuf.FeatureSet features = 50; - if (cached_has_bits & 0x00000001u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_verification()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ExtensionRangeOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ExtensionRangeOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ExtensionRangeOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ExtensionRangeOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; + for (unsigned i = 0, n = static_cast( + this_._internal_declaration_size()); + i < n; i++) { + const auto& repfield = this_._internal_declaration().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this_._internal_verification(), target); + } + + // optional .google.protobuf.FeatureSet features = 50; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 50, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.ExtensionRangeOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ExtensionRangeOptions::ByteSizeLong(const MessageLite& base) { + const ExtensionRangeOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ExtensionRangeOptions::ByteSizeLong() const { + const ExtensionRangeOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; + { + total_size += 1UL * this_._internal_declaration_size(); + for (const auto& msg : this_._internal_declaration()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .google.protobuf.FeatureSet features = 50; + if (cached_has_bits & 0x00000001u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_verification()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void ExtensionRangeOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -5322,9 +5420,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(), &FieldDescriptorProto::ByteSizeLong, + &FieldDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_._cached_size_), false, @@ -5486,175 +5583,190 @@ PROTOBUF_NOINLINE void FieldDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FieldDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional string extendee = 2; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_extendee(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.extendee"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional int32 number = 3; - if (cached_has_bits & 0x00000040u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<3>( - stream, this->_internal_number(), target); - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (cached_has_bits & 0x00000200u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_label(), target); - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (cached_has_bits & 0x00000400u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 5, this->_internal_type(), target); - } - - // optional string type_name = 6; - if (cached_has_bits & 0x00000004u) { - const std::string& _s = this->_internal_type_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.type_name"); - target = stream->WriteStringMaybeAliased(6, _s, target); - } - - // optional string default_value = 7; - if (cached_has_bits & 0x00000008u) { - const std::string& _s = this->_internal_default_value(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.default_value"); - target = stream->WriteStringMaybeAliased(7, _s, target); - } - - // optional .google.protobuf.FieldOptions options = 8; - if (cached_has_bits & 0x00000020u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, *_impl_.options_, _impl_.options_->GetCachedSize(), target, stream); - } - - // optional int32 oneof_index = 9; - if (cached_has_bits & 0x00000080u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<9>( - stream, this->_internal_oneof_index(), target); - } - - // optional string json_name = 10; - if (cached_has_bits & 0x00000010u) { - const std::string& _s = this->_internal_json_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.json_name"); - target = stream->WriteStringMaybeAliased(10, _s, target); - } - - // optional bool proto3_optional = 17; - if (cached_has_bits & 0x00000100u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 17, this->_internal_proto3_optional(), 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.FieldDescriptorProto) - return target; -} - -::size_t FieldDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldDescriptorProto) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional string extendee = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_extendee()); - } - // optional string type_name = 6; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_type_name()); - } - // optional string default_value = 7; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_default_value()); - } - // optional string json_name = 10; - if (cached_has_bits & 0x00000010u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_json_name()); - } - // optional .google.protobuf.FieldOptions options = 8; - if (cached_has_bits & 0x00000020u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - // optional int32 number = 3; - if (cached_has_bits & 0x00000040u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_number()); - } - // optional int32 oneof_index = 9; - if (cached_has_bits & 0x00000080u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_oneof_index()); - } - } - if (cached_has_bits & 0x00000700u) { - // optional bool proto3_optional = 17; - if (cached_has_bits & 0x00000100u) { - total_size += 3; - } - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (cached_has_bits & 0x00000200u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_label()); - } - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (cached_has_bits & 0x00000400u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FieldDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FieldDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FieldDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FieldDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string extendee = 2; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_extendee(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldDescriptorProto.extendee"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional int32 number = 3; + if (cached_has_bits & 0x00000040u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this_._internal_number(), target); + } + + // optional .google.protobuf.FieldDescriptorProto.Label label = 4; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this_._internal_label(), target); + } + + // optional .google.protobuf.FieldDescriptorProto.Type type = 5; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this_._internal_type(), target); + } + + // optional string type_name = 6; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_type_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldDescriptorProto.type_name"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // optional string default_value = 7; + if (cached_has_bits & 0x00000008u) { + const std::string& _s = this_._internal_default_value(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldDescriptorProto.default_value"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + + // optional .google.protobuf.FieldOptions options = 8; + if (cached_has_bits & 0x00000020u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, *this_._impl_.options_, this_._impl_.options_->GetCachedSize(), target, + stream); + } + + // optional int32 oneof_index = 9; + if (cached_has_bits & 0x00000080u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<9>( + stream, this_._internal_oneof_index(), target); + } + + // optional string json_name = 10; + if (cached_has_bits & 0x00000010u) { + const std::string& _s = this_._internal_json_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldDescriptorProto.json_name"); + target = stream->WriteStringMaybeAliased(10, _s, target); + } + + // optional bool proto3_optional = 17; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 17, this_._internal_proto3_optional(), 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.FieldDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FieldDescriptorProto::ByteSizeLong(const MessageLite& base) { + const FieldDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FieldDescriptorProto::ByteSizeLong() const { + const FieldDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldDescriptorProto) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string extendee = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_extendee()); + } + // optional string type_name = 6; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_type_name()); + } + // optional string default_value = 7; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_default_value()); + } + // optional string json_name = 10; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_json_name()); + } + // optional .google.protobuf.FieldOptions options = 8; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + // optional int32 number = 3; + if (cached_has_bits & 0x00000040u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_number()); + } + // optional int32 oneof_index = 9; + if (cached_has_bits & 0x00000080u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_oneof_index()); + } + } + if (cached_has_bits & 0x00000700u) { + // optional bool proto3_optional = 17; + if (cached_has_bits & 0x00000100u) { + total_size += 3; + } + // optional .google.protobuf.FieldDescriptorProto.Label label = 4; + if (cached_has_bits & 0x00000200u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_label()); + } + // optional .google.protobuf.FieldDescriptorProto.Type type = 5; + if (cached_has_bits & 0x00000400u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_type()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FieldDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -5832,9 +5944,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(), &OneofDescriptorProto::ByteSizeLong, + &OneofDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(OneofDescriptorProto, _impl_._cached_size_), false, @@ -5911,62 +6022,77 @@ PROTOBUF_NOINLINE void OneofDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* OneofDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.OneofDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional .google.protobuf.OneofOptions options = 2; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, *_impl_.options_, _impl_.options_->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.OneofDescriptorProto) - return target; -} - -::size_t OneofDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofDescriptorProto) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional .google.protobuf.OneofOptions options = 2; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* OneofDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const OneofDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* OneofDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const OneofDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.OneofDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional .google.protobuf.OneofOptions options = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.options_, this_._impl_.options_->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.OneofDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t OneofDescriptorProto::ByteSizeLong(const MessageLite& base) { + const OneofDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t OneofDescriptorProto::ByteSizeLong() const { + const OneofDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofDescriptorProto) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional .google.protobuf.OneofOptions options = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void OneofDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -6086,9 +6212,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(), &EnumDescriptorProto_EnumReservedRange::ByteSizeLong, + &EnumDescriptorProto_EnumReservedRange::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, _impl_._cached_size_), false, @@ -6158,62 +6283,76 @@ PROTOBUF_NOINLINE void EnumDescriptorProto_EnumReservedRange::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* EnumDescriptorProto_EnumReservedRange::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional int32 start = 1; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this->_internal_start(), target); - } - - // optional int32 end = 2; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_end(), 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.EnumDescriptorProto.EnumReservedRange) - return target; -} - -::size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional int32 start = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_start()); - } - // optional int32 end = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_end()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* EnumDescriptorProto_EnumReservedRange::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const EnumDescriptorProto_EnumReservedRange& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* EnumDescriptorProto_EnumReservedRange::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const EnumDescriptorProto_EnumReservedRange& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 start = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_start(), target); + } + + // optional int32 end = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_end(), 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.EnumDescriptorProto.EnumReservedRange) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong(const MessageLite& base) { + const EnumDescriptorProto_EnumReservedRange& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const { + const EnumDescriptorProto_EnumReservedRange& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int32 start = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_start()); + } + // optional int32 end = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_end()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void EnumDescriptorProto_EnumReservedRange::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -6346,9 +6485,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(), &EnumDescriptorProto::ByteSizeLong, + &EnumDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(EnumDescriptorProto, _impl_._cached_size_), false, @@ -6452,116 +6590,132 @@ PROTOBUF_NOINLINE void EnumDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* EnumDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.EnumDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_value_size()); - i < n; i++) { - const auto& repfield = this->_internal_value().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // optional .google.protobuf.EnumOptions options = 3; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *_impl_.options_, _impl_.options_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - for (unsigned i = 0, n = static_cast( - this->_internal_reserved_range_size()); - i < n; i++) { - const auto& repfield = this->_internal_reserved_range().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated string reserved_name = 5; - for (int i = 0, n = this->_internal_reserved_name_size(); i < n; ++i) { - const auto& s = this->_internal_reserved_name().Get(i); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.EnumDescriptorProto.reserved_name"); - target = stream->WriteString(5, 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.EnumDescriptorProto) - return target; -} - -::size_t EnumDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - { - total_size += 1UL * this->_internal_value_size(); - for (const auto& msg : this->_internal_value()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - { - total_size += 1UL * this->_internal_reserved_range_size(); - for (const auto& msg : this->_internal_reserved_range()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated string reserved_name = 5; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_reserved_name().size()); - for (int i = 0, n = _internal_reserved_name().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_reserved_name().Get(i)); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional .google.protobuf.EnumOptions options = 3; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* EnumDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const EnumDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* EnumDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const EnumDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.EnumDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .google.protobuf.EnumValueDescriptorProto value = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_value_size()); + i < n; i++) { + const auto& repfield = this_._internal_value().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .google.protobuf.EnumOptions options = 3; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.options_, this_._impl_.options_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; + for (unsigned i = 0, n = static_cast( + this_._internal_reserved_range_size()); + i < n; i++) { + const auto& repfield = this_._internal_reserved_range().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated string reserved_name = 5; + for (int i = 0, n = this_._internal_reserved_name_size(); i < n; ++i) { + const auto& s = this_._internal_reserved_name().Get(i); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.EnumDescriptorProto.reserved_name"); + target = stream->WriteString(5, 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.EnumDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t EnumDescriptorProto::ByteSizeLong(const MessageLite& base) { + const EnumDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t EnumDescriptorProto::ByteSizeLong() const { + const EnumDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto) + ::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.EnumValueDescriptorProto value = 2; + { + total_size += 1UL * this_._internal_value_size(); + for (const auto& msg : this_._internal_value()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; + { + total_size += 1UL * this_._internal_reserved_range_size(); + for (const auto& msg : this_._internal_reserved_range()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated string reserved_name = 5; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_reserved_name().size()); + for (int i = 0, n = this_._internal_reserved_name().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_reserved_name().Get(i)); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional .google.protobuf.EnumOptions options = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void EnumDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -6717,9 +6871,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(), &EnumValueDescriptorProto::ByteSizeLong, + &EnumValueDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, _impl_._cached_size_), false, @@ -6804,74 +6957,89 @@ PROTOBUF_NOINLINE void EnumValueDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* EnumValueDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.EnumValueDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional int32 number = 2; - if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this->_internal_number(), target); - } - - // optional .google.protobuf.EnumValueOptions options = 3; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *_impl_.options_, _impl_.options_->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.EnumValueDescriptorProto) - return target; -} - -::size_t EnumValueDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueDescriptorProto) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional .google.protobuf.EnumValueOptions options = 3; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - // optional int32 number = 2; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_number()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* EnumValueDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const EnumValueDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* EnumValueDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const EnumValueDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.EnumValueDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional int32 number = 2; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_number(), target); + } + + // optional .google.protobuf.EnumValueOptions options = 3; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.options_, this_._impl_.options_->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.EnumValueDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t EnumValueDescriptorProto::ByteSizeLong(const MessageLite& base) { + const EnumValueDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t EnumValueDescriptorProto::ByteSizeLong() const { + const EnumValueDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueDescriptorProto) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional .google.protobuf.EnumValueOptions options = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + // optional int32 number = 2; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_number()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void EnumValueDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -7021,9 +7189,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(), &ServiceDescriptorProto::ByteSizeLong, + &ServiceDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(ServiceDescriptorProto, _impl_._cached_size_), false, @@ -7109,82 +7276,97 @@ PROTOBUF_NOINLINE void ServiceDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* ServiceDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.ServiceDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // repeated .google.protobuf.MethodDescriptorProto method = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_method_size()); - i < n; i++) { - const auto& repfield = this->_internal_method().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // optional .google.protobuf.ServiceOptions options = 3; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *_impl_.options_, _impl_.options_->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.ServiceDescriptorProto) - return target; -} - -::size_t ServiceDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceDescriptorProto) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.MethodDescriptorProto method = 2; - { - total_size += 1UL * this->_internal_method_size(); - for (const auto& msg : this->_internal_method()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional .google.protobuf.ServiceOptions options = 3; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ServiceDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ServiceDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ServiceDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ServiceDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.ServiceDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .google.protobuf.MethodDescriptorProto method = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_method_size()); + i < n; i++) { + const auto& repfield = this_._internal_method().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .google.protobuf.ServiceOptions options = 3; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.options_, this_._impl_.options_->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.ServiceDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ServiceDescriptorProto::ByteSizeLong(const MessageLite& base) { + const ServiceDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ServiceDescriptorProto::ByteSizeLong() const { + const ServiceDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceDescriptorProto) + ::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.MethodDescriptorProto method = 2; + { + total_size += 1UL * this_._internal_method_size(); + for (const auto& msg : this_._internal_method()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional .google.protobuf.ServiceOptions options = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void ServiceDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -7347,9 +7529,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(), &MethodDescriptorProto::ByteSizeLong, + &MethodDescriptorProto::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, _impl_._cached_size_), false, @@ -7463,110 +7644,125 @@ PROTOBUF_NOINLINE void MethodDescriptorProto::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* MethodDescriptorProto::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.MethodDescriptorProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional string input_type = 2; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_input_type(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.MethodDescriptorProto.input_type"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional string output_type = 3; - if (cached_has_bits & 0x00000004u) { - const std::string& _s = this->_internal_output_type(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.MethodDescriptorProto.output_type"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // optional .google.protobuf.MethodOptions options = 4; - if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *_impl_.options_, _impl_.options_->GetCachedSize(), target, stream); - } - - // optional bool client_streaming = 5 [default = false]; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 5, this->_internal_client_streaming(), target); - } - - // optional bool server_streaming = 6 [default = false]; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 6, this->_internal_server_streaming(), 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.MethodDescriptorProto) - return target; -} - -::size_t MethodDescriptorProto::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodDescriptorProto) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // optional string input_type = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_input_type()); - } - // optional string output_type = 3; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_output_type()); - } - // optional .google.protobuf.MethodOptions options = 4; - if (cached_has_bits & 0x00000008u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.options_); - } - // optional bool client_streaming = 5 [default = false]; - if (cached_has_bits & 0x00000010u) { - total_size += 2; - } - // optional bool server_streaming = 6 [default = false]; - if (cached_has_bits & 0x00000020u) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* MethodDescriptorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const MethodDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* MethodDescriptorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const MethodDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.MethodDescriptorProto.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string input_type = 2; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_input_type(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.MethodDescriptorProto.input_type"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional string output_type = 3; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_output_type(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.MethodDescriptorProto.output_type"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional .google.protobuf.MethodOptions options = 4; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.options_, this_._impl_.options_->GetCachedSize(), target, + stream); + } + + // optional bool client_streaming = 5 [default = false]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this_._internal_client_streaming(), target); + } + + // optional bool server_streaming = 6 [default = false]; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 6, this_._internal_server_streaming(), 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.MethodDescriptorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t MethodDescriptorProto::ByteSizeLong(const MessageLite& base) { + const MethodDescriptorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t MethodDescriptorProto::ByteSizeLong() const { + const MethodDescriptorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodDescriptorProto) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string input_type = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_input_type()); + } + // optional string output_type = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_output_type()); + } + // optional .google.protobuf.MethodOptions options = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.options_); + } + // optional bool client_streaming = 5 [default = false]; + if (cached_has_bits & 0x00000010u) { + total_size += 2; + } + // optional bool server_streaming = 6 [default = false]; + if (cached_has_bits & 0x00000020u) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void MethodDescriptorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -7771,9 +7967,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(), &FileOptions::ByteSizeLong, + &FileOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FileOptions, _impl_._cached_size_), false, @@ -8011,321 +8206,336 @@ PROTOBUF_NOINLINE void FileOptions::Clear() { if (cached_has_bits & 0x0000f800u) { ::memset(&_impl_.java_multiple_files_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.java_generic_services_) - - reinterpret_cast(&_impl_.java_multiple_files_)) + sizeof(_impl_.java_generic_services_)); - } - if (cached_has_bits & 0x000f0000u) { - ::memset(&_impl_.py_generic_services_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.deprecated_) - - reinterpret_cast(&_impl_.py_generic_services_)) + sizeof(_impl_.deprecated_)); - _impl_.optimize_for_ = 1; - _impl_.cc_enable_arenas_ = true; - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -::uint8_t* FileOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string java_package = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_java_package(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.java_package"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // optional string java_outer_classname = 8; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_java_outer_classname(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.java_outer_classname"); - target = stream->WriteStringMaybeAliased(8, _s, target); - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (cached_has_bits & 0x00040000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 9, this->_internal_optimize_for(), target); - } - - // optional bool java_multiple_files = 10 [default = false]; - if (cached_has_bits & 0x00000800u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 10, this->_internal_java_multiple_files(), target); - } - - // optional string go_package = 11; - if (cached_has_bits & 0x00000004u) { - const std::string& _s = this->_internal_go_package(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.go_package"); - target = stream->WriteStringMaybeAliased(11, _s, target); - } - - // optional bool cc_generic_services = 16 [default = false]; - if (cached_has_bits & 0x00004000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 16, this->_internal_cc_generic_services(), target); - } - - // optional bool java_generic_services = 17 [default = false]; - if (cached_has_bits & 0x00008000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 17, this->_internal_java_generic_services(), target); - } - - // optional bool py_generic_services = 18 [default = false]; - if (cached_has_bits & 0x00010000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 18, this->_internal_py_generic_services(), target); - } - - // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - if (cached_has_bits & 0x00001000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 20, this->_internal_java_generate_equals_and_hash(), target); - } - - // optional bool deprecated = 23 [default = false]; - if (cached_has_bits & 0x00020000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 23, this->_internal_deprecated(), target); - } - - // optional bool java_string_check_utf8 = 27 [default = false]; - if (cached_has_bits & 0x00002000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 27, this->_internal_java_string_check_utf8(), target); - } - - // optional bool cc_enable_arenas = 31 [default = true]; - if (cached_has_bits & 0x00080000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 31, this->_internal_cc_enable_arenas(), target); - } - - // optional string objc_class_prefix = 36; - if (cached_has_bits & 0x00000008u) { - const std::string& _s = this->_internal_objc_class_prefix(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.objc_class_prefix"); - target = stream->WriteStringMaybeAliased(36, _s, target); - } - - // optional string csharp_namespace = 37; - if (cached_has_bits & 0x00000010u) { - const std::string& _s = this->_internal_csharp_namespace(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.csharp_namespace"); - target = stream->WriteStringMaybeAliased(37, _s, target); - } - - // optional string swift_prefix = 39; - if (cached_has_bits & 0x00000020u) { - const std::string& _s = this->_internal_swift_prefix(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.swift_prefix"); - target = stream->WriteStringMaybeAliased(39, _s, target); - } - - // optional string php_class_prefix = 40; - if (cached_has_bits & 0x00000040u) { - const std::string& _s = this->_internal_php_class_prefix(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.php_class_prefix"); - target = stream->WriteStringMaybeAliased(40, _s, target); - } - - // optional string php_namespace = 41; - if (cached_has_bits & 0x00000080u) { - const std::string& _s = this->_internal_php_namespace(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.php_namespace"); - target = stream->WriteStringMaybeAliased(41, _s, target); - } - - // optional string php_metadata_namespace = 44; - if (cached_has_bits & 0x00000100u) { - const std::string& _s = this->_internal_php_metadata_namespace(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.php_metadata_namespace"); - target = stream->WriteStringMaybeAliased(44, _s, target); - } - - // optional string ruby_package = 45; - if (cached_has_bits & 0x00000200u) { - const std::string& _s = this->_internal_ruby_package(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.ruby_package"); - target = stream->WriteStringMaybeAliased(45, _s, target); - } - - // optional .google.protobuf.FeatureSet features = 50; - if (cached_has_bits & 0x00000400u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 50, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.FileOptions) - return target; -} - -::size_t FileOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - // optional string java_package = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_java_package()); - } - // optional string java_outer_classname = 8; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_java_outer_classname()); - } - // optional string go_package = 11; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_go_package()); - } - // optional string objc_class_prefix = 36; - if (cached_has_bits & 0x00000008u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_objc_class_prefix()); - } - // optional string csharp_namespace = 37; - if (cached_has_bits & 0x00000010u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_csharp_namespace()); - } - // optional string swift_prefix = 39; - if (cached_has_bits & 0x00000020u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_swift_prefix()); - } - // optional string php_class_prefix = 40; - if (cached_has_bits & 0x00000040u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_php_class_prefix()); - } - // optional string php_namespace = 41; - if (cached_has_bits & 0x00000080u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_php_namespace()); - } - } - if (cached_has_bits & 0x0000ff00u) { - // optional string php_metadata_namespace = 44; - if (cached_has_bits & 0x00000100u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_php_metadata_namespace()); - } - // optional string ruby_package = 45; - if (cached_has_bits & 0x00000200u) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_ruby_package()); - } - // optional .google.protobuf.FeatureSet features = 50; - if (cached_has_bits & 0x00000400u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional bool java_multiple_files = 10 [default = false]; - if (cached_has_bits & 0x00000800u) { - total_size += 2; - } - // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - if (cached_has_bits & 0x00001000u) { - total_size += 3; - } - // optional bool java_string_check_utf8 = 27 [default = false]; - if (cached_has_bits & 0x00002000u) { - total_size += 3; - } - // optional bool cc_generic_services = 16 [default = false]; - if (cached_has_bits & 0x00004000u) { - total_size += 3; - } - // optional bool java_generic_services = 17 [default = false]; - if (cached_has_bits & 0x00008000u) { - total_size += 3; - } - } - if (cached_has_bits & 0x000f0000u) { - // optional bool py_generic_services = 18 [default = false]; - if (cached_has_bits & 0x00010000u) { - total_size += 3; - } - // optional bool deprecated = 23 [default = false]; - if (cached_has_bits & 0x00020000u) { - total_size += 3; - } - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (cached_has_bits & 0x00040000u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_optimize_for()); - } - // optional bool cc_enable_arenas = 31 [default = true]; - if (cached_has_bits & 0x00080000u) { - total_size += 3; - } + reinterpret_cast(&_impl_.java_multiple_files_)) + sizeof(_impl_.java_generic_services_)); + } + if (cached_has_bits & 0x000f0000u) { + ::memset(&_impl_.py_generic_services_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.deprecated_) - + reinterpret_cast(&_impl_.py_generic_services_)) + sizeof(_impl_.deprecated_)); + _impl_.optimize_for_ = 1; + _impl_.cc_enable_arenas_ = true; } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FileOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FileOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FileOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FileOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string java_package = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_java_package(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.java_package"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string java_outer_classname = 8; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_java_outer_classname(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.java_outer_classname"); + target = stream->WriteStringMaybeAliased(8, _s, target); + } + + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; + if (cached_has_bits & 0x00040000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 9, this_._internal_optimize_for(), target); + } + + // optional bool java_multiple_files = 10 [default = false]; + if (cached_has_bits & 0x00000800u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 10, this_._internal_java_multiple_files(), target); + } + + // optional string go_package = 11; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_go_package(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.go_package"); + target = stream->WriteStringMaybeAliased(11, _s, target); + } + + // optional bool cc_generic_services = 16 [default = false]; + if (cached_has_bits & 0x00004000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 16, this_._internal_cc_generic_services(), target); + } + + // optional bool java_generic_services = 17 [default = false]; + if (cached_has_bits & 0x00008000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 17, this_._internal_java_generic_services(), target); + } + + // optional bool py_generic_services = 18 [default = false]; + if (cached_has_bits & 0x00010000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 18, this_._internal_py_generic_services(), target); + } + + // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + if (cached_has_bits & 0x00001000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 20, this_._internal_java_generate_equals_and_hash(), target); + } + + // optional bool deprecated = 23 [default = false]; + if (cached_has_bits & 0x00020000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 23, this_._internal_deprecated(), target); + } + + // optional bool java_string_check_utf8 = 27 [default = false]; + if (cached_has_bits & 0x00002000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 27, this_._internal_java_string_check_utf8(), target); + } + + // optional bool cc_enable_arenas = 31 [default = true]; + if (cached_has_bits & 0x00080000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 31, this_._internal_cc_enable_arenas(), target); + } + + // optional string objc_class_prefix = 36; + if (cached_has_bits & 0x00000008u) { + const std::string& _s = this_._internal_objc_class_prefix(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.objc_class_prefix"); + target = stream->WriteStringMaybeAliased(36, _s, target); + } + + // optional string csharp_namespace = 37; + if (cached_has_bits & 0x00000010u) { + const std::string& _s = this_._internal_csharp_namespace(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.csharp_namespace"); + target = stream->WriteStringMaybeAliased(37, _s, target); + } + + // optional string swift_prefix = 39; + if (cached_has_bits & 0x00000020u) { + const std::string& _s = this_._internal_swift_prefix(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.swift_prefix"); + target = stream->WriteStringMaybeAliased(39, _s, target); + } + + // optional string php_class_prefix = 40; + if (cached_has_bits & 0x00000040u) { + const std::string& _s = this_._internal_php_class_prefix(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.php_class_prefix"); + target = stream->WriteStringMaybeAliased(40, _s, target); + } + + // optional string php_namespace = 41; + if (cached_has_bits & 0x00000080u) { + const std::string& _s = this_._internal_php_namespace(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.php_namespace"); + target = stream->WriteStringMaybeAliased(41, _s, target); + } + + // optional string php_metadata_namespace = 44; + if (cached_has_bits & 0x00000100u) { + const std::string& _s = this_._internal_php_metadata_namespace(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.php_metadata_namespace"); + target = stream->WriteStringMaybeAliased(44, _s, target); + } + + // optional string ruby_package = 45; + if (cached_has_bits & 0x00000200u) { + const std::string& _s = this_._internal_ruby_package(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FileOptions.ruby_package"); + target = stream->WriteStringMaybeAliased(45, _s, target); + } + + // optional .google.protobuf.FeatureSet features = 50; + if (cached_has_bits & 0x00000400u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 50, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.FileOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FileOptions::ByteSizeLong(const MessageLite& base) { + const FileOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FileOptions::ByteSizeLong() const { + const FileOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string java_package = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_java_package()); + } + // optional string java_outer_classname = 8; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_java_outer_classname()); + } + // optional string go_package = 11; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_go_package()); + } + // optional string objc_class_prefix = 36; + if (cached_has_bits & 0x00000008u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_objc_class_prefix()); + } + // optional string csharp_namespace = 37; + if (cached_has_bits & 0x00000010u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_csharp_namespace()); + } + // optional string swift_prefix = 39; + if (cached_has_bits & 0x00000020u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_swift_prefix()); + } + // optional string php_class_prefix = 40; + if (cached_has_bits & 0x00000040u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_php_class_prefix()); + } + // optional string php_namespace = 41; + if (cached_has_bits & 0x00000080u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_php_namespace()); + } + } + if (cached_has_bits & 0x0000ff00u) { + // optional string php_metadata_namespace = 44; + if (cached_has_bits & 0x00000100u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_php_metadata_namespace()); + } + // optional string ruby_package = 45; + if (cached_has_bits & 0x00000200u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_ruby_package()); + } + // optional .google.protobuf.FeatureSet features = 50; + if (cached_has_bits & 0x00000400u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional bool java_multiple_files = 10 [default = false]; + if (cached_has_bits & 0x00000800u) { + total_size += 2; + } + // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + if (cached_has_bits & 0x00001000u) { + total_size += 3; + } + // optional bool java_string_check_utf8 = 27 [default = false]; + if (cached_has_bits & 0x00002000u) { + total_size += 3; + } + // optional bool cc_generic_services = 16 [default = false]; + if (cached_has_bits & 0x00004000u) { + total_size += 3; + } + // optional bool java_generic_services = 17 [default = false]; + if (cached_has_bits & 0x00008000u) { + total_size += 3; + } + } + if (cached_has_bits & 0x000f0000u) { + // optional bool py_generic_services = 18 [default = false]; + if (cached_has_bits & 0x00010000u) { + total_size += 3; + } + // optional bool deprecated = 23 [default = false]; + if (cached_has_bits & 0x00020000u) { + total_size += 3; + } + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; + if (cached_has_bits & 0x00040000u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_optimize_for()); + } + // optional bool cc_enable_arenas = 31 [default = true]; + if (cached_has_bits & 0x00080000u) { + total_size += 3; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } + void FileOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); @@ -8561,9 +8771,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(), &MessageOptions::ByteSizeLong, + &MessageOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(MessageOptions, _impl_._cached_size_), false, @@ -8669,128 +8878,143 @@ PROTOBUF_NOINLINE void MessageOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* MessageOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional bool message_set_wire_format = 1 [default = false]; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 1, this->_internal_message_set_wire_format(), target); - } - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 2, this->_internal_no_standard_descriptor_accessor(), target); - } - - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this->_internal_deprecated(), target); - } - - // optional bool map_entry = 7; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 7, this->_internal_map_entry(), target); - } - - // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 11, this->_internal_deprecated_legacy_json_field_conflicts(), target); - } - - // optional .google.protobuf.FeatureSet features = 12; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 12, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.MessageOptions) - return target; -} - -::size_t MessageOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MessageOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - // optional .google.protobuf.FeatureSet features = 12; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional bool message_set_wire_format = 1 [default = false]; - if (cached_has_bits & 0x00000002u) { - total_size += 2; - } - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - if (cached_has_bits & 0x00000004u) { - total_size += 2; - } - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000008u) { - total_size += 2; - } - // optional bool map_entry = 7; - if (cached_has_bits & 0x00000010u) { - total_size += 2; - } - // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; - if (cached_has_bits & 0x00000020u) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* MessageOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const MessageOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* MessageOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const MessageOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool message_set_wire_format = 1 [default = false]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this_._internal_message_set_wire_format(), target); + } + + // optional bool no_standard_descriptor_accessor = 2 [default = false]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_no_standard_descriptor_accessor(), target); + } + + // optional bool deprecated = 3 [default = false]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_deprecated(), target); + } + + // optional bool map_entry = 7; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 7, this_._internal_map_entry(), target); + } + + // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 11, this_._internal_deprecated_legacy_json_field_conflicts(), target); + } + + // optional .google.protobuf.FeatureSet features = 12; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 12, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.MessageOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t MessageOptions::ByteSizeLong(const MessageLite& base) { + const MessageOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t MessageOptions::ByteSizeLong() const { + const MessageOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MessageOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional .google.protobuf.FeatureSet features = 12; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional bool message_set_wire_format = 1 [default = false]; + if (cached_has_bits & 0x00000002u) { + total_size += 2; + } + // optional bool no_standard_descriptor_accessor = 2 [default = false]; + if (cached_has_bits & 0x00000004u) { + total_size += 2; + } + // optional bool deprecated = 3 [default = false]; + if (cached_has_bits & 0x00000008u) { + total_size += 2; + } + // optional bool map_entry = 7; + if (cached_has_bits & 0x00000010u) { + total_size += 2; + } + // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + if (cached_has_bits & 0x00000020u) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void MessageOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -8951,9 +9175,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(), &FieldOptions_EditionDefault::ByteSizeLong, + &FieldOptions_EditionDefault::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FieldOptions_EditionDefault, _impl_._cached_size_), false, @@ -9025,63 +9248,77 @@ PROTOBUF_NOINLINE void FieldOptions_EditionDefault::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FieldOptions_EditionDefault::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions.EditionDefault) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional string value = 2; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_value(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldOptions.EditionDefault.value"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional .google.protobuf.Edition edition = 3; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_edition(), 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.FieldOptions.EditionDefault) - return target; -} - -::size_t FieldOptions_EditionDefault::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions.EditionDefault) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string value = 2; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_value()); - } - // optional .google.protobuf.Edition edition = 3; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_edition()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FieldOptions_EditionDefault::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FieldOptions_EditionDefault& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FieldOptions_EditionDefault::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FieldOptions_EditionDefault& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions.EditionDefault) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string value = 2; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_value(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldOptions.EditionDefault.value"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional .google.protobuf.Edition edition = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this_._internal_edition(), 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.FieldOptions.EditionDefault) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FieldOptions_EditionDefault::ByteSizeLong(const MessageLite& base) { + const FieldOptions_EditionDefault& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FieldOptions_EditionDefault::ByteSizeLong() const { + const FieldOptions_EditionDefault& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions.EditionDefault) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string value = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_value()); + } + // optional .google.protobuf.Edition edition = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_edition()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FieldOptions_EditionDefault::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -9213,9 +9450,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(), &FieldOptions_FeatureSupport::ByteSizeLong, + &FieldOptions_FeatureSupport::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FieldOptions_FeatureSupport, _impl_._cached_size_), false, @@ -9305,87 +9541,101 @@ PROTOBUF_NOINLINE void FieldOptions_FeatureSupport::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FieldOptions_FeatureSupport::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions.FeatureSupport) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.Edition edition_introduced = 1; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_edition_introduced(), target); - } - - // optional .google.protobuf.Edition edition_deprecated = 2; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_edition_deprecated(), target); - } - - // optional string deprecation_warning = 3; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_deprecation_warning(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // optional .google.protobuf.Edition edition_removed = 4; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_edition_removed(), 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.FieldOptions.FeatureSupport) - return target; -} - -::size_t FieldOptions_FeatureSupport::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions.FeatureSupport) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional string deprecation_warning = 3; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_deprecation_warning()); - } - // optional .google.protobuf.Edition edition_introduced = 1; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_edition_introduced()); - } - // optional .google.protobuf.Edition edition_deprecated = 2; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_edition_deprecated()); - } - // optional .google.protobuf.Edition edition_removed = 4; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_edition_removed()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FieldOptions_FeatureSupport::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FieldOptions_FeatureSupport& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FieldOptions_FeatureSupport::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FieldOptions_FeatureSupport& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions.FeatureSupport) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.Edition edition_introduced = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this_._internal_edition_introduced(), target); + } + + // optional .google.protobuf.Edition edition_deprecated = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this_._internal_edition_deprecated(), target); + } + + // optional string deprecation_warning = 3; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_deprecation_warning(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional .google.protobuf.Edition edition_removed = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this_._internal_edition_removed(), 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.FieldOptions.FeatureSupport) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FieldOptions_FeatureSupport::ByteSizeLong(const MessageLite& base) { + const FieldOptions_FeatureSupport& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FieldOptions_FeatureSupport::ByteSizeLong() const { + const FieldOptions_FeatureSupport& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions.FeatureSupport) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string deprecation_warning = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_deprecation_warning()); + } + // optional .google.protobuf.Edition edition_introduced = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_edition_introduced()); + } + // optional .google.protobuf.Edition edition_deprecated = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_edition_deprecated()); + } + // optional .google.protobuf.Edition edition_removed = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_edition_removed()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FieldOptions_FeatureSupport::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -9543,9 +9793,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(), &FieldOptions::ByteSizeLong, + &FieldOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_._cached_size_), false, @@ -9709,226 +9958,242 @@ PROTOBUF_NOINLINE void FieldOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FieldOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_ctype(), target); - } - - // optional bool packed = 2; - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 2, this->_internal_packed(), target); - } - - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000080u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this->_internal_deprecated(), target); - } - - // optional bool lazy = 5 [default = false]; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 5, this->_internal_lazy(), target); - } - - // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 6, this->_internal_jstype(), target); - } - - // optional bool weak = 10 [default = false]; - if (cached_has_bits & 0x00000100u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 10, this->_internal_weak(), target); - } - - // optional bool unverified_lazy = 15 [default = false]; - if (cached_has_bits & 0x00000040u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 15, this->_internal_unverified_lazy(), target); - } - - // optional bool debug_redact = 16 [default = false]; - if (cached_has_bits & 0x00000200u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 16, this->_internal_debug_redact(), target); - } - - // optional .google.protobuf.FieldOptions.OptionRetention retention = 17; - if (cached_has_bits & 0x00000400u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 17, this->_internal_retention(), target); - } - - // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; - for (int i = 0, n = this->_internal_targets_size(); i < n; ++i) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 19, static_cast<::google::protobuf::FieldOptions_OptionTargetType>(this->_internal_targets().Get(i)), - target); - } - - // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; - for (unsigned i = 0, n = static_cast( - this->_internal_edition_defaults_size()); - i < n; i++) { - const auto& repfield = this->_internal_edition_defaults().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 20, repfield, repfield.GetCachedSize(), - target, stream); - } - - // optional .google.protobuf.FeatureSet features = 21; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 21, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 22, *_impl_.feature_support_, _impl_.feature_support_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.FieldOptions) - return target; -} - -::size_t FieldOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.FieldOptions.OptionTargetType targets = 19; - { - std::size_t data_size = 0; - auto count = static_cast(this->_internal_targets_size()); - - for (std::size_t i = 0; i < count; ++i) { - data_size += ::_pbi::WireFormatLite::EnumSize( - this->_internal_targets().Get(static_cast(i))); - } - total_size += data_size; - total_size += std::size_t{2} * count; - } - // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; - { - total_size += 2UL * this->_internal_edition_defaults_size(); - for (const auto& msg : this->_internal_edition_defaults()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - // optional .google.protobuf.FeatureSet features = 21; - if (cached_has_bits & 0x00000001u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; - if (cached_has_bits & 0x00000002u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.feature_support_); - } - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_ctype()); - } - // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_jstype()); - } - // optional bool packed = 2; - if (cached_has_bits & 0x00000010u) { - total_size += 2; - } - // optional bool lazy = 5 [default = false]; - if (cached_has_bits & 0x00000020u) { - total_size += 2; - } - // optional bool unverified_lazy = 15 [default = false]; - if (cached_has_bits & 0x00000040u) { - total_size += 2; - } - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000080u) { - total_size += 2; - } - } - if (cached_has_bits & 0x00000700u) { - // optional bool weak = 10 [default = false]; - if (cached_has_bits & 0x00000100u) { - total_size += 2; - } - // optional bool debug_redact = 16 [default = false]; - if (cached_has_bits & 0x00000200u) { - total_size += 3; - } - // optional .google.protobuf.FieldOptions.OptionRetention retention = 17; - if (cached_has_bits & 0x00000400u) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_retention()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FieldOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FieldOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FieldOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FieldOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this_._internal_ctype(), target); + } + + // optional bool packed = 2; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_packed(), target); + } + + // optional bool deprecated = 3 [default = false]; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_deprecated(), target); + } + + // optional bool lazy = 5 [default = false]; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this_._internal_lazy(), target); + } + + // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this_._internal_jstype(), target); + } + + // optional bool weak = 10 [default = false]; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 10, this_._internal_weak(), target); + } + + // optional bool unverified_lazy = 15 [default = false]; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 15, this_._internal_unverified_lazy(), target); + } + + // optional bool debug_redact = 16 [default = false]; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 16, this_._internal_debug_redact(), target); + } + + // optional .google.protobuf.FieldOptions.OptionRetention retention = 17; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 17, this_._internal_retention(), target); + } + + // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; + for (int i = 0, n = this_._internal_targets_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 19, static_cast<::google::protobuf::FieldOptions_OptionTargetType>(this_._internal_targets().Get(i)), + target); + } + + // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + for (unsigned i = 0, n = static_cast( + this_._internal_edition_defaults_size()); + i < n; i++) { + const auto& repfield = this_._internal_edition_defaults().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 20, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .google.protobuf.FeatureSet features = 21; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 21, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 22, *this_._impl_.feature_support_, this_._impl_.feature_support_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.FieldOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FieldOptions::ByteSizeLong(const MessageLite& base) { + const FieldOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FieldOptions::ByteSizeLong() const { + const FieldOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.FieldOptions.OptionTargetType targets = 19; + { + std::size_t data_size = 0; + auto count = static_cast(this_._internal_targets_size()); + + for (std::size_t i = 0; i < count; ++i) { + data_size += ::_pbi::WireFormatLite::EnumSize( + this_._internal_targets().Get(static_cast(i))); + } + total_size += data_size; + total_size += std::size_t{2} * count; + } + // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + { + total_size += 2UL * this_._internal_edition_defaults_size(); + for (const auto& msg : this_._internal_edition_defaults()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional .google.protobuf.FeatureSet features = 21; + if (cached_has_bits & 0x00000001u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; + if (cached_has_bits & 0x00000002u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.feature_support_); + } + // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_ctype()); + } + // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_jstype()); + } + // optional bool packed = 2; + if (cached_has_bits & 0x00000010u) { + total_size += 2; + } + // optional bool lazy = 5 [default = false]; + if (cached_has_bits & 0x00000020u) { + total_size += 2; + } + // optional bool unverified_lazy = 15 [default = false]; + if (cached_has_bits & 0x00000040u) { + total_size += 2; + } + // optional bool deprecated = 3 [default = false]; + if (cached_has_bits & 0x00000080u) { + total_size += 2; + } + } + if (cached_has_bits & 0x00000700u) { + // optional bool weak = 10 [default = false]; + if (cached_has_bits & 0x00000100u) { + total_size += 2; + } + // optional bool debug_redact = 16 [default = false]; + if (cached_has_bits & 0x00000200u) { + total_size += 3; + } + // optional .google.protobuf.FieldOptions.OptionRetention retention = 17; + if (cached_has_bits & 0x00000400u) { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_retention()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FieldOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -10123,9 +10388,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(), &OneofOptions::ByteSizeLong, + &OneofOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(OneofOptions, _impl_._cached_size_), false, @@ -10193,82 +10457,98 @@ PROTOBUF_NOINLINE void OneofOptions::Clear() { _impl_._extensions_.Clear(); _impl_.uninterpreted_option_.Clear(); cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.features_ != nullptr); - _impl_.features_->Clear(); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -::uint8_t* OneofOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.FeatureSet features = 1; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.OneofOptions) - return target; -} - -::size_t OneofOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // optional .google.protobuf.FeatureSet features = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.features_ != nullptr); + _impl_.features_->Clear(); } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* OneofOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const OneofOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* OneofOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const OneofOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.FeatureSet features = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.OneofOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t OneofOptions::ByteSizeLong(const MessageLite& base) { + const OneofOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t OneofOptions::ByteSizeLong() const { + const OneofOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // optional .google.protobuf.FeatureSet features = 1; + cached_has_bits = + this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } + void OneofOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); @@ -10424,9 +10704,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(), &EnumOptions::ByteSizeLong, + &EnumOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(EnumOptions, _impl_._cached_size_), false, @@ -10522,106 +10801,121 @@ PROTOBUF_NOINLINE void EnumOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* EnumOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional bool allow_alias = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 2, this->_internal_allow_alias(), target); - } - - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this->_internal_deprecated(), target); - } - - // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 6, this->_internal_deprecated_legacy_json_field_conflicts(), target); - } - - // optional .google.protobuf.FeatureSet features = 7; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 7, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.EnumOptions) - return target; -} - -::size_t EnumOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional .google.protobuf.FeatureSet features = 7; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional bool allow_alias = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 2; - } - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000004u) { - total_size += 2; - } - // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; - if (cached_has_bits & 0x00000008u) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* EnumOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const EnumOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* EnumOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const EnumOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool allow_alias = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_allow_alias(), target); + } + + // optional bool deprecated = 3 [default = false]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_deprecated(), target); + } + + // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 6, this_._internal_deprecated_legacy_json_field_conflicts(), target); + } + + // optional .google.protobuf.FeatureSet features = 7; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.EnumOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t EnumOptions::ByteSizeLong(const MessageLite& base) { + const EnumOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t EnumOptions::ByteSizeLong() const { + const EnumOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .google.protobuf.FeatureSet features = 7; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional bool allow_alias = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 2; + } + // optional bool deprecated = 3 [default = false]; + if (cached_has_bits & 0x00000004u) { + total_size += 2; + } + // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + if (cached_has_bits & 0x00000008u) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void EnumOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -10798,9 +11092,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(), &EnumValueOptions::ByteSizeLong, + &EnumValueOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_._cached_size_), false, @@ -10905,106 +11198,122 @@ PROTOBUF_NOINLINE void EnumValueOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* EnumValueOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional bool deprecated = 1 [default = false]; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 1, this->_internal_deprecated(), target); - } - - // optional .google.protobuf.FeatureSet features = 2; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // optional bool debug_redact = 3 [default = false]; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this->_internal_debug_redact(), target); - } - - // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *_impl_.feature_support_, _impl_.feature_support_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.EnumValueOptions) - return target; -} - -::size_t EnumValueOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional .google.protobuf.FeatureSet features = 2; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.feature_support_); - } - // optional bool deprecated = 1 [default = false]; - if (cached_has_bits & 0x00000004u) { - total_size += 2; - } - // optional bool debug_redact = 3 [default = false]; - if (cached_has_bits & 0x00000008u) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* EnumValueOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const EnumValueOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* EnumValueOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const EnumValueOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool deprecated = 1 [default = false]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this_._internal_deprecated(), target); + } + + // optional .google.protobuf.FeatureSet features = 2; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // optional bool debug_redact = 3 [default = false]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this_._internal_debug_redact(), target); + } + + // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.feature_support_, this_._impl_.feature_support_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.EnumValueOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t EnumValueOptions::ByteSizeLong(const MessageLite& base) { + const EnumValueOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t EnumValueOptions::ByteSizeLong() const { + const EnumValueOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .google.protobuf.FeatureSet features = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.feature_support_); + } + // optional bool deprecated = 1 [default = false]; + if (cached_has_bits & 0x00000004u) { + total_size += 2; + } + // optional bool debug_redact = 3 [default = false]; + if (cached_has_bits & 0x00000008u) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void EnumValueOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -11177,9 +11486,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(), &ServiceOptions::ByteSizeLong, + &ServiceOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(ServiceOptions, _impl_._cached_size_), false, @@ -11262,84 +11570,99 @@ PROTOBUF_NOINLINE void ServiceOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* ServiceOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional bool deprecated = 33 [default = false]; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 33, this->_internal_deprecated(), target); - } - - // optional .google.protobuf.FeatureSet features = 34; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 34, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.ServiceOptions) - return target; -} - -::size_t ServiceOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional .google.protobuf.FeatureSet features = 34; - if (cached_has_bits & 0x00000001u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional bool deprecated = 33 [default = false]; - if (cached_has_bits & 0x00000002u) { - total_size += 3; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ServiceOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ServiceOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ServiceOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ServiceOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool deprecated = 33 [default = false]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 33, this_._internal_deprecated(), target); + } + + // optional .google.protobuf.FeatureSet features = 34; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 34, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.ServiceOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ServiceOptions::ByteSizeLong(const MessageLite& base) { + const ServiceOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ServiceOptions::ByteSizeLong() const { + const ServiceOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .google.protobuf.FeatureSet features = 34; + if (cached_has_bits & 0x00000001u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional bool deprecated = 33 [default = false]; + if (cached_has_bits & 0x00000002u) { + total_size += 3; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void ServiceOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -11506,9 +11829,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(), &MethodOptions::ByteSizeLong, + &MethodOptions::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(MethodOptions, _impl_._cached_size_), false, @@ -11605,96 +11927,111 @@ PROTOBUF_NOINLINE void MethodOptions::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* MethodOptions::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional bool deprecated = 33 [default = false]; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 33, this->_internal_deprecated(), target); - } - - // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 34, this->_internal_idempotency_level(), target); - } - - // optional .google.protobuf.FeatureSet features = 35; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 35, *_impl_.features_, _impl_.features_->GetCachedSize(), target, stream); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned i = 0, n = static_cast( - this->_internal_uninterpreted_option_size()); - i < n; i++) { - const auto& repfield = this->_internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); - } - - // Extension range [1000, 536870912) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 536870912, 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.MethodOptions) - return target; -} - -::size_t MethodOptions::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodOptions) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::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 .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - total_size += 2UL * this->_internal_uninterpreted_option_size(); - for (const auto& msg : this->_internal_uninterpreted_option()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - // optional .google.protobuf.FeatureSet features = 35; - if (cached_has_bits & 0x00000001u) { - total_size += - 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.features_); - } - // optional bool deprecated = 33 [default = false]; - if (cached_has_bits & 0x00000002u) { - total_size += 3; - } - // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; - if (cached_has_bits & 0x00000004u) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_idempotency_level()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* MethodOptions::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const MethodOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* MethodOptions::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const MethodOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional bool deprecated = 33 [default = false]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 33, this_._internal_deprecated(), target); + } + + // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 34, this_._internal_idempotency_level(), target); + } + + // optional .google.protobuf.FeatureSet features = 35; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 35, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target, + stream); + } + + // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; + for (unsigned i = 0, n = static_cast( + this_._internal_uninterpreted_option_size()); + i < n; i++) { + const auto& repfield = this_._internal_uninterpreted_option().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), + target, stream); + } + + // Extension range [1000, 536870912) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 536870912, 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.MethodOptions) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t MethodOptions::ByteSizeLong(const MessageLite& base) { + const MethodOptions& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t MethodOptions::ByteSizeLong() const { + const MethodOptions& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodOptions) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::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.UninterpretedOption uninterpreted_option = 999; + { + total_size += 2UL * this_._internal_uninterpreted_option_size(); + for (const auto& msg : this_._internal_uninterpreted_option()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .google.protobuf.FeatureSet features = 35; + if (cached_has_bits & 0x00000001u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_); + } + // optional bool deprecated = 33 [default = false]; + if (cached_has_bits & 0x00000002u) { + total_size += 3; + } + // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; + if (cached_has_bits & 0x00000004u) { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_idempotency_level()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void MethodOptions::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -11849,9 +12186,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(), &UninterpretedOption_NamePart::ByteSizeLong, + &UninterpretedOption_NamePart::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(UninterpretedOption_NamePart, _impl_._cached_size_), false, @@ -11923,62 +12259,76 @@ PROTOBUF_NOINLINE void UninterpretedOption_NamePart::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* UninterpretedOption_NamePart::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // required string name_part = 1; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_name_part(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.UninterpretedOption.NamePart.name_part"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // required bool is_extension = 2; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 2, this->_internal_is_extension(), 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.UninterpretedOption.NamePart) - return target; -} - -::size_t UninterpretedOption_NamePart::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption.NamePart) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // required string name_part = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_name_part()); - } - // required bool is_extension = 2; - if (cached_has_bits & 0x00000002u) { - total_size += 2; - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* UninterpretedOption_NamePart::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const UninterpretedOption_NamePart& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* UninterpretedOption_NamePart::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const UninterpretedOption_NamePart& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // required string name_part = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name_part(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.UninterpretedOption.NamePart.name_part"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // required bool is_extension = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this_._internal_is_extension(), 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.UninterpretedOption.NamePart) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t UninterpretedOption_NamePart::ByteSizeLong(const MessageLite& base) { + const UninterpretedOption_NamePart& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t UninterpretedOption_NamePart::ByteSizeLong() const { + const UninterpretedOption_NamePart& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption.NamePart) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // required string name_part = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name_part()); + } + // required bool is_extension = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 2; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void UninterpretedOption_NamePart::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -12126,9 +12476,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(), &UninterpretedOption::ByteSizeLong, + &UninterpretedOption::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(UninterpretedOption, _impl_._cached_size_), false, @@ -12232,144 +12581,158 @@ PROTOBUF_NOINLINE void UninterpretedOption::Clear() { if (cached_has_bits & 0x00000002u) { _impl_.string_value_.ClearNonDefaultToEmpty(); } - if (cached_has_bits & 0x00000004u) { - _impl_.aggregate_value_.ClearNonDefaultToEmpty(); - } - } - if (cached_has_bits & 0x00000038u) { - ::memset(&_impl_.positive_int_value_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.double_value_) - - reinterpret_cast(&_impl_.positive_int_value_)) + sizeof(_impl_.double_value_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -::uint8_t* UninterpretedOption::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - for (unsigned i = 0, n = static_cast( - this->_internal_name_size()); - i < n; i++) { - const auto& repfield = this->_internal_name().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional string identifier_value = 3; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_identifier_value(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.UninterpretedOption.identifier_value"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // optional uint64 positive_int_value = 4; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray( - 4, this->_internal_positive_int_value(), target); - } - - // optional int64 negative_int_value = 5; - if (cached_has_bits & 0x00000010u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<5>( - stream, this->_internal_negative_int_value(), target); - } - - // optional double double_value = 6; - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray( - 6, this->_internal_double_value(), target); - } - - // optional bytes string_value = 7; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_string_value(); - target = stream->WriteBytesMaybeAliased(7, _s, target); - } - - // optional string aggregate_value = 8; - if (cached_has_bits & 0x00000004u) { - const std::string& _s = this->_internal_aggregate_value(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.UninterpretedOption.aggregate_value"); - target = stream->WriteStringMaybeAliased(8, _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.UninterpretedOption) - return target; -} - -::size_t UninterpretedOption::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - { - total_size += 1UL * this->_internal_name_size(); - for (const auto& msg : this->_internal_name()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - // optional string identifier_value = 3; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_identifier_value()); - } - // optional bytes string_value = 7; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( - this->_internal_string_value()); - } - // optional string aggregate_value = 8; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_aggregate_value()); - } - // optional uint64 positive_int_value = 4; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( - this->_internal_positive_int_value()); - } - // optional int64 negative_int_value = 5; - if (cached_has_bits & 0x00000010u) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( - this->_internal_negative_int_value()); - } - // optional double double_value = 6; - if (cached_has_bits & 0x00000020u) { - total_size += 9; + if (cached_has_bits & 0x00000004u) { + _impl_.aggregate_value_.ClearNonDefaultToEmpty(); } } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); + if (cached_has_bits & 0x00000038u) { + ::memset(&_impl_.positive_int_value_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.double_value_) - + reinterpret_cast(&_impl_.positive_int_value_)) + sizeof(_impl_.double_value_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* UninterpretedOption::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const UninterpretedOption& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* UninterpretedOption::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const UninterpretedOption& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_name_size()); + i < n; i++) { + const auto& repfield = this_._internal_name().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string identifier_value = 3; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_identifier_value(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.UninterpretedOption.identifier_value"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional uint64 positive_int_value = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 4, this_._internal_positive_int_value(), target); + } + + // optional int64 negative_int_value = 5; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<5>( + stream, this_._internal_negative_int_value(), target); + } + + // optional double double_value = 6; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 6, this_._internal_double_value(), target); + } + + // optional bytes string_value = 7; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_string_value(); + target = stream->WriteBytesMaybeAliased(7, _s, target); + } + + // optional string aggregate_value = 8; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_aggregate_value(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.UninterpretedOption.aggregate_value"); + target = stream->WriteStringMaybeAliased(8, _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.UninterpretedOption) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t UninterpretedOption::ByteSizeLong(const MessageLite& base) { + const UninterpretedOption& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t UninterpretedOption::ByteSizeLong() const { + const UninterpretedOption& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption) + ::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.UninterpretedOption.NamePart name = 2; + { + total_size += 1UL * this_._internal_name_size(); + for (const auto& msg : this_._internal_name()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string identifier_value = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_identifier_value()); + } + // optional bytes string_value = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_string_value()); + } + // optional string aggregate_value = 8; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_aggregate_value()); + } + // optional uint64 positive_int_value = 4; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this_._internal_positive_int_value()); + } + // optional int64 negative_int_value = 5; + if (cached_has_bits & 0x00000010u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_negative_int_value()); + } + // optional double double_value = 6; + if (cached_has_bits & 0x00000020u) { + total_size += 9; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } + void UninterpretedOption::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); @@ -12529,9 +12892,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(), &FeatureSet::ByteSizeLong, + &FeatureSet::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FeatureSet, _impl_._cached_size_), false, @@ -12633,114 +12995,128 @@ PROTOBUF_NOINLINE void FeatureSet::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FeatureSet::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSet) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_field_presence(), target); - } - - // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_enum_type(), target); - } - - // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_repeated_field_encoding(), target); - } - - // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_utf8_validation(), target); - } - - // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000010u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 5, this->_internal_message_encoding(), target); - } - - // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000020u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 6, this->_internal_json_format(), target); - } - - // Extension range [1000, 10001) - target = _impl_._extensions_._InternalSerialize( - internal_default_instance(), 1000, 10001, 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.FeatureSet) - return target; -} - -::size_t FeatureSet::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSet) - ::size_t total_size = 0; - total_size += _impl_._extensions_.ByteSize(); - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { - // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_field_presence()); - } - // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_enum_type()); - } - // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_repeated_field_encoding()); - } - // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000008u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_utf8_validation()); - } - // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000010u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_message_encoding()); - } - // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - if (cached_has_bits & 0x00000020u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_json_format()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FeatureSet::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FeatureSet& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FeatureSet::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FeatureSet& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSet) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this_._internal_field_presence(), target); + } + + // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this_._internal_enum_type(), target); + } + + // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this_._internal_repeated_field_encoding(), target); + } + + // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this_._internal_utf8_validation(), target); + } + + // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this_._internal_message_encoding(), target); + } + + // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this_._internal_json_format(), target); + } + + // Extension range [1000, 10001) + target = this_._impl_._extensions_._InternalSerialize( + internal_default_instance(), 1000, 10001, 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.FeatureSet) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FeatureSet::ByteSizeLong(const MessageLite& base) { + const FeatureSet& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FeatureSet::ByteSizeLong() const { + const FeatureSet& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSet) + ::size_t total_size = 0; + total_size += this_._impl_._extensions_.ByteSize(); + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_field_presence()); + } + // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_enum_type()); + } + // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_repeated_field_encoding()); + } + // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_utf8_validation()); + } + // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_message_encoding()); + } + // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_json_format()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FeatureSet::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -12897,9 +13273,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(), &FeatureSetDefaults_FeatureSetEditionDefault::ByteSizeLong, + &FeatureSetDefaults_FeatureSetEditionDefault::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FeatureSetDefaults_FeatureSetEditionDefault, _impl_._cached_size_), false, @@ -12984,72 +13359,88 @@ PROTOBUF_NOINLINE void FeatureSetDefaults_FeatureSetEditionDefault::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FeatureSetDefaults_FeatureSetEditionDefault::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.Edition edition = 3; - if (cached_has_bits & 0x00000004u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_edition(), target); - } - - // optional .google.protobuf.FeatureSet overridable_features = 4; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *_impl_.overridable_features_, _impl_.overridable_features_->GetCachedSize(), target, stream); - } - - // optional .google.protobuf.FeatureSet fixed_features = 5; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *_impl_.fixed_features_, _impl_.fixed_features_->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.FeatureSetDefaults.FeatureSetEditionDefault) - return target; -} - -::size_t FeatureSetDefaults_FeatureSetEditionDefault::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - ::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( - reinterpret_cast(this)); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - // optional .google.protobuf.FeatureSet overridable_features = 4; - if (cached_has_bits & 0x00000001u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.overridable_features_); - } - // optional .google.protobuf.FeatureSet fixed_features = 5; - if (cached_has_bits & 0x00000002u) { - total_size += - 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.fixed_features_); - } - // optional .google.protobuf.Edition edition = 3; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_edition()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FeatureSetDefaults_FeatureSetEditionDefault::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FeatureSetDefaults_FeatureSetEditionDefault& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FeatureSetDefaults_FeatureSetEditionDefault::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FeatureSetDefaults_FeatureSetEditionDefault& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.Edition edition = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this_._internal_edition(), target); + } + + // optional .google.protobuf.FeatureSet overridable_features = 4; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.overridable_features_, this_._impl_.overridable_features_->GetCachedSize(), target, + stream); + } + + // optional .google.protobuf.FeatureSet fixed_features = 5; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.fixed_features_, this_._impl_.fixed_features_->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.FeatureSetDefaults.FeatureSetEditionDefault) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FeatureSetDefaults_FeatureSetEditionDefault::ByteSizeLong(const MessageLite& base) { + const FeatureSetDefaults_FeatureSetEditionDefault& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FeatureSetDefaults_FeatureSetEditionDefault::ByteSizeLong() const { + const FeatureSetDefaults_FeatureSetEditionDefault& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + ::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_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .google.protobuf.FeatureSet overridable_features = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.overridable_features_); + } + // optional .google.protobuf.FeatureSet fixed_features = 5; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.fixed_features_); + } + // optional .google.protobuf.Edition edition = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_edition()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FeatureSetDefaults_FeatureSetEditionDefault::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -13209,9 +13600,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(), &FeatureSetDefaults::ByteSizeLong, + &FeatureSetDefaults::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(FeatureSetDefaults, _impl_._cached_size_), false, @@ -13287,82 +13677,96 @@ PROTOBUF_NOINLINE void FeatureSetDefaults::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* FeatureSetDefaults::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSetDefaults) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - for (unsigned i = 0, n = static_cast( - this->_internal_defaults_size()); - i < n; i++) { - const auto& repfield = this->_internal_defaults().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional .google.protobuf.Edition minimum_edition = 4; - if (cached_has_bits & 0x00000001u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_minimum_edition(), target); - } - - // optional .google.protobuf.Edition maximum_edition = 5; - if (cached_has_bits & 0x00000002u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 5, this->_internal_maximum_edition(), 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.FeatureSetDefaults) - return target; -} - -::size_t FeatureSetDefaults::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSetDefaults) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - { - total_size += 1UL * this->_internal_defaults_size(); - for (const auto& msg : this->_internal_defaults()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional .google.protobuf.Edition minimum_edition = 4; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_minimum_edition()); - } - // optional .google.protobuf.Edition maximum_edition = 5; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_maximum_edition()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FeatureSetDefaults::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FeatureSetDefaults& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FeatureSetDefaults::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FeatureSetDefaults& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSetDefaults) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_defaults_size()); + i < n; i++) { + const auto& repfield = this_._internal_defaults().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .google.protobuf.Edition minimum_edition = 4; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this_._internal_minimum_edition(), target); + } + + // optional .google.protobuf.Edition maximum_edition = 5; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this_._internal_maximum_edition(), 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.FeatureSetDefaults) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FeatureSetDefaults::ByteSizeLong(const MessageLite& base) { + const FeatureSetDefaults& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FeatureSetDefaults::ByteSizeLong() const { + const FeatureSetDefaults& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSetDefaults) + ::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.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; + { + total_size += 1UL * this_._internal_defaults_size(); + for (const auto& msg : this_._internal_defaults()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .google.protobuf.Edition minimum_edition = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_minimum_edition()); + } + // optional .google.protobuf.Edition maximum_edition = 5; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_maximum_edition()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void FeatureSetDefaults::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -13506,9 +13910,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(), &SourceCodeInfo_Location::ByteSizeLong, + &SourceCodeInfo_Location::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(SourceCodeInfo_Location, _impl_._cached_size_), false, @@ -13610,126 +14013,143 @@ PROTOBUF_NOINLINE void SourceCodeInfo_Location::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* SourceCodeInfo_Location::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated int32 path = 1 [packed = true]; - { - int byte_size = _impl_._path_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteInt32Packed( - 1, _internal_path(), byte_size, target); - } - } - - // repeated int32 span = 2 [packed = true]; - { - int byte_size = _impl_._span_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteInt32Packed( - 2, _internal_span(), byte_size, target); - } - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional string leading_comments = 3; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_leading_comments(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.leading_comments"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // optional string trailing_comments = 4; - if (cached_has_bits & 0x00000002u) { - const std::string& _s = this->_internal_trailing_comments(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.trailing_comments"); - target = stream->WriteStringMaybeAliased(4, _s, target); - } - - // repeated string leading_detached_comments = 6; - for (int i = 0, n = this->_internal_leading_detached_comments_size(); i < n; ++i) { - const auto& s = this->_internal_leading_detached_comments().Get(i); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); - target = stream->WriteString(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.SourceCodeInfo.Location) - return target; -} - -::size_t SourceCodeInfo_Location::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo.Location) - ::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( - reinterpret_cast(this)); - { - // repeated int32 path = 1 [packed = true]; - { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( - this->_internal_path()) - ; - _impl_._path_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); - std::size_t tag_size = data_size == 0 - ? 0 - : 1 + ::_pbi::WireFormatLite::Int32Size( - static_cast(data_size)) - ; - total_size += tag_size + data_size; - } - // repeated int32 span = 2 [packed = true]; - { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( - this->_internal_span()) - ; - _impl_._span_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); - std::size_t tag_size = data_size == 0 - ? 0 - : 1 + ::_pbi::WireFormatLite::Int32Size( - static_cast(data_size)) - ; - total_size += tag_size + data_size; - } - // repeated string leading_detached_comments = 6; - { - total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_leading_detached_comments().size()); - for (int i = 0, n = _internal_leading_detached_comments().size(); i < n; ++i) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - _internal_leading_detached_comments().Get(i)); - } - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string leading_comments = 3; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_leading_comments()); - } - // optional string trailing_comments = 4; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_trailing_comments()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* SourceCodeInfo_Location::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const SourceCodeInfo_Location& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* SourceCodeInfo_Location::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const SourceCodeInfo_Location& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated int32 path = 1 [packed = true]; + { + int byte_size = this_._impl_._path_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, this_._internal_path(), byte_size, target); + } + } + + // repeated int32 span = 2 [packed = true]; + { + int byte_size = this_._impl_._span_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, this_._internal_span(), byte_size, target); + } + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string leading_comments = 3; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_leading_comments(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.SourceCodeInfo.Location.leading_comments"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional string trailing_comments = 4; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_trailing_comments(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.SourceCodeInfo.Location.trailing_comments"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // repeated string leading_detached_comments = 6; + for (int i = 0, n = this_._internal_leading_detached_comments_size(); i < n; ++i) { + const auto& s = this_._internal_leading_detached_comments().Get(i); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); + target = stream->WriteString(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.SourceCodeInfo.Location) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t SourceCodeInfo_Location::ByteSizeLong(const MessageLite& base) { + const SourceCodeInfo_Location& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t SourceCodeInfo_Location::ByteSizeLong() const { + const SourceCodeInfo_Location& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo.Location) + ::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 int32 path = 1 [packed = true]; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this_._internal_path()) + ; + this_._impl_._path_cached_byte_size_.Set( + ::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated int32 span = 2 [packed = true]; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this_._internal_span()) + ; + this_._impl_._span_cached_byte_size_.Set( + ::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated string leading_detached_comments = 6; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_leading_detached_comments().size()); + for (int i = 0, n = this_._internal_leading_detached_comments().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_leading_detached_comments().Get(i)); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string leading_comments = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_leading_comments()); + } + // optional string trailing_comments = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_trailing_comments()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void SourceCodeInfo_Location::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -13848,9 +14268,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(), &SourceCodeInfo::ByteSizeLong, + &SourceCodeInfo::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(SourceCodeInfo, _impl_._cached_size_), false, @@ -13908,54 +14327,68 @@ PROTOBUF_NOINLINE void SourceCodeInfo::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* SourceCodeInfo::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - for (unsigned i = 0, n = static_cast( - this->_internal_location_size()); - i < n; i++) { - const auto& repfield = this->_internal_location().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.SourceCodeInfo) - return target; -} - -::size_t SourceCodeInfo::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - { - total_size += 1UL * this->_internal_location_size(); - for (const auto& msg : this->_internal_location()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* SourceCodeInfo::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const SourceCodeInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* SourceCodeInfo::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const SourceCodeInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.SourceCodeInfo.Location location = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_location_size()); + i < n; i++) { + const auto& repfield = this_._internal_location().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.SourceCodeInfo) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t SourceCodeInfo::ByteSizeLong(const MessageLite& base) { + const SourceCodeInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t SourceCodeInfo::ByteSizeLong() const { + const SourceCodeInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo) + ::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.SourceCodeInfo.Location location = 1; + { + total_size += 1UL * this_._internal_location_size(); + for (const auto& msg : this_._internal_location()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void SourceCodeInfo::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -14079,9 +14512,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(), &GeneratedCodeInfo_Annotation::ByteSizeLong, + &GeneratedCodeInfo_Annotation::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _impl_._cached_size_), false, @@ -14179,111 +14611,126 @@ PROTOBUF_NOINLINE void GeneratedCodeInfo_Annotation::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* GeneratedCodeInfo_Annotation::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated int32 path = 1 [packed = true]; - { - int byte_size = _impl_._path_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteInt32Packed( - 1, _internal_path(), byte_size, target); - } - } - - cached_has_bits = _impl_._has_bits_[0]; - // optional string source_file = 2; - if (cached_has_bits & 0x00000001u) { - const std::string& _s = this->_internal_source_file(); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, - "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional int32 begin = 3; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<3>( - stream, this->_internal_begin(), target); - } - - // optional int32 end = 4; - if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<4>( - stream, this->_internal_end(), target); - } - - // optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; - if (cached_has_bits & 0x00000008u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 5, this->_internal_semantic(), 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.GeneratedCodeInfo.Annotation) - return target; -} - -::size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation) - ::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( - reinterpret_cast(this)); - { - // repeated int32 path = 1 [packed = true]; - { - std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( - this->_internal_path()) - ; - _impl_._path_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); - std::size_t tag_size = data_size == 0 - ? 0 - : 1 + ::_pbi::WireFormatLite::Int32Size( - static_cast(data_size)) - ; - total_size += tag_size + data_size; - } - } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional string source_file = 2; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_source_file()); - } - // optional int32 begin = 3; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_begin()); - } - // optional int32 end = 4; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this->_internal_end()); - } - // optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_semantic()); - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* GeneratedCodeInfo_Annotation::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const GeneratedCodeInfo_Annotation& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* GeneratedCodeInfo_Annotation::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const GeneratedCodeInfo_Annotation& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated int32 path = 1 [packed = true]; + { + int byte_size = this_._impl_._path_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, this_._internal_path(), byte_size, target); + } + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string source_file = 2; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_source_file(); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE, + "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional int32 begin = 3; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this_._internal_begin(), target); + } + + // optional int32 end = 4; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<4>( + stream, this_._internal_end(), target); + } + + // optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this_._internal_semantic(), 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.GeneratedCodeInfo.Annotation) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t GeneratedCodeInfo_Annotation::ByteSizeLong(const MessageLite& base) { + const GeneratedCodeInfo_Annotation& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { + const GeneratedCodeInfo_Annotation& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation) + ::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 int32 path = 1 [packed = true]; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int32Size( + this_._internal_path()) + ; + this_._impl_._path_cached_byte_size_.Set( + ::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string source_file = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_source_file()); + } + // optional int32 begin = 3; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_begin()); + } + // optional int32 end = 4; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_end()); + } + // optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_semantic()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void GeneratedCodeInfo_Annotation::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { auto* const _this = static_cast(&to_msg); @@ -14409,9 +14856,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(), &GeneratedCodeInfo::ByteSizeLong, + &GeneratedCodeInfo::_InternalSerialize, #endif // PROTOBUF_CUSTOM_VTABLE PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo, _impl_._cached_size_), false, @@ -14469,54 +14915,68 @@ PROTOBUF_NOINLINE void GeneratedCodeInfo::Clear() { _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -::uint8_t* GeneratedCodeInfo::_InternalSerialize( - ::uint8_t* target, - ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - for (unsigned i = 0, n = static_cast( - this->_internal_annotation_size()); - i < n; i++) { - const auto& repfield = this->_internal_annotation().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.GeneratedCodeInfo) - return target; -} - -::size_t GeneratedCodeInfo::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo) - ::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( - reinterpret_cast(this)); - { - // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - { - total_size += 1UL * this->_internal_annotation_size(); - for (const auto& msg : this->_internal_annotation()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* GeneratedCodeInfo::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const GeneratedCodeInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* GeneratedCodeInfo::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const GeneratedCodeInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_annotation_size()); + i < n; i++) { + const auto& repfield = this_._internal_annotation().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.GeneratedCodeInfo) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t GeneratedCodeInfo::ByteSizeLong(const MessageLite& base) { + const GeneratedCodeInfo& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t GeneratedCodeInfo::ByteSizeLong() const { + const GeneratedCodeInfo& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo) + ::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.GeneratedCodeInfo.Annotation annotation = 1; + { + total_size += 1UL * this_._internal_annotation_size(); + for (const auto& msg : this_._internal_annotation()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } void GeneratedCodeInfo::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/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 4ec6c097b0..3c00710918 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -801,10 +801,26 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : public ::google::prot public: 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: @@ -992,10 +1008,26 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : public ::google::protobuf: 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: @@ -1255,10 +1287,26 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : public ::google::prot 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: @@ -1513,10 +1561,26 @@ class PROTOBUF_EXPORT FieldOptions_FeatureSupport final : public ::google::proto 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: @@ -1730,10 +1794,26 @@ class PROTOBUF_EXPORT FieldOptions_EditionDefault final : public ::google::proto 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: @@ -1926,10 +2006,26 @@ class PROTOBUF_EXPORT FeatureSet final : public ::google::protobuf::Message public: 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: @@ -2464,10 +2560,26 @@ class PROTOBUF_EXPORT ExtensionRangeOptions_Declaration final : public ::google: 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: @@ -2700,10 +2812,26 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : public ::goo 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: @@ -2885,10 +3013,26 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : public ::google::pro 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: @@ -3075,10 +3219,26 @@ class PROTOBUF_EXPORT UninterpretedOption final : public ::google::protobuf::Mes public: 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: @@ -3350,10 +3510,26 @@ class PROTOBUF_EXPORT SourceCodeInfo 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: @@ -3528,10 +3704,26 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : public ::google::protobuf::Messa 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: @@ -3711,10 +3903,26 @@ class PROTOBUF_EXPORT FeatureSetDefaults_FeatureSetEditionDefault final : public public: 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: @@ -3922,10 +4130,26 @@ class PROTOBUF_EXPORT ServiceOptions final : public ::google::protobuf::Message public: 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: @@ -4315,10 +4539,26 @@ class PROTOBUF_EXPORT OneofOptions final : public ::google::protobuf::Message public: 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: @@ -4695,10 +4935,26 @@ class PROTOBUF_EXPORT MethodOptions final : public ::google::protobuf::Message public: 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: @@ -5121,10 +5377,26 @@ class PROTOBUF_EXPORT MessageOptions final : public ::google::protobuf::Message public: 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: @@ -5566,10 +5838,26 @@ class PROTOBUF_EXPORT FileOptions final : public ::google::protobuf::Message public: 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: @@ -6273,10 +6561,26 @@ class PROTOBUF_EXPORT FieldOptions final : public ::google::protobuf::Message public: 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: @@ -6916,10 +7220,26 @@ class PROTOBUF_EXPORT FeatureSetDefaults final : public ::google::protobuf::Mess public: 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: @@ -7126,10 +7446,26 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : public ::google::protobuf::M public: 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: @@ -7558,10 +7894,26 @@ class PROTOBUF_EXPORT EnumValueOptions final : public ::google::protobuf::Messag public: 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: @@ -7981,10 +8333,26 @@ class PROTOBUF_EXPORT EnumOptions final : public ::google::protobuf::Message public: 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: @@ -8400,10 +8768,26 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : public ::google::protobuf::Me public: 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: @@ -8600,10 +8984,26 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : public ::google::protobuf::M public: 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: @@ -8864,10 +9264,26 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : public ::google::protobuf::Me public: 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: @@ -9260,10 +9676,26 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : public ::google::protobuf public: 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: @@ -9473,10 +9905,26 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : public ::google::pr public: 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: @@ -9680,10 +10128,26 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : public ::google::protobuf:: public: 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: @@ -9899,10 +10363,26 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : public ::google::protobuf::Mes public: 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: @@ -10162,10 +10642,26 @@ class PROTOBUF_EXPORT DescriptorProto final : public ::google::protobuf::Message public: 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: @@ -10521,10 +11017,26 @@ class PROTOBUF_EXPORT FileDescriptorProto final : public ::google::protobuf::Mes public: 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: @@ -10929,10 +11441,26 @@ class PROTOBUF_EXPORT FileDescriptorSet final : public ::google::protobuf::Messa public: 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/generated_message_bases.cc b/src/google/protobuf/generated_message_bases.cc index 79ff3feae1..044e570990 100644 --- a/src/google/protobuf/generated_message_bases.cc +++ b/src/google/protobuf/generated_message_bases.cc @@ -7,6 +7,8 @@ #include "google/protobuf/generated_message_bases.h" +#include + #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/zero_copy_stream_impl.h" @@ -26,23 +28,27 @@ namespace internal { // ============================================================================= // ZeroFieldsBase -void ZeroFieldsBase::Clear() { - _internal_metadata_.Clear(); // +void ZeroFieldsBase::Clear(MessageLite& msg) { + static_cast(msg) + ._internal_metadata_.Clear(); } ZeroFieldsBase::~ZeroFieldsBase() { _internal_metadata_.Delete(); } -size_t ZeroFieldsBase::ByteSizeLong() const { - return MaybeComputeUnknownFieldsSize(0, &_impl_._cached_size_); +size_t ZeroFieldsBase::ByteSizeLong(const MessageLite& base) { + auto& msg = static_cast(base); + return msg.MaybeComputeUnknownFieldsSize(0, &msg._impl_._cached_size_); } -::uint8_t* ZeroFieldsBase::_InternalSerialize( - ::uint8_t* target, io::EpsCopyOutputStream* stream) const { - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { +::uint8_t* ZeroFieldsBase::_InternalSerialize(const MessageLite& msg, + ::uint8_t* target, + io::EpsCopyOutputStream* stream) { + auto& this_ = static_cast(msg); + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { target = internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields( + this_._internal_metadata_.unknown_fields( UnknownFieldSet::default_instance), target, stream); } diff --git a/src/google/protobuf/generated_message_bases.h b/src/google/protobuf/generated_message_bases.h index c6ce5e25a1..3dc5991d0c 100644 --- a/src/google/protobuf/generated_message_bases.h +++ b/src/google/protobuf/generated_message_bases.h @@ -29,11 +29,13 @@ namespace internal { // rather than Message. class PROTOBUF_EXPORT ZeroFieldsBase : public Message { public: - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - size_t ByteSizeLong() const PROTOBUF_FINAL; + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL { Clear(*this); } + size_t ByteSizeLong() const PROTOBUF_FINAL { return ByteSizeLong(*this); } int GetCachedSize() const { return _impl_._cached_size_.Get(); } ::uint8_t* _InternalSerialize( - ::uint8_t* target, io::EpsCopyOutputStream* stream) const PROTOBUF_FINAL; + ::uint8_t* target, io::EpsCopyOutputStream* stream) const PROTOBUF_FINAL { + return _InternalSerialize(*this, target, stream); + } protected: using Message::Message; @@ -42,6 +44,11 @@ class PROTOBUF_EXPORT ZeroFieldsBase : public Message { static void MergeImpl(MessageLite& to, const MessageLite& from); static void CopyImpl(Message& to, const Message& from); void InternalSwap(ZeroFieldsBase* other); + static void Clear(MessageLite& msg); + static size_t ByteSizeLong(const MessageLite& msg); + static ::uint8_t* _InternalSerialize(const MessageLite& msg, + ::uint8_t* target, + io::EpsCopyOutputStream* stream); struct { mutable internal::CachedSize _cached_size_; diff --git a/src/google/protobuf/implicit_weak_message.cc b/src/google/protobuf/implicit_weak_message.cc index 7c91af8a7d..91fbf2ddb1 100644 --- a/src/google/protobuf/implicit_weak_message.cc +++ b/src/google/protobuf/implicit_weak_message.cc @@ -71,9 +71,9 @@ constexpr MessageLite::ClassDataLite<1> ImplicitWeakMessage::class_data_ = { MergeImpl, GetDeleteImpl(), GetNewImpl(), - GetClearImpl(), - GetByteSizeLongImpl(), - GetSerializeImpl(), + &ClearImpl, + &ByteSizeLongImpl, + &_InternalSerializeImpl, PROTOBUF_FIELD_OFFSET(ImplicitWeakMessage, cached_size_), true, }, diff --git a/src/google/protobuf/implicit_weak_message.h b/src/google/protobuf/implicit_weak_message.h index 09e4dc00d0..457d34db1f 100644 --- a/src/google/protobuf/implicit_weak_message.h +++ b/src/google/protobuf/implicit_weak_message.h @@ -91,6 +91,21 @@ class PROTOBUF_EXPORT ImplicitWeakMessage final : public MessageLite { static void MergeImpl(MessageLite&, const MessageLite&); + static void ClearImpl(MessageLite& msg) { + static_cast(msg).Clear(); + } + + static size_t ByteSizeLongImpl(const MessageLite& msg) { + return static_cast(msg).ByteSizeLong(); + } + + static uint8_t* _InternalSerializeImpl(const MessageLite& msg, + uint8_t* target, + io::EpsCopyOutputStream* stream) { + return static_cast(msg)._InternalSerialize( + target, stream); + } + // This std::string is allocated on the heap, but we use a raw pointer so that // the default instance can be constant-initialized. In the const methods, we // have to handle the possibility of data_ being null. diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index 9492277322..cae4e6bbef 100644 --- a/src/google/protobuf/message_lite.h +++ b/src/google/protobuf/message_lite.h @@ -557,25 +557,6 @@ class PROTOBUF_EXPORT MessageLite { static constexpr auto GetClearImpl() { return ClearImpl; } - - template - static auto ByteSizeLongImpl(const MessageLite& msg) { - return static_cast(msg).ByteSizeLong(); - } - template - static constexpr auto GetByteSizeLongImpl() { - return ByteSizeLongImpl; - } - - template - static uint8_t* SerializeImpl(const MessageLite& msg, uint8_t* target, - io::EpsCopyOutputStream* stream) { - return static_cast(msg)._InternalSerialize(target, stream); - } - template - static constexpr auto GetSerializeImpl() { - return SerializeImpl; - } #else // PROTOBUF_CUSTOM_VTABLE // When custom vtables are off we avoid instantiating the functions because we // will not use them anyway. Less work for the compiler. @@ -585,10 +566,6 @@ class PROTOBUF_EXPORT MessageLite { using GetDeleteImpl = std::nullptr_t; template using GetClearImpl = std::nullptr_t; - template - using GetByteSizeLongImpl = std::nullptr_t; - template - using GetSerializeImpl = std::nullptr_t; #endif // PROTOBUF_CUSTOM_VTABLE template