Minor refactor the ClassData/TcParseTable. Put the prototype in ClassData and

make the TcParseTable point to the ClassData.
This will allow the parser to use more information from the class in the
future.

PiperOrigin-RevId: 648377537
pull/17274/head
Protobuf Team Bot 8 months ago committed by Copybara-Service
parent 47f633eae6
commit ff5b0b4f0f
  1. 7
      src/google/protobuf/compiler/cpp/message.cc
  2. 2
      src/google/protobuf/compiler/cpp/parse_function_generator.cc
  3. 3
      src/google/protobuf/compiler/java/java_features.pb.cc
  4. 12
      src/google/protobuf/compiler/plugin.pb.cc
  5. 3
      src/google/protobuf/cpp_features.pb.cc
  6. 99
      src/google/protobuf/descriptor.pb.cc
  7. 20
      src/google/protobuf/dynamic_message.cc
  8. 2
      src/google/protobuf/generated_message_reflection.cc
  9. 15
      src/google/protobuf/generated_message_tctable_decl.h
  10. 9
      src/google/protobuf/generated_message_tctable_impl.h
  11. 4
      src/google/protobuf/generated_message_tctable_lite.cc
  12. 10
      src/google/protobuf/implicit_weak_message.cc
  13. 2
      src/google/protobuf/implicit_weak_message.h
  14. 2
      src/google/protobuf/inlined_string_field_unittest.cc
  15. 12
      src/google/protobuf/message_lite.h

@ -3657,6 +3657,11 @@ void MessageGenerator::GenerateSwap(io::Printer* p) {
}
void MessageGenerator::GenerateClassData(io::Printer* p) {
auto vars = p->WithVars(
{{"default_instance",
absl::StrCat("&", DefaultInstanceName(descriptor_, options_),
"._instance")}});
const auto on_demand_register_arena_dtor = [&] {
if (NeedsArenaDestructor() == ArenaDtorNeeds::kOnDemand) {
p->Emit(R"cc(
@ -3742,6 +3747,7 @@ void MessageGenerator::GenerateClassData(io::Printer* p) {
const ::$proto_ns$::MessageLite::ClassDataFull
$classname$::_class_data_ = {
$superclass$::ClassData{
$default_instance$,
&_table_.header,
$on_demand_register_arena_dtor$,
$is_initialized$,
@ -3779,6 +3785,7 @@ void MessageGenerator::GenerateClassData(io::Printer* p) {
const ::$proto_ns$::MessageLite::ClassDataLite<$type_size$>
$classname$::_class_data_ = {
{
$default_instance$,
&_table_.header,
$on_demand_register_arena_dtor$,
$is_initialized$,

@ -317,7 +317,7 @@ void ParseFunctionGenerator::GenerateTailCallTable(io::Printer* printer) {
} else {
format("offsetof(decltype(_table_), aux_entries),\n");
}
format("&$1$._instance,\n", DefaultInstanceName(descriptor_, options_));
format("_class_data_.base(),\n");
if (NeedsPostLoopHandler(descriptor_, options_)) {
printer->Emit(R"cc(
&$classname$::PostLoopHandler,

@ -198,6 +198,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
JavaFeatures::_class_data_ = {
::google::protobuf::Message::ClassData{
&_JavaFeatures_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -233,7 +234,7 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> JavaFeatures::_table_ = {
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_JavaFeatures_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -396,6 +396,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
Version::_class_data_ = {
::google::protobuf::Message::ClassData{
&_Version_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -431,7 +432,7 @@ const ::_pbi::TcParseTable<2, 4, 0, 47, 2> Version::_table_ = {
4, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_Version_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -716,6 +717,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
CodeGeneratorRequest::_class_data_ = {
::google::protobuf::Message::ClassData{
&_CodeGeneratorRequest_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
CodeGeneratorRequest::IsInitializedImpl,
@ -751,7 +753,7 @@ const ::_pbi::TcParseTable<3, 5, 3, 79, 2> CodeGeneratorRequest::_table_ = {
5, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_CodeGeneratorRequest_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -1089,6 +1091,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
CodeGeneratorResponse_File::_class_data_ = {
::google::protobuf::Message::ClassData{
&_CodeGeneratorResponse_File_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -1124,7 +1127,7 @@ const ::_pbi::TcParseTable<2, 4, 1, 86, 2> CodeGeneratorResponse_File::_table_ =
4, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_CodeGeneratorResponse_File_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -1418,6 +1421,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
CodeGeneratorResponse::_class_data_ = {
::google::protobuf::Message::ClassData{
&_CodeGeneratorResponse_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -1453,7 +1457,7 @@ const ::_pbi::TcParseTable<3, 5, 1, 60, 2> CodeGeneratorResponse::_table_ = {
5, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_CodeGeneratorResponse_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -193,6 +193,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
CppFeatures::_class_data_ = {
::google::protobuf::Message::ClassData{
&_CppFeatures_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -228,7 +229,7 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> CppFeatures::_table_ = {
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_CppFeatures_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -2660,6 +2660,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FileDescriptorSet::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FileDescriptorSet_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FileDescriptorSet::IsInitializedImpl,
@ -2694,7 +2695,7 @@ constexpr ::_pbi::TcParseTable<0, 1, 1, 0, 2> FileDescriptorSet::_table_ = {
1, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FileDescriptorSet_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -2916,6 +2917,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FileDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FileDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FileDescriptorProto::IsInitializedImpl,
@ -2950,7 +2952,7 @@ constexpr ::_pbi::TcParseTable<4, 13, 7, 79, 2> FileDescriptorProto::_table_ = {
13, // num_field_entries
7, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FileDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -3518,6 +3520,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
DescriptorProto_ExtensionRange::_class_data_ = {
::google::protobuf::Message::ClassData{
&_DescriptorProto_ExtensionRange_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
DescriptorProto_ExtensionRange::IsInitializedImpl,
@ -3552,7 +3555,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 1, 0, 2> DescriptorProto_ExtensionRange::_t
3, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_DescriptorProto_ExtensionRange_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -3791,6 +3794,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
DescriptorProto_ReservedRange::_class_data_ = {
::google::protobuf::Message::ClassData{
&_DescriptorProto_ReservedRange_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -3825,7 +3829,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 0, 0, 2> DescriptorProto_ReservedRange::_ta
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_DescriptorProto_ReservedRange_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -4060,6 +4064,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
DescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_DescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
DescriptorProto::IsInitializedImpl,
@ -4094,7 +4099,7 @@ constexpr ::_pbi::TcParseTable<4, 10, 8, 65, 2> DescriptorProto::_table_ = {
10, // num_field_entries
8, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_DescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -4592,6 +4597,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
ExtensionRangeOptions_Declaration::_class_data_ = {
::google::protobuf::Message::ClassData{
&_ExtensionRangeOptions_Declaration_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -4626,7 +4632,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 71, 2> ExtensionRangeOptions_Declaration
5, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_ExtensionRangeOptions_Declaration_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -4933,6 +4939,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
ExtensionRangeOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_ExtensionRangeOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
ExtensionRangeOptions::IsInitializedImpl,
@ -4967,7 +4974,7 @@ constexpr ::_pbi::TcParseTable<3, 4, 4, 0, 12> ExtensionRangeOptions::_table_ =
4, // num_field_entries
4, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_ExtensionRangeOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -5307,6 +5314,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FieldDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FieldDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FieldDescriptorProto::IsInitializedImpl,
@ -5341,7 +5349,7 @@ constexpr ::_pbi::TcParseTable<4, 11, 3, 96, 2> FieldDescriptorProto::_table_ =
11, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FieldDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -5816,6 +5824,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
OneofDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_OneofDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
OneofDescriptorProto::IsInitializedImpl,
@ -5850,7 +5859,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 1, 49, 2> OneofDescriptorProto::_table_ = {
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_OneofDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -6069,6 +6078,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
EnumDescriptorProto_EnumReservedRange::_class_data_ = {
::google::protobuf::Message::ClassData{
&_EnumDescriptorProto_EnumReservedRange_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -6103,7 +6113,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 0, 0, 2> EnumDescriptorProto_EnumReservedRa
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_EnumDescriptorProto_EnumReservedRange_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -6328,6 +6338,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
EnumDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_EnumDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
EnumDescriptorProto::IsInitializedImpl,
@ -6362,7 +6373,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 3, 61, 2> EnumDescriptorProto::_table_ = {
5, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_EnumDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -6698,6 +6709,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
EnumValueDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_EnumValueDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
EnumValueDescriptorProto::IsInitializedImpl,
@ -6732,7 +6744,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 1, 53, 2> EnumValueDescriptorProto::_table_
3, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_EnumValueDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -7001,6 +7013,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
ServiceDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_ServiceDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
ServiceDescriptorProto::IsInitializedImpl,
@ -7035,7 +7048,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 2, 51, 2> ServiceDescriptorProto::_table_ =
3, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_ServiceDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -7326,6 +7339,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
MethodDescriptorProto::_class_data_ = {
::google::protobuf::Message::ClassData{
&_MethodDescriptorProto_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
MethodDescriptorProto::IsInitializedImpl,
@ -7360,7 +7374,7 @@ constexpr ::_pbi::TcParseTable<3, 6, 1, 71, 2> MethodDescriptorProto::_table_ =
6, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_MethodDescriptorProto_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -7749,6 +7763,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FileOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FileOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FileOptions::IsInitializedImpl,
@ -7783,7 +7798,7 @@ constexpr ::_pbi::TcParseTable<5, 21, 3, 202, 12> FileOptions::_table_ = {
21, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FileOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -8538,6 +8553,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
MessageOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_MessageOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
MessageOptions::IsInitializedImpl,
@ -8572,7 +8588,7 @@ constexpr ::_pbi::TcParseTable<3, 7, 2, 0, 7> MessageOptions::_table_ = {
7, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_MessageOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -8927,6 +8943,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FieldOptions_EditionDefault::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FieldOptions_EditionDefault_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -8961,7 +8978,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 1, 57, 2> FieldOptions_EditionDefault::_tab
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FieldOptions_EditionDefault_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -9188,6 +9205,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FieldOptions_FeatureSupport::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FieldOptions_FeatureSupport_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -9222,7 +9240,7 @@ constexpr ::_pbi::TcParseTable<2, 4, 3, 71, 2> FieldOptions_FeatureSupport::_tab
4, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FieldOptions_FeatureSupport_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -9517,6 +9535,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FieldOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FieldOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FieldOptions::IsInitializedImpl,
@ -9551,7 +9570,7 @@ constexpr ::_pbi::TcParseTable<4, 14, 8, 0, 7> FieldOptions::_table_ = {
14, // num_field_entries
8, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FieldOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -10096,6 +10115,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
OneofOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_OneofOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
OneofOptions::IsInitializedImpl,
@ -10130,7 +10150,7 @@ constexpr ::_pbi::TcParseTable<2, 2, 2, 0, 7> OneofOptions::_table_ = {
2, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_OneofOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -10396,6 +10416,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
EnumOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_EnumOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
EnumOptions::IsInitializedImpl,
@ -10430,7 +10451,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 2, 0, 7> EnumOptions::_table_ = {
5, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_EnumOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -10769,6 +10790,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
EnumValueOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_EnumValueOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
EnumValueOptions::IsInitializedImpl,
@ -10803,7 +10825,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 3, 0, 7> EnumValueOptions::_table_ = {
5, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_EnumValueOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -11147,6 +11169,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
ServiceOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_ServiceOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
ServiceOptions::IsInitializedImpl,
@ -11181,7 +11204,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 2, 0, 12> ServiceOptions::_table_ = {
3, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_ServiceOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -11475,6 +11498,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
MethodOptions::_class_data_ = {
::google::protobuf::Message::ClassData{
&_MethodOptions_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
MethodOptions::IsInitializedImpl,
@ -11509,7 +11533,7 @@ constexpr ::_pbi::TcParseTable<3, 4, 3, 0, 12> MethodOptions::_table_ = {
4, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_MethodOptions_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -11817,6 +11841,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
UninterpretedOption_NamePart::_class_data_ = {
::google::protobuf::Message::ClassData{
&_UninterpretedOption_NamePart_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
UninterpretedOption_NamePart::IsInitializedImpl,
@ -11851,7 +11876,7 @@ constexpr ::_pbi::TcParseTable<1, 2, 0, 62, 2> UninterpretedOption_NamePart::_ta
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_UninterpretedOption_NamePart_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -12093,6 +12118,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
UninterpretedOption::_class_data_ = {
::google::protobuf::Message::ClassData{
&_UninterpretedOption_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
UninterpretedOption::IsInitializedImpl,
@ -12127,7 +12153,7 @@ constexpr ::_pbi::TcParseTable<3, 7, 1, 75, 2> UninterpretedOption::_table_ = {
7, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_UninterpretedOption_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -12495,6 +12521,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FeatureSet::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FeatureSet_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FeatureSet::IsInitializedImpl,
@ -12529,7 +12556,7 @@ constexpr ::_pbi::TcParseTable<3, 6, 6, 0, 2> FeatureSet::_table_ = {
6, // num_field_entries
6, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FeatureSet_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -12862,6 +12889,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FeatureSetDefaults_FeatureSetEditionDefault::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FeatureSetDefaults_FeatureSetEditionDefault_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FeatureSetDefaults_FeatureSetEditionDefault::IsInitializedImpl,
@ -12896,7 +12924,7 @@ constexpr ::_pbi::TcParseTable<2, 3, 3, 0, 2> FeatureSetDefaults_FeatureSetEditi
3, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FeatureSetDefaults_FeatureSetEditionDefault_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -13173,6 +13201,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
FeatureSetDefaults::_class_data_ = {
::google::protobuf::Message::ClassData{
&_FeatureSetDefaults_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
FeatureSetDefaults::IsInitializedImpl,
@ -13207,7 +13236,7 @@ constexpr ::_pbi::TcParseTable<1, 3, 3, 0, 2> FeatureSetDefaults::_table_ = {
3, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_FeatureSetDefaults_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -13469,6 +13498,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
SourceCodeInfo_Location::_class_data_ = {
::google::protobuf::Message::ClassData{
&_SourceCodeInfo_Location_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -13503,7 +13533,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 0, 106, 2> SourceCodeInfo_Location::_table_
5, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_SourceCodeInfo_Location_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -13810,6 +13840,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
SourceCodeInfo::_class_data_ = {
::google::protobuf::Message::ClassData{
&_SourceCodeInfo_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -13844,7 +13875,7 @@ constexpr ::_pbi::TcParseTable<0, 1, 1, 0, 2> SourceCodeInfo::_table_ = {
1, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_SourceCodeInfo_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -14040,6 +14071,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
GeneratedCodeInfo_Annotation::_class_data_ = {
::google::protobuf::Message::ClassData{
&_GeneratedCodeInfo_Annotation_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -14074,7 +14106,7 @@ constexpr ::_pbi::TcParseTable<3, 5, 1, 64, 2> GeneratedCodeInfo_Annotation::_ta
5, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_GeneratedCodeInfo_Annotation_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -14369,6 +14401,7 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::MessageLite::ClassDataFull
GeneratedCodeInfo::_class_data_ = {
::google::protobuf::Message::ClassData{
&_GeneratedCodeInfo_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
@ -14403,7 +14436,7 @@ constexpr ::_pbi::TcParseTable<0, 1, 1, 0, 2> GeneratedCodeInfo::_table_ = {
1, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_GeneratedCodeInfo_default_instance_._instance,
_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -263,15 +263,11 @@ struct DynamicMessageFactory::TypeInfo {
// important (the prototype must be deleted *before* the offsets).
std::unique_ptr<uint32_t[]> offsets;
std::unique_ptr<uint32_t[]> has_bits_indices;
// Don't use a unique_ptr to hold the prototype: the destructor for
// DynamicMessage needs to know whether it is the prototype, and does so by
// looking back at this field. This would assume details about the
// implementation of unique_ptr.
const DynamicMessage* prototype;
int weak_field_map_offset; // The offset for the weak_field_map;
DynamicMessage::ClassDataFull class_data = {
DynamicMessage::ClassData{
nullptr, // default_instance
nullptr, // tc_table
nullptr, // on_demand_register_arena_dtor
&DynamicMessage::IsInitializedImpl,
@ -289,10 +285,10 @@ struct DynamicMessageFactory::TypeInfo {
nullptr, // get_metadata_tracker
};
TypeInfo() : prototype(nullptr) {}
TypeInfo() = default;
~TypeInfo() {
delete prototype;
delete class_data.prototype;
delete class_data.reflection;
auto* type = class_data.descriptor;
@ -337,7 +333,7 @@ DynamicMessage::DynamicMessage(DynamicMessageFactory::TypeInfo* type_info,
// created, which needs the address of the prototype of Foo (the value in
// map). To break the cyclic dependency, we have to assign the address of
// prototype into type_info first.
type_info->prototype = this;
type_info->class_data.prototype = this;
SharedCtor(lock_factory);
}
@ -467,10 +463,10 @@ void DynamicMessage::SharedCtor(bool lock_factory) {
}
bool DynamicMessage::is_prototype() const {
return type_info_->prototype == this ||
return type_info_->class_data.prototype == this ||
// If type_info_->prototype is nullptr, then we must be constructing
// the prototype now, which means we must be the prototype.
type_info_->prototype == nullptr;
type_info_->class_data.prototype == nullptr;
}
#if defined(__cpp_lib_destroying_delete) && defined(__cpp_sized_deallocation)
@ -659,7 +655,7 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock(
const TypeInfo** target = &prototypes_[type];
if (*target != nullptr) {
// Already exists.
return (*target)->prototype;
return static_cast<const Message*>((*target)->class_data.prototype);
}
TypeInfo* type_info = new TypeInfo;
@ -784,7 +780,7 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock(
DynamicMessage* prototype = new (base) DynamicMessage(type_info, false);
internal::ReflectionSchema schema = {
type_info->prototype,
static_cast<const Message*>(type_info->class_data.prototype),
type_info->offsets.get(),
type_info->has_bits_indices.get(),
type_info->has_bits_offset,

@ -3455,7 +3455,7 @@ const internal::TcParseTableBase* Reflection::CreateTcParseTable() const {
static_cast<uint16_t>(fields.size()),
static_cast<uint16_t>(table_info.aux_entries.size()),
aux_offset,
schema_.default_instance_,
schema_.default_instance_->GetClassData(),
nullptr,
GetFastParseFunction(table_info.fallback_function)
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -284,7 +284,7 @@ struct alignas(uint64_t) TcParseTableBase {
uint16_t num_aux_entries;
uint32_t aux_offset;
const MessageLite* default_instance;
const MessageLite::ClassData* class_data;
using PostLoopHandler = const char* (*)(MessageLite* msg, const char* ptr,
ParseContext* ctx);
PostLoopHandler post_loop_handler;
@ -309,7 +309,7 @@ struct alignas(uint64_t) TcParseTableBase {
uint32_t field_entries_offset,
uint16_t num_field_entries,
uint16_t num_aux_entries, uint32_t aux_offset,
const MessageLite* default_instance,
const MessageLite::ClassData* class_data,
PostLoopHandler post_loop_handler,
TailCallParseFunc fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -328,7 +328,7 @@ struct alignas(uint64_t) TcParseTableBase {
num_field_entries(num_field_entries),
num_aux_entries(num_aux_entries),
aux_offset(aux_offset),
default_instance(default_instance),
class_data(class_data),
post_loop_handler(post_loop_handler),
fallback(fallback)
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
@ -473,6 +473,8 @@ struct alignas(uint64_t) TcParseTableBase {
aux_offset +
num_aux_entries * sizeof(FieldAux));
}
const MessageLite* default_instance() const { return class_data->prototype; }
};
#if defined(_MSC_VER) && !defined(_WIN64)
@ -549,9 +551,10 @@ PROTOBUF_CC const char* StubParseImpl(PROTOBUF_TC_PARAM_DECL) {
}
template <typename T,
PROTOBUF_CC const char* (*func)(T*, const char*, ParseContext*)>
PROTOBUF_CC const char* (*func)(T*, const char*, ParseContext*),
typename ClassData>
constexpr TcParseTable<0> CreateStubTcParseTable(
const MessageLite* default_instance,
const ClassData* class_data,
TcParseTableBase::PostLoopHandler post_loop_handler = nullptr) {
return {
{
@ -565,7 +568,7 @@ constexpr TcParseTable<0> CreateStubTcParseTable(
0, // num_field_entries
0, // num_aux_entries
0, // aux_offset
default_instance, //
class_data, //
post_loop_handler, //
nullptr, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE

@ -927,9 +927,10 @@ class PROTOBUF_EXPORT TcParser final {
// it will be handled just like if it was an unknown extension: sent to
// the unknown field set.
return RefAt<ExtensionSet>(msg, table->extension_offset)
.ParseField(tag, ptr,
static_cast<const MessageBaseT*>(table->default_instance),
&msg->_internal_metadata_, ctx);
.ParseField(
tag, ptr,
static_cast<const MessageBaseT*>(table->default_instance()),
&msg->_internal_metadata_, ctx);
} else {
// Otherwise, we directly put it on the unknown field set.
return UnknownFieldParse(
@ -944,7 +945,7 @@ class PROTOBUF_EXPORT TcParser final {
PROTOBUF_TC_PARAM_NO_DATA_DECL) {
return RefAt<ExtensionSet>(msg, table->extension_offset)
.ParseMessageSet(
ptr, static_cast<const MessageBaseT*>(table->default_instance),
ptr, static_cast<const MessageBaseT*>(table->default_instance()),
&msg->_internal_metadata_, ctx);
}

@ -353,7 +353,7 @@ PROTOBUF_NOINLINE const char* TcParser::FastEndG2(PROTOBUF_TC_PARAM_DECL) {
inline PROTOBUF_ALWAYS_INLINE MessageLite* TcParser::NewMessage(
const TcParseTableBase* table, Arena* arena) {
return table->default_instance->New(arena);
return table->default_instance()->New(arena);
}
MessageLite* TcParser::AddMessage(const TcParseTableBase* table,
@ -1682,7 +1682,7 @@ void* TcParser::MaybeGetSplitBase(MessageLite* msg, const bool is_split,
if (is_split) {
const uint32_t split_offset = GetSplitOffset(table);
void* default_split =
TcParser::RefAt<void*>(table->default_instance, split_offset);
TcParser::RefAt<void*>(table->default_instance(), split_offset);
void*& split = TcParser::RefAt<void*>(msg, split_offset);
if (split == default_split) {
// Allocate split instance when needed.

@ -58,14 +58,14 @@ const ImplicitWeakMessage& ImplicitWeakMessage::default_instance() {
return implicit_weak_message_default_instance.instance;
}
static const auto table =
internal::CreateStubTcParseTable<ImplicitWeakMessage,
ImplicitWeakMessage::ParseImpl>(
&implicit_weak_message_default_instance.instance);
const TcParseTable<0> ImplicitWeakMessage::table_ =
internal::CreateStubTcParseTable<ImplicitWeakMessage, ParseImpl>(
class_data_.base());
constexpr MessageLite::ClassDataLite<1> ImplicitWeakMessage::class_data_ = {
{
&table.header,
&implicit_weak_message_default_instance.instance,
&table_.header,
nullptr, // on_demand_register_arena_dtor
nullptr, // is_initialized (always true)
MergeImpl,

@ -12,6 +12,7 @@
#include <string>
#include "google/protobuf/arena.h"
#include "google/protobuf/generated_message_tctable_decl.h"
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/message_lite.h"
#include "google/protobuf/repeated_field.h"
@ -85,6 +86,7 @@ class PROTOBUF_EXPORT ImplicitWeakMessage final : public MessageLite {
const char* ptr, ParseContext* ctx);
private:
static const TcParseTable<0> table_;
static const ClassDataLite<1> class_data_;
static void MergeImpl(MessageLite&, const MessageLite&);

@ -38,3 +38,5 @@ namespace {
} // namespace
} // namespace protobuf
} // namespace google
#include "google/protobuf/port_undef.inc"

@ -631,6 +631,7 @@ class PROTOBUF_EXPORT MessageLite {
using NewMessageF = void* (*)(const void* prototype, Arena* arena);
using DeleteMessageF = void (*)(void* msg, bool free_memory);
struct ClassData {
const MessageLite* prototype;
const internal::TcParseTableBase* tc_table;
void (*on_demand_register_arena_dtor)(MessageLite& msg, Arena& arena);
bool (*is_initialized)(const MessageLite&);
@ -654,14 +655,16 @@ class PROTOBUF_EXPORT MessageLite {
// In normal mode we have the small constructor to avoid the cost in
// codegen.
#if !defined(PROTOBUF_CUSTOM_VTABLE)
constexpr ClassData(const internal::TcParseTableBase* tc_table,
constexpr ClassData(const MessageLite* prototype,
const internal::TcParseTableBase* tc_table,
void (*on_demand_register_arena_dtor)(MessageLite&,
Arena&),
bool (*is_initialized)(const MessageLite&),
void (*merge_to_from)(MessageLite& to,
const MessageLite& from_msg),
uint32_t cached_size_offset, bool is_lite)
: tc_table(tc_table),
: prototype(prototype),
tc_table(tc_table),
on_demand_register_arena_dtor(on_demand_register_arena_dtor),
is_initialized(is_initialized),
merge_to_from(merge_to_from),
@ -672,6 +675,7 @@ class PROTOBUF_EXPORT MessageLite {
// But we always provide the full constructor even in normal mode to make
// helper code simpler.
constexpr ClassData(
const MessageLite* prototype,
const internal::TcParseTableBase* tc_table,
void (*on_demand_register_arena_dtor)(MessageLite&, Arena&),
bool (*is_initialized)(const MessageLite&),
@ -683,7 +687,8 @@ class PROTOBUF_EXPORT MessageLite {
uint8_t* (*serialize)(const MessageLite& msg, uint8_t* ptr,
io::EpsCopyOutputStream* stream),
uint32_t cached_size_offset, bool is_lite)
: tc_table(tc_table),
: prototype(prototype),
tc_table(tc_table),
on_demand_register_arena_dtor(on_demand_register_arena_dtor),
is_initialized(is_initialized),
merge_to_from(merge_to_from),
@ -839,6 +844,7 @@ class PROTOBUF_EXPORT MessageLite {
friend class internal::LazyField;
friend class internal::SwapFieldHelper;
friend class internal::TcParser;
friend struct internal::TcParseTableBase;
friend class internal::UntypedMapBase;
friend class internal::WeakFieldMap;
friend class internal::WireFormatLite;

Loading…
Cancel
Save