In the custom vtable mode invert how the static/non-static overloads versions work for ByteSizeLong and _InternalSerialize. That way the public entry point and the function pointer both end up being the same. Currently, the static function is a separate function than the one called externally, forcing two functions to exist.

It has no effect in normal mode.

PiperOrigin-RevId: 651119789
pull/17316/head
Protobuf Team Bot 8 months ago committed by Copybara-Service
parent 5025dcd9c0
commit c97a042116
  1. 28
      editions/golden/compare_cpp_codegen_failure.txt
  2. 2
      editions/golden/compare_cpp_codegen_failure.xml
  3. 6
      src/google/protobuf/compiler/cpp/field_generators/cord_field.cc
  4. 26
      src/google/protobuf/compiler/cpp/field_generators/enum_field.cc
  5. 9
      src/google/protobuf/compiler/cpp/field_generators/map_field.cc
  6. 23
      src/google/protobuf/compiler/cpp/field_generators/message_field.cc
  7. 31
      src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc
  8. 15
      src/google/protobuf/compiler/cpp/field_generators/string_field.cc
  9. 15
      src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc
  10. 143
      src/google/protobuf/compiler/cpp/message.cc
  11. 4
      src/google/protobuf/compiler/cpp/tracker.cc
  12. 117
      src/google/protobuf/compiler/java/java_features.pb.cc
  13. 24
      src/google/protobuf/compiler/java/java_features.pb.h
  14. 819
      src/google/protobuf/compiler/plugin.pb.cc
  15. 96
      src/google/protobuf/compiler/plugin.pb.h
  16. 117
      src/google/protobuf/cpp_features.pb.cc
  17. 24
      src/google/protobuf/cpp_features.pb.h
  18. 7512
      src/google/protobuf/descriptor.pb.cc
  19. 792
      src/google/protobuf/descriptor.pb.h
  20. 22
      src/google/protobuf/generated_message_bases.cc
  21. 13
      src/google/protobuf/generated_message_bases.h
  22. 6
      src/google/protobuf/implicit_weak_message.cc
  23. 15
      src/google/protobuf/implicit_weak_message.h
  24. 23
      src/google/protobuf/message_lite.h

@ -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
@@ @@

@ -2,7 +2,7 @@
<testsuites tests="1" name="AllTests">
<testsuite name="EditionsCodegenTests">
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.cc" status="run" result="completed" classname="DiffTest">
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.cc&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;// Protobuf C++ Version: 0.20240709.0&#x0A;&#x0A;#include &quot;third_party/protobuf/editions/golden/simple_proto3.pb.h&quot;&#x0A;&#x0A;#include &lt;algorithm&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_impl.h&quot;&#x0A;#include &quot;third_party/protobuf/extension_set.h&quot;&#x0A;#include &quot;third_party/protobuf/wire_format_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/io/zero_copy_stream_impl_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;, with the difference:&#x0A;@@ @@&#x0A; ::_pbi::TcParser::GetTable&lt;::protobuf_editions_test::golden::SimpleProto3&gt;(), // to_prefetch&#x0A; #endif // PROTOBUF_PREFETCH_PARSE_TABLE&#x0A; }, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {::_pbi::TcParser::FastV32S1,&#x0A; {8, 0, 0, PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_)}},&#x0A; }}, {{&#x0A; 65535, 65535&#x0A; }}, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_), _Internal::kHasBitsOffset + 0, 0,&#x0A; (0 | ::_fl::kFcOptional | ::_fl::kInt32)},&#x0A; }},&#x0A;@@ @@&#x0A; (void)cached_has_bits;&#x0A; &#x0A; cached_has_bits = _impl_._has_bits_[0];&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; if (cached_has_bits &amp; 0x00000001u) {&#x0A; target = ::proto2::internal::WireFormatLite::&#x0A; WriteInt32ToArrayWithField&lt;1&gt;(&#x0A;@@ @@&#x0A; (void)cached_has_bits;&#x0A; &#x0A; {&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; cached_has_bits = _impl_._has_bits_[0];&#x0A; if (cached_has_bits &amp; 0x00000001u) {&#x0A; total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(" type=""></failure>
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.cc&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;// Protobuf C++ Version: 0.20240709.0&#x0A;&#x0A;#include &quot;third_party/protobuf/editions/golden/simple_proto3.pb.h&quot;&#x0A;&#x0A;#include &lt;algorithm&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_impl.h&quot;&#x0A;#include &quot;third_party/protobuf/extension_set.h&quot;&#x0A;#include &quot;third_party/protobuf/wire_format_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/io/zero_copy_stream_impl_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;, with the difference:&#x0A;@@ @@&#x0A; ::_pbi::TcParser::GetTable&lt;::protobuf_editions_test::golden::SimpleProto3&gt;(), // to_prefetch&#x0A; #endif // PROTOBUF_PREFETCH_PARSE_TABLE&#x0A; }, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {::_pbi::TcParser::FastV32S1,&#x0A; {8, 0, 0, PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_)}},&#x0A; }}, {{&#x0A; 65535, 65535&#x0A; }}, {{&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; {PROTOBUF_FIELD_OFFSET(SimpleProto3, _impl_.int32_field_), _Internal::kHasBitsOffset + 0, 0,&#x0A; (0 | ::_fl::kFcOptional | ::_fl::kInt32)},&#x0A; }},&#x0A;@@ @@&#x0A; (void)cached_has_bits;&#x0A; &#x0A; cached_has_bits = this_._impl_._has_bits_[0];&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; if (cached_has_bits &amp; 0x00000001u) {&#x0A; target = ::proto2::internal::WireFormatLite::&#x0A; WriteInt32ToArrayWithField&lt;1&gt;(&#x0A;@@ @@&#x0A; (void)cached_has_bits;&#x0A; &#x0A; {&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; cached_has_bits =&#x0A; this_._impl_._has_bits_[0];&#x0A; if (cached_has_bits &amp; 0x00000001u) {" type=""></failure>
</testcase>
<testcase name="third_party/protobuf/editions/golden/simple_proto3.pb.h" status="run" result="completed" classname="DiffTest">
<failure message="Value of: third_party/protobuf/editions/golden/simple_proto3.pb.h&#x0A;Expected: &#x0A;// Generated by the protocol buffer compiler. DO NOT EDIT!&#x0A;// NO CHECKED-IN PROTOBUF GENCODE&#x0A;// source: third_party/protobuf/editions/golden/simple_proto3.proto&#x0A;// Protobuf C++ Version: 0.20240709.0&#x0A;&#x0A;#ifndef GOOGLE_PROTOBUF_INCLUDED_third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;#define GOOGLE_PROTOBUF_INCLUDED_third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;&#x0A;#include &lt;limits&gt;&#x0A;#include &lt;string&gt;&#x0A;#include &lt;type_traits&gt;&#x0A;#include &lt;utility&gt;&#x0A;&#x0A;#include &quot;third_party/protobuf/runtime_version.h&quot;&#x0A;#if PROTOBUF_VERSION != 20240709&#x0A;#error &quot;Protobuf C++ gencode is built with an incompatible version of&quot;&#x0A;#error &quot;Protobuf C++ headers/runtime. See&quot;&#x0A;#error &quot;https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp&quot;&#x0A;#endif&#x0A;#include &quot;third_party/protobuf/io/coded_stream.h&quot;&#x0A;#include &quot;third_party/protobuf/arena.h&quot;&#x0A;#include &quot;third_party/protobuf/arenastring.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_tctable_decl.h&quot;&#x0A;#include &quot;third_party/protobuf/generated_message_util.h&quot;&#x0A;#include &quot;third_party/protobuf/metadata_lite.h&quot;&#x0A;#include &quot;third_party/protobuf/message_lite.h&quot;&#x0A;// @@protoc_insertion_point(includes)&#x0A;&#x0A;// Must be included last.&#x0A;&#x0A;#endif // GOOGLE_PROTOBUF_INCLUDED_third_5fparty_2fprotobuf_2feditions_2fgolden_2fsimple_5fproto3_2eproto_2epb_2eh&#x0A;, with the difference:&#x0A;@@ @@&#x0A; enum : int {&#x0A; kInt32FieldFieldNumber = 1,&#x0A; };&#x0A;- // optional int32 int32_field = 1;&#x0A;+ // int32 int32_field = 1;&#x0A; bool has_int32_field() const;&#x0A; void clear_int32_field() ;&#x0A; ::int32_t int32_field() const;&#x0A;@@ @@&#x0A; &#x0A; // SimpleProto3&#x0A; &#x0A;-// optional int32 int32_field = 1;&#x0A;+// int32 int32_field = 1;&#x0A; inline bool SimpleProto3::has_int32_field() const {&#x0A; bool value = (_impl_._has_bits_[0] &amp; 0x00000001u) != 0;&#x0A; return value;" type=""></failure>

@ -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(

@ -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<std::size_t>(this->_internal_$name$_size());
auto count = static_cast<std::size_t>(this_._internal_$name$_size());
for (std::size_t i = 0; i < count; ++i) {
byte_size += ::_pbi::WireFormatLite::EnumSize(
this->_internal_$name$().Get(static_cast<int>(i)));
this_._internal_$name$().Get(static_cast<int>(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<std::size_t>(this->_internal_$name$_size());
auto count = static_cast<std::size_t>(this_._internal_$name$_size());
for (std::size_t i = 0; i < count; ++i) {
data_size += ::_pbi::WireFormatLite::EnumSize(
this->_internal_$name$().Get(static_cast<int>(i)));
this_._internal_$name$().Get(static_cast<int>(i)));
}
total_size += data_size;
$add_to_size$;

@ -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$<MapType>(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");

@ -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<unsigned>(
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");

@ -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");
}
}}

@ -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<int>(_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<int>(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);
}

@ -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<int>(_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<int>(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);
}

@ -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<const $classname$&>(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<const $classname$&>(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<int>($unknown_fields$.size()), target);
this_.$unknown_fields$.data(),
static_cast<int>(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<int>($unknown_fields$.size()), target);
this_.$unknown_fields$.data(),
static_cast<int>(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<const $classname$&>(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<const void*>(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<const $classname$&>(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$)

@ -148,14 +148,14 @@ std::vector<Sub> 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"),

@ -206,9 +206,8 @@ const ::google::protobuf::MessageLite::ClassDataFull
#if defined(PROTOBUF_CUSTOM_VTABLE)
::google::protobuf::Message::GetDeleteImpl<JavaFeatures>(),
::google::protobuf::Message::GetNewImpl<JavaFeatures>(),
::google::protobuf::Message::GetClearImpl<JavaFeatures>(),
::google::protobuf::Message::GetByteSizeLongImpl<JavaFeatures>(),
::google::protobuf::Message::GetSerializeImpl<JavaFeatures>(),
::google::protobuf::Message::GetClearImpl<JavaFeatures>(), &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<const JavaFeatures&>(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<const JavaFeatures&>(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<const void*>(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<JavaFeatures*>(&to_msg);

@ -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:

@ -404,9 +404,8 @@ const ::google::protobuf::MessageLite::ClassDataFull
#if defined(PROTOBUF_CUSTOM_VTABLE)
::google::protobuf::Message::GetDeleteImpl<Version>(),
::google::protobuf::Message::GetNewImpl<Version>(),
::google::protobuf::Message::GetClearImpl<Version>(),
::google::protobuf::Message::GetByteSizeLongImpl<Version>(),
::google::protobuf::Message::GetSerializeImpl<Version>(),
::google::protobuf::Message::GetClearImpl<Version>(), &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<int>(_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<const Version&>(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<int>(_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<const void*>(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<const Version&>(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<Version*>(&to_msg);
@ -725,9 +738,8 @@ const ::google::protobuf::MessageLite::ClassDataFull
#if defined(PROTOBUF_CUSTOM_VTABLE)
::google::protobuf::Message::GetDeleteImpl<CodeGeneratorRequest>(),
::google::protobuf::Message::GetNewImpl<CodeGeneratorRequest>(),
::google::protobuf::Message::GetClearImpl<CodeGeneratorRequest>(),
::google::protobuf::Message::GetByteSizeLongImpl<CodeGeneratorRequest>(),
::google::protobuf::Message::GetSerializeImpl<CodeGeneratorRequest>(),
::google::protobuf::Message::GetClearImpl<CodeGeneratorRequest>(), &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<int>(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<int>(_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<unsigned>(
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<unsigned>(
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<const CodeGeneratorRequest&>(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<int>(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<int>(_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<unsigned>(
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<unsigned>(
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<const void*>(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<const CodeGeneratorRequest&>(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<CodeGeneratorRequest*>(&to_msg);
@ -1099,9 +1127,8 @@ const ::google::protobuf::MessageLite::ClassDataFull
#if defined(PROTOBUF_CUSTOM_VTABLE)
::google::protobuf::Message::GetDeleteImpl<CodeGeneratorResponse_File>(),
::google::protobuf::Message::GetNewImpl<CodeGeneratorResponse_File>(),
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse_File>(),
::google::protobuf::Message::GetByteSizeLongImpl<CodeGeneratorResponse_File>(),
::google::protobuf::Message::GetSerializeImpl<CodeGeneratorResponse_File>(),
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse_File>(), &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<int>(_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<int>(_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<int>(_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<const CodeGeneratorResponse_File&>(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<int>(_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<int>(_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<int>(_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<const void*>(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<const CodeGeneratorResponse_File&>(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<CodeGeneratorResponse_File*>(&to_msg);
@ -1429,9 +1471,8 @@ const ::google::protobuf::MessageLite::ClassDataFull
#if defined(PROTOBUF_CUSTOM_VTABLE)
::google::protobuf::Message::GetDeleteImpl<CodeGeneratorResponse>(),
::google::protobuf::Message::GetNewImpl<CodeGeneratorResponse>(),
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse>(),
::google::protobuf::Message::GetByteSizeLongImpl<CodeGeneratorResponse>(),
::google::protobuf::Message::GetSerializeImpl<CodeGeneratorResponse>(),
::google::protobuf::Message::GetClearImpl<CodeGeneratorResponse>(), &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<int>(_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<unsigned>(
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<const CodeGeneratorResponse&>(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<int>(_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<unsigned>(
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<const void*>(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<const CodeGeneratorResponse&>(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<CodeGeneratorResponse*>(&to_msg);

@ -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:

@ -201,9 +201,8 @@ const ::google::protobuf::MessageLite::ClassDataFull
#if defined(PROTOBUF_CUSTOM_VTABLE)
::google::protobuf::Message::GetDeleteImpl<CppFeatures>(),
::google::protobuf::Message::GetNewImpl<CppFeatures>(),
::google::protobuf::Message::GetClearImpl<CppFeatures>(),
::google::protobuf::Message::GetByteSizeLongImpl<CppFeatures>(),
::google::protobuf::Message::GetSerializeImpl<CppFeatures>(),
::google::protobuf::Message::GetClearImpl<CppFeatures>(), &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<const CppFeatures&>(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<const CppFeatures&>(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<const void*>(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<CppFeatures*>(&to_msg);

@ -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:

File diff suppressed because it is too large Load Diff

@ -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:

@ -7,6 +7,8 @@
#include "google/protobuf/generated_message_bases.h"
#include <cstddef>
#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<UnknownFieldSet>(); //
void ZeroFieldsBase::Clear(MessageLite& msg) {
static_cast<ZeroFieldsBase&>(msg)
._internal_metadata_.Clear<UnknownFieldSet>();
}
ZeroFieldsBase::~ZeroFieldsBase() {
_internal_metadata_.Delete<UnknownFieldSet>();
}
size_t ZeroFieldsBase::ByteSizeLong() const {
return MaybeComputeUnknownFieldsSize(0, &_impl_._cached_size_);
size_t ZeroFieldsBase::ByteSizeLong(const MessageLite& base) {
auto& msg = static_cast<const ZeroFieldsBase&>(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<const ZeroFieldsBase&>(msg);
if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<UnknownFieldSet>(
this_._internal_metadata_.unknown_fields<UnknownFieldSet>(
UnknownFieldSet::default_instance),
target, stream);
}

@ -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_;

@ -71,9 +71,9 @@ constexpr MessageLite::ClassDataLite<1> ImplicitWeakMessage::class_data_ = {
MergeImpl,
GetDeleteImpl<ImplicitWeakMessage>(),
GetNewImpl<ImplicitWeakMessage>(),
GetClearImpl<ImplicitWeakMessage>(),
GetByteSizeLongImpl<ImplicitWeakMessage>(),
GetSerializeImpl<ImplicitWeakMessage>(),
&ClearImpl,
&ByteSizeLongImpl,
&_InternalSerializeImpl,
PROTOBUF_FIELD_OFFSET(ImplicitWeakMessage, cached_size_),
true,
},

@ -91,6 +91,21 @@ class PROTOBUF_EXPORT ImplicitWeakMessage final : public MessageLite {
static void MergeImpl(MessageLite&, const MessageLite&);
static void ClearImpl(MessageLite& msg) {
static_cast<ImplicitWeakMessage&>(msg).Clear();
}
static size_t ByteSizeLongImpl(const MessageLite& msg) {
return static_cast<const ImplicitWeakMessage&>(msg).ByteSizeLong();
}
static uint8_t* _InternalSerializeImpl(const MessageLite& msg,
uint8_t* target,
io::EpsCopyOutputStream* stream) {
return static_cast<const ImplicitWeakMessage&>(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.

@ -557,25 +557,6 @@ class PROTOBUF_EXPORT MessageLite {
static constexpr auto GetClearImpl() {
return ClearImpl<T>;
}
template <typename T>
static auto ByteSizeLongImpl(const MessageLite& msg) {
return static_cast<const T&>(msg).ByteSizeLong();
}
template <typename T>
static constexpr auto GetByteSizeLongImpl() {
return ByteSizeLongImpl<T>;
}
template <typename T>
static uint8_t* SerializeImpl(const MessageLite& msg, uint8_t* target,
io::EpsCopyOutputStream* stream) {
return static_cast<const T&>(msg)._InternalSerialize(target, stream);
}
template <typename T>
static constexpr auto GetSerializeImpl() {
return SerializeImpl<T>;
}
#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 <typename T>
using GetClearImpl = std::nullptr_t;
template <typename T>
using GetByteSizeLongImpl = std::nullptr_t;
template <typename T>
using GetSerializeImpl = std::nullptr_t;
#endif // PROTOBUF_CUSTOM_VTABLE
template <typename T>

Loading…
Cancel
Save