Automated rollback of commit f046526a0e.

PiperOrigin-RevId: 584925599
pull/14839/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent b4858b255b
commit 2f25726b89
  1. 29
      src/google/protobuf/compiler/cpp/file.cc
  2. 25
      src/google/protobuf/compiler/cpp/message.cc
  3. 20
      src/google/protobuf/compiler/java/java_features.pb.cc
  4. 26
      src/google/protobuf/compiler/plugin.pb.cc
  5. 20
      src/google/protobuf/cpp_features.pb.cc
  6. 82
      src/google/protobuf/descriptor.pb.cc
  7. 4
      src/google/protobuf/generated_message_reflection.cc
  8. 30
      src/google/protobuf/generated_message_reflection.h

@ -1129,13 +1129,14 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* p) {
: std::string(p->LookupVar("file_level_metadata"))},
},
R"cc(
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
$desc_table$ = {
static ::absl::once_flag $desc_table$_once;
const ::_pbi::DescriptorTable $desc_table$ = {
false,
$eager$,
$file_proto_len$,
$proto_name$,
"$filename$",
&$desc_table$_once,
$deps_ptr$,
$num_deps$,
$num_msgs$,
@ -1147,17 +1148,17 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* p) {
$file_level_service_descriptors$,
};
//~ This function exists to be marked as weak.
//~ It can significantly speed up compilation by breaking up LLVM's SCC
//~ in the .pb.cc translation units. Large translation units see a
//~ reduction of more than 35% of walltime for optimized builds. Without
//~ the weak attribute all the messages in the file, including all the
//~ vtables and everything they use become part of the same SCC through
//~ a cycle like:
//~ GetMetadata -> descriptor table -> default instances ->
//~ vtables -> GetMetadata
//~ By adding a weak function here we break the connection from the
//~ individual vtables back into the descriptor table.
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* $desc_table$_getter() {
return &$desc_table$;
}

@ -2063,13 +2063,24 @@ void MessageGenerator::GenerateClassMethods(io::Printer* p) {
"$classname$::$classname$(::$proto_ns$::Arena* arena)\n"
" : SuperType(arena) {}\n");
if (HasDescriptorMethods(descriptor_->file(), options_)) {
if (!descriptor_->options().map_entry()) {
format(
"::$proto_ns$::Metadata $classname$::GetMetadata() const {\n"
"$annotate_reflection$"
" return ::_pbi::AssignDescriptors(\n"
" &$desc_table$_getter, &$desc_table$.once,\n"
" &$desc_table$_getter, &$desc_table$_once,\n"
" $file_level_metadata$[$1$]);\n"
"}\n",
index_in_file_messages_);
} else {
format(
"::$proto_ns$::Metadata $classname$::GetMetadata() const {\n"
" return ::_pbi::AssignDescriptors(\n"
" &$desc_table$_getter, &$desc_table$_once,\n"
" $file_level_metadata$[$1$]);\n"
"}\n",
index_in_file_messages_);
}
}
return;
}
@ -2199,14 +2210,24 @@ void MessageGenerator::GenerateClassMethods(io::Printer* p) {
format("\n");
if (HasDescriptorMethods(descriptor_->file(), options_)) {
if (!descriptor_->options().map_entry()) {
format(
"::$proto_ns$::Metadata $classname$::GetMetadata() const {\n"
"$annotate_reflection$"
" return ::_pbi::AssignDescriptors(\n"
" &$desc_table$_getter, &$desc_table$.once,\n"
" &$desc_table$_getter, &$desc_table$_once,\n"
" $file_level_metadata$[$1$]);\n"
"}\n",
index_in_file_messages_);
} else {
format(
"::$proto_ns$::Metadata $classname$::GetMetadata() const {\n"
" return ::_pbi::AssignDescriptors(\n"
" &$desc_table$_getter, &$desc_table$_once,\n"
" $file_level_metadata$[$1$]);\n"
"}\n",
index_in_file_messages_);
}
}
if (HasTracker(descriptor_, options_)) {

@ -90,13 +90,14 @@ static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2
{
&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
};
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto = {
static ::absl::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto = {
false,
false,
430,
descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto,
"google/protobuf/compiler/java/java_features.proto",
&descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_once,
descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_deps,
1,
1,
@ -108,6 +109,17 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto,
};
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto;
}
@ -356,7 +368,7 @@ void JavaFeatures::InternalSwap(JavaFeatures* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata JavaFeatures::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto.once,
&descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto_once,
file_level_metadata_google_2fprotobuf_2fcompiler_2fjava_2fjava_5ffeatures_2eproto[0]);
}
PROTOC_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi::

@ -244,13 +244,14 @@ static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2
{
&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
};
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = {
static ::absl::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = {
false,
false,
902,
descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
"google/protobuf/compiler/plugin.proto",
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps,
1,
4,
@ -262,6 +263,17 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
};
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
}
@ -590,7 +602,7 @@ void Version::InternalSwap(Version* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata Version::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto.once,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[0]);
}
// ===================================================================
@ -935,7 +947,7 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* PROTOBUF_RESTRICT
::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto.once,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[1]);
}
// ===================================================================
@ -1254,7 +1266,7 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* PROTOB
::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto.once,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[2]);
}
// ===================================================================
@ -1518,7 +1530,7 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* PROTOBUF_RESTRIC
::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto.once,
&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[3]);
}
// @@protoc_insertion_point(namespace_scope)

@ -83,13 +83,14 @@ static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2
{
&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
};
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto = {
static ::absl::once_flag descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto = {
false,
false,
213,
descriptor_table_protodef_google_2fprotobuf_2fcpp_5ffeatures_2eproto,
"google/protobuf/cpp_features.proto",
&descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_once,
descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_deps,
1,
1,
@ -101,6 +102,17 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
file_level_service_descriptors_google_2fprotobuf_2fcpp_5ffeatures_2eproto,
};
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto;
}
@ -284,7 +296,7 @@ void CppFeatures::InternalSwap(CppFeatures* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata CppFeatures::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto.once,
&descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_once,
file_level_metadata_google_2fprotobuf_2fcpp_5ffeatures_2eproto[0]);
}
PROTOBUF_CONSTINIT PROTOBUF_EXPORT

@ -1902,13 +1902,14 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] AB
"rotobuf/types/descriptorpb\370\001\001\242\002\003GPB\252\002\032Go"
"ogle.Protobuf.Reflection"
};
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = {
static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = {
false,
false,
9544,
descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto,
"google/protobuf/descriptor.proto",
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
nullptr,
0,
32,
@ -1920,6 +1921,17 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::DescriptorTable
file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto,
};
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto;
}
@ -2522,7 +2534,7 @@ void FileDescriptorSet::InternalSwap(FileDescriptorSet* PROTOBUF_RESTRICT other)
::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[0]);
}
// ===================================================================
@ -3110,7 +3122,7 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* PROTOBUF_RESTRICT ot
::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[1]);
}
// ===================================================================
@ -3394,7 +3406,7 @@ void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange
::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[2]);
}
// ===================================================================
@ -3617,7 +3629,7 @@ void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange*
::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[3]);
}
// ===================================================================
@ -4104,7 +4116,7 @@ void DescriptorProto::InternalSwap(DescriptorProto* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata DescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[4]);
}
// ===================================================================
@ -4438,7 +4450,7 @@ void ExtensionRangeOptions_Declaration::InternalSwap(ExtensionRangeOptions_Decla
::google::protobuf::Metadata ExtensionRangeOptions_Declaration::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[5]);
}
// ===================================================================
@ -4763,7 +4775,7 @@ void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* PROTOBUF_RESTRIC
::google::protobuf::Metadata ExtensionRangeOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[6]);
}
// ===================================================================
@ -5288,7 +5300,7 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* PROTOBUF_RESTRICT
::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[7]);
}
// ===================================================================
@ -5542,7 +5554,7 @@ void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* PROTOBUF_RESTRICT
::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[8]);
}
// ===================================================================
@ -5765,7 +5777,7 @@ void EnumDescriptorProto_EnumReservedRange::InternalSwap(EnumDescriptorProto_Enu
::google::protobuf::Metadata EnumDescriptorProto_EnumReservedRange::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[9]);
}
// ===================================================================
@ -6104,7 +6116,7 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* PROTOBUF_RESTRICT ot
::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[10]);
}
// ===================================================================
@ -6393,7 +6405,7 @@ void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* PROTOBUF_R
::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[11]);
}
// ===================================================================
@ -6677,7 +6689,7 @@ void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* PROTOBUF_RESTR
::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[12]);
}
// ===================================================================
@ -7057,7 +7069,7 @@ void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* PROTOBUF_RESTRIC
::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[13]);
}
// ===================================================================
@ -7891,7 +7903,7 @@ void FileOptions::InternalSwap(FileOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata FileOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[14]);
}
// ===================================================================
@ -8277,7 +8289,7 @@ void MessageOptions::InternalSwap(MessageOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata MessageOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[15]);
}
// ===================================================================
@ -8513,7 +8525,7 @@ void FieldOptions_EditionDefault::InternalSwap(FieldOptions_EditionDefault* PROT
::google::protobuf::Metadata FieldOptions_EditionDefault::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[16]);
}
// ===================================================================
@ -9057,7 +9069,7 @@ void FieldOptions::InternalSwap(FieldOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata FieldOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[17]);
}
// ===================================================================
@ -9317,7 +9329,7 @@ void OneofOptions::InternalSwap(OneofOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata OneofOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[18]);
}
// ===================================================================
@ -9663,7 +9675,7 @@ void EnumOptions::InternalSwap(EnumOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata EnumOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[19]);
}
// ===================================================================
@ -9991,7 +10003,7 @@ void EnumValueOptions::InternalSwap(EnumValueOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata EnumValueOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[20]);
}
// ===================================================================
@ -10288,7 +10300,7 @@ void ServiceOptions::InternalSwap(ServiceOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata ServiceOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[21]);
}
// ===================================================================
@ -10621,7 +10633,7 @@ void MethodOptions::InternalSwap(MethodOptions* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata MethodOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[22]);
}
// ===================================================================
@ -10862,7 +10874,7 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* PR
::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[23]);
}
// ===================================================================
@ -11251,7 +11263,7 @@ void UninterpretedOption::InternalSwap(UninterpretedOption* PROTOBUF_RESTRICT ot
::google::protobuf::Metadata UninterpretedOption::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[24]);
}
// ===================================================================
@ -11603,7 +11615,7 @@ void FeatureSet::InternalSwap(FeatureSet* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata FeatureSet::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[25]);
}
// ===================================================================
@ -11855,7 +11867,7 @@ void FeatureSetDefaults_FeatureSetEditionDefault::InternalSwap(FeatureSetDefault
::google::protobuf::Metadata FeatureSetDefaults_FeatureSetEditionDefault::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[26]);
}
// ===================================================================
@ -12125,7 +12137,7 @@ void FeatureSetDefaults::InternalSwap(FeatureSetDefaults* PROTOBUF_RESTRICT othe
::google::protobuf::Metadata FeatureSetDefaults::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[27]);
}
// ===================================================================
@ -12467,7 +12479,7 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* PROTOBUF_RES
::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[28]);
}
// ===================================================================
@ -12653,7 +12665,7 @@ void SourceCodeInfo::InternalSwap(SourceCodeInfo* PROTOBUF_RESTRICT other) {
::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[29]);
}
// ===================================================================
@ -12991,7 +13003,7 @@ void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* PR
::google::protobuf::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[30]);
}
// ===================================================================
@ -13177,7 +13189,7 @@ void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* PROTOBUF_RESTRICT other)
::google::protobuf::Metadata GeneratedCodeInfo::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto.once,
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_getter, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[31]);
}
// @@protoc_insertion_point(namespace_scope)

@ -3650,7 +3650,7 @@ void AssignDescriptorsImpl(const DescriptorTable* table, bool eager) {
for (int i = 0; i < num_deps; i++) {
// In case of weak fields deps[i] could be null.
if (table->deps[i]) {
absl::call_once(table->deps[i]->once, AssignDescriptorsImpl,
absl::call_once(*table->deps[i]->once, AssignDescriptorsImpl,
table->deps[i],
/*eager=*/true);
}
@ -3749,7 +3749,7 @@ Metadata AssignDescriptors(const DescriptorTable* (*table)(),
void AssignDescriptors(const DescriptorTable* table) {
MaybeInitializeLazyDescriptors(table);
absl::call_once(table->once, AssignDescriptorsImpl, table, table->is_eager);
absl::call_once(*table->once, AssignDescriptorsImpl, table, table->is_eager);
}
AddDescriptorsRunner::AddDescriptorsRunner(const DescriptorTable* table) {

@ -292,12 +292,12 @@ struct MigrationSchema {
// The num_xxx might not be close to their respective pointer, but this saves
// padding.
struct PROTOBUF_EXPORT DescriptorTable {
mutable absl::once_flag once;
mutable bool is_initialized : 1;
bool is_eager : 1;
uint32_t size : 30; // of serialized descriptor
mutable bool is_initialized;
bool is_eager;
int size; // of serialized descriptor
const char* descriptor;
const char* filename;
absl::once_flag* once;
const DescriptorTable* const* deps;
int num_deps;
int num_messages;
@ -308,28 +308,6 @@ struct PROTOBUF_EXPORT DescriptorTable {
Metadata* file_level_metadata;
const EnumDescriptor** file_level_enum_descriptors;
const ServiceDescriptor** file_level_service_descriptors;
constexpr DescriptorTable(
bool is_eager, int size, const char* descriptor, const char* filename,
const DescriptorTable* const* deps, int num_deps, int num_messages,
const MigrationSchema* schemas, const Message* const* default_instances,
const uint32_t* offsets, Metadata* file_level_metadata,
const EnumDescriptor** file_level_enum_descriptors,
const ServiceDescriptor** file_level_service_descriptors)
: is_initialized(false),
is_eager(is_eager),
size(size),
descriptor(descriptor),
filename(filename),
deps(deps),
num_deps(num_deps),
num_messages(num_messages),
schemas(schemas),
default_instances(default_instances),
offsets(offsets),
file_level_metadata(file_level_metadata),
file_level_enum_descriptors(file_level_enum_descriptors),
file_level_service_descriptors(file_level_service_descriptors) {}
};
// AssignDescriptors() pulls the compiled FileDescriptor from the DescriptorPool

Loading…
Cancel
Save