aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2024-06-30 20:16:52 +0300
committermikhnenko <mikhnenko@yandex-team.com>2024-06-30 20:28:14 +0300
commitb91a38fe11269c505fec071351a68e568768e6e8 (patch)
tree07d43bf92eee00e2fce98bdbf698f135386995c1 /contrib
parentb21e05a2e32e36ae9cc9826acf98084ca4b52d7d (diff)
downloadydb-b91a38fe11269c505fec071351a68e568768e6e8.tar.gz
Update protobuf to 3.21.2
a628f0376085fcf46dc6d24629f2a7dacb91ae79
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/protobuf/CHANGES.txt187
-rw-r--r--contrib/libs/protobuf/CONTRIBUTING.md12
-rw-r--r--contrib/libs/protobuf/README.md3
-rw-r--r--contrib/libs/protobuf/src/README.md4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.pb.cc114
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/any.pb.h77
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/api.pb.cc534
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/api.pb.h309
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arena.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arena_impl.h21
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arenastring.cc6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arenastring.h27
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/arenaz_sampler.cc4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.cc135
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc4729
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h3899
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/descriptor.proto12
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/duration.pb.cc85
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/duration.pb.h35
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/empty.pb.cc3
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/empty.pb.h10
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/empty.proto1
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/endian.h198
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set.cc90
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set.h75
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/extension_set_inl.h27
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc64
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h51
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_bases.cc8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_bases.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc56
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h3
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_impl.h7
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_lite.cc147
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h54
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc80
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/map.h146
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message.cc35
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message.h28
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message_lite.cc8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message_lite.h11
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/metadata_lite.h27
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/parse_context.cc14
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/parse_context.h104
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/port_def.inc84
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/port_undef.inc13
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/repeated_field.h21
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.h75
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc71
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/source_context.pb.h39
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/struct.pb.cc229
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/struct.pb.h195
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/common.cc14
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/common.h8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc20
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/int128.h78
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/port.h108
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/structurally_valid.cc74
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc88
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h90
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/time.cc46
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/stubs/time.h14
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/text_format.cc26
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/text_format.h18
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc85
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h35
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/type.pb.cc831
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/type.pb.h515
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc15
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc18
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc6
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/json_util.cc14
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/json_util.h7
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h8
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/time_util.cc17
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/util/time_util.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format.cc26
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h28
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc534
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h235
-rw-r--r--contrib/libs/protobuf/ya.make4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/code_generator.h4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/command_line_interface.cc20
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.h1027
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum.cc)6
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum_field.cc)75
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum_field.h)19
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/extension.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_extension.cc)6
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/extension.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_extension.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_field.cc)58
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_field.h)39
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/file.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc)83
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/file.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.h)6
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_generator.cc)14
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_generator.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.cc)140
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.h1065
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/map_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_map_field.cc)43
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/map_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_map_field.h)9
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/message.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message.cc)830
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/message.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message.h)20
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_field.cc)80
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_field.h)13
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_layout_helper.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/names.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_names.h)10
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/options.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_options.h)5
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/padding_optimizer.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc)4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/padding_optimizer.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/parse_function_generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc)64
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/parse_function_generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.h)4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/primitive_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc)79
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/primitive_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_primitive_field.h)19
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/service.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_service.cc)4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/service.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_service.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/string_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_string_field.cc)98
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/cpp/string_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_string_field.h)14
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.cc2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.cc7
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.h1
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.cc7
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_map_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message.cc12
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.cc4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/context.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_context.cc)8
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/context.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_context.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/doc_comment.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_doc_comment.cc)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/doc_comment.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_doc_comment.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum.cc)15
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field.cc)39
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field_lite.cc)37
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_lite.cc)10
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/enum_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_lite.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/extension.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension.cc)15
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/extension.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/extension_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension_lite.cc)15
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/extension_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_field.cc)26
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_field.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/file.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_file.cc)29
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/file.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_file.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator.cc)14
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/generator_factory.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator_factory.cc)20
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/generator_factory.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator_factory.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/helpers.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_helpers.cc)36
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/helpers.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_helpers.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/kotlin_generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_kotlin_generator.cc)10
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/kotlin_generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_kotlin_generator.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/map_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field.cc)29
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/map_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/map_field_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field_lite.cc)29
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/map_field_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message.cc)65
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder.cc)21
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder_lite.cc)21
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field.cc)39
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_field_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field_lite.cc)39
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_field_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_lite.cc)65
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/message_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_lite.h)7
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/name_resolver.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_name_resolver.cc)11
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/name_resolver.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_name_resolver.h)5
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/names.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_names.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/options.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_options.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field.cc)32
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field_lite.cc)32
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/service.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_service.cc)15
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/service.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_service.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/shared_code_generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_shared_code_generator.cc)8
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/shared_code_generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_shared_code_generator.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/string_field.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field.cc)32
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/string_field.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/string_field_lite.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field_lite.cc)34
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/java/string_field_lite.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field_lite.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.cc3937
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.h336
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.cc270
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.h43
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/main.cc16
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc1
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc1
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.h10
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.cc136
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.h27
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_generator.cc3
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_map_field.h2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message.cc2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc1
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.h4
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h8
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/parser.cc118
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/parser.h6
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/php/php_generator.cc129
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/plugin.cc3
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.cc640
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.h522
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/python/generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/python/python_generator.cc)17
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/python/generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/python/python_generator.h)2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/python/helpers.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/python/python_helpers.cc)6
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/python/helpers.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/python/python_helpers.h)0
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/python/pyi_generator.cc (renamed from contrib/libs/protoc/src/google/protobuf/compiler/python/python_pyi_generator.cc)216
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/python/pyi_generator.h (renamed from contrib/libs/protoc/src/google/protobuf/compiler/python/python_pyi_generator.h)30
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/ruby/ruby_generator.cc2
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/subprocess.cc14
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/zip_writer.h4
-rw-r--r--contrib/libs/protoc/ya.make100
238 files changed, 12428 insertions, 14078 deletions
diff --git a/contrib/libs/protobuf/CHANGES.txt b/contrib/libs/protobuf/CHANGES.txt
index 61ab0b8994..9fc608eded 100644
--- a/contrib/libs/protobuf/CHANGES.txt
+++ b/contrib/libs/protobuf/CHANGES.txt
@@ -1,16 +1,185 @@
-2022-09-13 version 20.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+2022-07-19 version 21.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+ C++
+ * Add header search paths to Protobuf-C++.podspec (#10024)
+ * Fixed Visual Studio constinit errors (#10232)
+ * Fix #9947: make the ABI compatible between debug and non-debug builds (#10271)
+
+ UPB
+ * Allow empty package names (fixes behavior regression in 4.21.0)
+ * Fix a SEGV bug when comparing a non-materialized sub-message (#10208)
+ * Fix several bugs in descriptor mapping containers (eg. descriptor.services_by_name)
+ * for x in mapping now yields keys rather than values, to match Python conventions and the behavior of the old library.
+ * Lookup operations now correctly reject unhashable types as map keys.
+ * We implement repr() to use the same format as dict.
+ * Fix maps to use the ScalarMapContainer class when appropriate
+ * Fix bug when parsing an unknown value in a proto2 enum extension (protocolbuffers/upb#717)
+
+ PHP
+ * Add "readonly" as a keyword for PHP and add previous classnames to descriptor pool (#10041)
+
+ Python
+ * Make //:protobuf_python and //:well_known_types_py_pb2 public (#10118)
+
+ Bazel
+ * Add back a filegroup for :well_known_protos (#10061)
+
+2022-06-27 version 21.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+ C++
+ * ArenaString improvements (fix alignment issue)
+
+ PHP
+ * API changes for OneOf (#10102)
+
+
+2022-05-27 version 21.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+
+ C++
+ * cmake: Revert "Fix cmake install targets (#9822)" (#10060)
+ * Remove Abseil dependency from CMake build (#10056)
+
+ Python
+ * Update python wheel metadata with more information incl. required python version (#10058)
+ * Fix segmentation fault when instantiating field via repeated field assignment (#10066)
+
+2022-05-25 version 21.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+
+ C++
+ * cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)
+ * Escape GetObject macro inside protoc-generated code (#9739)
+ * Update CMake configuration to add a dependency on Abseil (#9793)
+ * Fix cmake install targets (#9822)
+ * Use __constinit only in GCC 12.2 and up (#9936)
+
+ Java
+ * Update protobuf_version.bzl to separate protoc and per-language java … (#9900)
+
+ Python
+ * Increment python major version to 4 in version.json for python upb (#9926)
+ * The C extension module for Python has been rewritten to use the upb library.
+ This is expected to deliver significant performance benefits, especially when
+ parsing large payloads. There are some minor breaking changes, but these
+ should not impact most users. For more information see:
+ https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
+ * Fixed win32 build and fixed str(message) on all Windows platforms. (#9976)
+ * The binary wheel for macOS now supports Apple silicon.
+
+ PHP
+ * [PHP] fix PHP build system (#9571)
+ * Fix building packaged PHP extension (#9727)
+ * fix: reserve "ReadOnly" keyword for PHP 8.1 and add compatibility (#9633)
+ * fix: phpdoc syntax for repeatedfield parameters (#9784)
+ * fix: phpdoc for repeatedfield (#9783)
+ * Change enum string name for reserved words (#9780)
+ * chore: [PHP] fix phpdoc for MapField keys (#9536)
+ * Fixed PHP SEGV by not writing to shared memory for zend_class_entry. (#9996)
+
+ Ruby
+ * Allow pre-compiled binaries for ruby 3.1.0 (#9566)
+ * Implement `respond_to?` in RubyMessage (#9677)
+ * [Ruby] Fix RepeatedField#last, #first inconsistencies (#9722)
+ * Do not use range based UTF-8 validation in truffleruby (#9769)
+ * Improve range handling logic of `RepeatedField` (#9799)
+ * Support x64-mingw-ucrt platform
+
+ Other
+ * [Kotlin] remove redundant public modifiers for compiled code (#9642)
+ * [C#] Update GetExtension to support getting typed value (#9655)
+ * Fix invalid dependency manifest when using `descriptor_set_out` (#9647)
+ * Fix C# generator handling of a field named "none" in a oneof (#9636)
+ * Add initial version.json file for 21-dev (#9840)
+ * Remove duplicate java generated code (#9909)
+ * Cherry-pick PR #9981 into 21.x branch (#10000)
+
+2022-05-19 version 21.0-rc2(C++/Java/Python/PHP/Objective-C/C#/Ruby)
+
+ Python
+ * Fix windows builds
+ * Throw more helpful error if generated code is out of date
+ * Fixed two reference leaks
+
+ Ruby
+ * Support x64-mingw-ucrt platform
+
+ PHP
+ * Fix SEGV by not writing to shared memory for zend_class_entry
+
+ C#
+ * Suppress warning CS8981
+
+ Other
+ * Fix Maven release to release actual osx_aarch64 binary
+ * Fix protoc zips to have the proto files for well known types
+
+2022-05-10 version 21.0-rc1 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
+
+ C++
+ * Rename main cmake/CMakeLists.txt to CMakeLists.txt (#9603)
+ * avoid allocating memory if all extension are cleared (#9345)
+ * cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)
+ * Escape GetObject macro inside protoc-generated code (#9739)
+ * Update CMake configuration to add a dependency on Abseil (#9793)
+ * Use __constinit only in GCC 12.2 and up (#9936)
+ * Refactor generated message class layout
+ * Optimize tokenizer ParseInteger by removing division
+ * Reserve exactly the right amount of capacity in ExtensionSet::MergeFrom
+ * Parse FLT_MAX correctly when represented in JSON
+
+ Java
+ * Update protobuf_version.bzl to separate protoc and per-language java … (#9900)
+ * 6x speedup in ArrayEncoder.writeUInt32NotTag
+
+ Python
+ * Increment python major version to 4 in version.json for python upb (#9926)
+ * The C extension module for Python has been rewritten to use the upb library.
+ This is expected to deliver significant performance benefits, especially when
+ parsing large payloads. There are some minor breaking changes, but these
+ should not impact most users. For more information see:
+ https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
+ * Due to the breaking changes for Python, the major version number for Python
+ has been incremented.
+ * The binary wheel for macOS now supports Apple silicon.
-2022-04-05 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
PHP
+ * chore: [PHP] fix phpdoc for MapField keys (#9536)
+ * [PHP] Remove unnecessary zval initialization (#9600)
+ * [PHP] fix PHP build system (#9571)
* Fix building packaged PHP extension (#9727)
+ * fix: reserve "ReadOnly" keyword for PHP 8.1 and add compatibility (#9633)
+ * fix: phpdoc syntax for repeatedfield parameters (#9784)
+ * fix: phpdoc for repeatedfield (#9783)
+ * Change enum string name for reserved words (#9780)
* Fixed composer.json to only advertise compatibility with PHP 7.0+. (#9819)
Ruby
+ * Allow pre-compiled binaries for ruby 3.1.0 (#9566)
+ * Implement `respond_to?` in RubyMessage (#9677)
+ * [Ruby] Fix RepeatedField#last, #first inconsistencies (#9722)
+ * Do not use range based UTF-8 validation in truffleruby (#9769)
+ * Improve range handling logic of `RepeatedField` (#9799)
* Disable the aarch64 build on macOS until it can be fixed. (#9816)
Other
+ * [Kotlin] remove redundant public modifiers for compiled code (#9642)
+ * [C#] Update GetExtension to support getting typed value (#9655)
+ * Fix invalid dependency manifest when using `descriptor_set_out` (#9647)
+ * Fix C# generator handling of a field named "none" in a oneof (#9636)
+ * Add initial version.json file for 21-dev (#9840)
+ * Remove duplicate java generated code (#9909)
+ * Fix versioning issues in 3.20.0
+
+ Compiler
+ * Protoc outputs the list of suggested field numbers when invalid field
+ numbers are specified in the .proto file.
+ * Require package names to be less than 512 bytes in length
+
+2022-04-21 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
+
+ PHP
+ * Fix building packaged PHP extension (#9727)
+
+ Other
* Fix versioning issues in 3.20.0
2022-03-04 version 3.20.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
@@ -963,11 +1132,11 @@ mistakenly tagged at the wrong commit.
2020-02-14 version 3.11.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
-
+
C#
* Fix latest ArgumentException for C# extensions (#7188)
* Enforce recursion depth checking for unknown fields (#7210)
-
+
Ruby
* Fix wrappers with a zero value (#7195)
* Fix JSON serialization of 0/empty-valued wrapper types (#7198)
@@ -980,13 +1149,13 @@ mistakenly tagged at the wrong commit.
PHP
* Refactored ulong to zend_ulong for php7.4 compatibility (#7147)
* Call register_class before getClass from desc to fix segfault (#7077)
-
+
2019-12-10 version 3.11.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
PHP
* Make c extension portable for php 7.4 (#6968)
-
+
2019-12-02 version 3.11.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
@@ -1062,7 +1231,7 @@ mistakenly tagged at the wrong commit.
* Support 32 bit values for ProtoStreamObjectWriter to Struct.
* Removed the internal-only header coded_stream_inl.h and the internal-only methods defined there.
* Enforced no SWIG wrapping of descriptor_database.h (other headers already had this restriction).
- * Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.
+ * Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.
* Do not convert unknown field name to snake case to accurately report error.
* Fix a UBSAN warnings. (#6333)
* Add podspec for C++ (#6404)
@@ -1096,7 +1265,7 @@ mistakenly tagged at the wrong commit.
* Change the parameter types of binaryReaderFn in ExtensionFieldBinaryInfo to (number, ?, ?).
* Create dates.ts and time_of_days.ts to mirror Java versions. This is a near-identical conversion of c.g.type.util.{Dates,TimeOfDays} respectively.
* Migrate moneys to TypeScript.
-
+
PHP
* Fix incorrect leap day for Timestamp (#6696)
* Initialize well known type values (#6713)
@@ -1110,7 +1279,7 @@ mistakenly tagged at the wrong commit.
* Optimization for layout_init() (#6547)
* Fix for GC of Ruby map frames. (#6533)
* Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)
-
+
Objective C
* Remove OSReadLittle* due to alignment requirements (#6678)
* Don't use unions and instead use memcpy for the type swaps. (#6672)
diff --git a/contrib/libs/protobuf/CONTRIBUTING.md b/contrib/libs/protobuf/CONTRIBUTING.md
index 8ef5dd29c8..a16d63c65f 100644
--- a/contrib/libs/protobuf/CONTRIBUTING.md
+++ b/contrib/libs/protobuf/CONTRIBUTING.md
@@ -53,11 +53,11 @@ conforming.
## Contributing Process
-Most pull requests should go to the master branch and the change will be
+Most pull requests should go to the main branch and the change will be
included in the next major/minor version release (e.g., 3.6.0 release). If you
need to include a bug fix in a patch release (e.g., 3.5.2), make sure it’s
-already merged to master, and then create a pull request cherry-picking the
-commits from master branch to the release branch (e.g., branch 3.5.x).
+already merged to main, and then create a pull request cherry-picking the
+commits from main branch to the release branch (e.g., branch 3.5.x).
For each pull request, a protobuf team member will be assigned to review the
pull request. For minor cleanups, the pull request may be merged right away
@@ -96,9 +96,9 @@ the final release.
of inactivity.
* Maintain clean commit history and use meaningful commit messages. PRs with
messy commit history are difficult to review and won't be merged. Use rebase
- -i upstream/master to curate your commit history and/or to bring in latest
- changes from master (but avoid rebasing in the middle of a code review).
-* Keep your PR up to date with upstream/master (if there are merge conflicts,
+ -i upstream/main to curate your commit history and/or to bring in latest
+ changes from main (but avoid rebasing in the middle of a code review).
+* Keep your PR up to date with upstream/main (if there are merge conflicts,
we can't really merge your change).
* All tests need to be passing before your change can be merged. We recommend
you run tests locally before creating your PR to catch breakages early on.
diff --git a/contrib/libs/protobuf/README.md b/contrib/libs/protobuf/README.md
index 618dc2a775..c2e6575f90 100644
--- a/contrib/libs/protobuf/README.md
+++ b/contrib/libs/protobuf/README.md
@@ -38,7 +38,7 @@ page, check out the maven repo here:
[https://repo1.maven.org/maven2/com/google/protobuf/protoc/](https://repo1.maven.org/maven2/com/google/protobuf/protoc/)
These pre-built binaries are only provided for released versions. If you want
-to use the github master version at HEAD, or you need to modify protobuf code,
+to use the github main version at HEAD, or you need to modify protobuf code,
or you are using C++, it's recommended to build your own protoc binary from
source.
@@ -59,7 +59,6 @@ how to install protobuf runtime for that specific language:
| Python | [python](python) |
| Objective-C | [objectivec](objectivec) |
| C# | [csharp](csharp) |
-| JavaScript | [js](js) |
| Ruby | [ruby](ruby) |
| Go | [protocolbuffers/protobuf-go](https://github.com/protocolbuffers/protobuf-go)|
| PHP | [php](php) |
diff --git a/contrib/libs/protobuf/src/README.md b/contrib/libs/protobuf/src/README.md
index 80e8668d99..cf843d7595 100644
--- a/contrib/libs/protobuf/src/README.md
+++ b/contrib/libs/protobuf/src/README.md
@@ -129,6 +129,10 @@ Mac installations.
sudo /opt/local/bin/port install autoconf automake libtool
+Alternative for Homebrew users:
+
+ brew install autoconf automake libtool
+
Then follow the Unix instructions above.
**Note for cross-compiling**
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.h b/contrib/libs/protobuf/src/google/protobuf/any.h
index dbe7e31012..a9f23bf2a5 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.h
+++ b/contrib/libs/protobuf/src/google/protobuf/any.h
@@ -130,8 +130,8 @@ class PROTOBUF_EXPORT AnyMetadata {
// *full_type_name. Returns false if the type_url does not have a "/"
// in the type url separating the full type name.
//
-// NOTE: this function is available publicly as:
-// google::protobuf::Any() // static method on the generated message type.
+// NOTE: this function is available publicly as a static method on the
+// generated message type: google::protobuf::Any::ParseAnyTypeUrl()
bool ParseAnyTypeUrl(StringPiece type_url, TProtoStringType* full_type_name);
// Get the proto type name and prefix from Any::type_url value. For example,
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.pb.cc b/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
index 709b7f2b5e..4226a72340 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
@@ -26,10 +26,11 @@ namespace _pbi = _pb::internal;
#endif // __llvm__
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Any::Any(
- ::_pbi::ConstantInitialized)
- : type_url_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , _any_metadata_(&type_url_, &value_){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.type_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_._any_metadata_)*/{&_impl_.type_url_, &_impl_.value_}} {}
struct AnyDefaultTypeInternal {
PROTOBUF_CONSTEXPR AnyDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -51,8 +52,8 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_S
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, type_url_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, _impl_.type_url_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Any, _impl_.value_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Any)},
@@ -108,43 +109,57 @@ class Any::_Internal {
Any::Any(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _any_metadata_(&type_url_, &value_) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Any)
}
Any::Any(const Any& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _any_metadata_(&type_url_, &value_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Any* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.type_url_){}
+ , decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_._any_metadata_)*/{&_impl_.type_url_, &_impl_.value_}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- type_url_.InitDefault();
+ _impl_.type_url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_url_.Set("", GetArenaForAllocation());
+ _impl_.type_url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_type_url().empty()) {
- type_url_.Set(from._internal_type_url(),
- GetArenaForAllocation());
+ _this->_impl_.type_url_.Set(from._internal_type_url(),
+ _this->GetArenaForAllocation());
}
- value_.InitDefault();
+ _impl_.value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set("", GetArenaForAllocation());
+ _impl_.value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_value().empty()) {
- value_.Set(from._internal_value(),
- GetArenaForAllocation());
+ _this->_impl_.value_.Set(from._internal_value(),
+ _this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.Any)
}
-inline void Any::SharedCtor() {
-type_url_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_url_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+inline void Any::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.type_url_){}
+ , decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_._any_metadata_)*/{&_impl_.type_url_, &_impl_.value_}
+ };
+ _impl_.type_url_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.type_url_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Any::~Any() {
@@ -158,12 +173,13 @@ Any::~Any() {
inline void Any::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- type_url_.Destroy();
- value_.Destroy();
+ _impl_.type_url_.Destroy();
+ _impl_.value_.Destroy();
+ _impl_._any_metadata_.~AnyMetadata();
}
void Any::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Any::Clear() {
@@ -172,8 +188,8 @@ void Any::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- type_url_.ClearToEmpty();
- value_.ClearToEmpty();
+ _impl_.type_url_.ClearToEmpty();
+ _impl_.value_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -277,35 +293,31 @@ size_t Any::ByteSizeLong() const {
this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Any::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Any::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Any::GetClassData() const { return &_class_data_; }
-void Any::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Any *>(to)->MergeFrom(
- static_cast<const Any &>(from));
-}
-
-void Any::MergeFrom(const Any& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any)
- GOOGLE_DCHECK_NE(&from, this);
+void Any::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Any*>(&to_msg);
+ auto& from = static_cast<const Any&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_type_url().empty()) {
- _internal_set_type_url(from._internal_type_url());
+ _this->_internal_set_type_url(from._internal_type_url());
}
if (!from._internal_value().empty()) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Any::CopyFrom(const Any& from) {
@@ -325,12 +337,12 @@ void Any::InternalSwap(Any* other) {
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &type_url_, lhs_arena,
- &other->type_url_, rhs_arena
+ &_impl_.type_url_, lhs_arena,
+ &other->_impl_.type_url_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &value_, lhs_arena,
- &other->value_, rhs_arena
+ &_impl_.value_, lhs_arena,
+ &other->_impl_.value_, rhs_arena
);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/any.pb.h b/contrib/libs/protobuf/src/google/protobuf/any.pb.h
index 1c07b71241..218d7832bc 100644
--- a/contrib/libs/protobuf/src/google/protobuf/any.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/any.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -109,14 +109,16 @@ class PROTOBUF_EXPORT Any final :
// implements Any -----------------------------------------------
bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
- return _any_metadata_.PackFrom(GetArena(), message);
+ GOOGLE_DCHECK_NE(&message, this);
+ return _impl_._any_metadata_.PackFrom(GetArena(), message);
}
bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
- return _any_metadata_.PackFrom(GetArena(), message, type_url_prefix);
+ GOOGLE_DCHECK_NE(&message, this);
+ return _impl_._any_metadata_.PackFrom(GetArena(), message, type_url_prefix);
}
bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
- return _any_metadata_.UnpackTo(message);
+ return _impl_._any_metadata_.UnpackTo(message);
}
static bool GetAnyFieldDescriptors(
const ::PROTOBUF_NAMESPACE_ID::Message& message,
@@ -124,18 +126,18 @@ class PROTOBUF_EXPORT Any final :
const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
bool PackFrom(const T& message) {
- return _any_metadata_.PackFrom<T>(GetArena(), message);
+ return _impl_._any_metadata_.PackFrom<T>(GetArena(), message);
}
template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
bool PackFrom(const T& message,
::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
- return _any_metadata_.PackFrom<T>(GetArena(), message, type_url_prefix);}
+ return _impl_._any_metadata_.PackFrom<T>(GetArena(), message, type_url_prefix);}
template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
bool UnpackTo(T* message) const {
- return _any_metadata_.UnpackTo<T>(message);
+ return _impl_._any_metadata_.UnpackTo<T>(message);
}
template<typename T> bool Is() const {
- return _any_metadata_.Is<T>();
+ return _impl_._any_metadata_.Is<T>();
}
static bool ParseAnyTypeUrl(::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url,
TProtoStringType* full_type_name);
@@ -169,9 +171,11 @@ class PROTOBUF_EXPORT Any final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Any& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Any& from);
+ void MergeFrom( const Any& from) {
+ Any::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -180,10 +184,10 @@ class PROTOBUF_EXPORT Any final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Any* other);
@@ -246,10 +250,13 @@ class PROTOBUF_EXPORT Any final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
};
// ===================================================================
@@ -265,7 +272,7 @@ class PROTOBUF_EXPORT Any final :
// string type_url = 1;
inline void Any::clear_type_url() {
- type_url_.ClearToEmpty();
+ _impl_.type_url_.ClearToEmpty();
}
inline const TProtoStringType& Any::type_url() const {
// @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
@@ -275,7 +282,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Any::set_type_url(ArgT0&& arg0, ArgT... args) {
- type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
}
inline TProtoStringType* Any::mutable_type_url() {
@@ -284,19 +291,19 @@ inline TProtoStringType* Any::mutable_type_url() {
return _s;
}
inline const TProtoStringType& Any::_internal_type_url() const {
- return type_url_.Get();
+ return _impl_.type_url_.Get();
}
inline void Any::_internal_set_type_url(const TProtoStringType& value) {
- type_url_.Set(value, GetArenaForAllocation());
+ _impl_.type_url_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Any::_internal_mutable_type_url() {
- return type_url_.Mutable(GetArenaForAllocation());
+ return _impl_.type_url_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Any::release_type_url() {
// @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
- return type_url_.Release();
+ return _impl_.type_url_.Release();
}
inline void Any::set_allocated_type_url(TProtoStringType* type_url) {
if (type_url != nullptr) {
@@ -304,10 +311,10 @@ inline void Any::set_allocated_type_url(TProtoStringType* type_url) {
} else {
}
- type_url_.SetAllocated(type_url, GetArenaForAllocation());
+ _impl_.type_url_.SetAllocated(type_url, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (type_url_.IsDefault()) {
- type_url_.Set("", GetArenaForAllocation());
+ if (_impl_.type_url_.IsDefault()) {
+ _impl_.type_url_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
@@ -315,7 +322,7 @@ inline void Any::set_allocated_type_url(TProtoStringType* type_url) {
// bytes value = 2;
inline void Any::clear_value() {
- value_.ClearToEmpty();
+ _impl_.value_.ClearToEmpty();
}
inline const TProtoStringType& Any::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Any.value)
@@ -325,7 +332,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Any::set_value(ArgT0&& arg0, ArgT... args) {
- value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Any.value)
}
inline TProtoStringType* Any::mutable_value() {
@@ -334,19 +341,19 @@ inline TProtoStringType* Any::mutable_value() {
return _s;
}
inline const TProtoStringType& Any::_internal_value() const {
- return value_.Get();
+ return _impl_.value_.Get();
}
inline void Any::_internal_set_value(const TProtoStringType& value) {
- value_.Set(value, GetArenaForAllocation());
+ _impl_.value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Any::_internal_mutable_value() {
- return value_.Mutable(GetArenaForAllocation());
+ return _impl_.value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Any::release_value() {
// @@protoc_insertion_point(field_release:google.protobuf.Any.value)
- return value_.Release();
+ return _impl_.value_.Release();
}
inline void Any::set_allocated_value(TProtoStringType* value) {
if (value != nullptr) {
@@ -354,10 +361,10 @@ inline void Any::set_allocated_value(TProtoStringType* value) {
} else {
}
- value_.SetAllocated(value, GetArenaForAllocation());
+ _impl_.value_.SetAllocated(value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (value_.IsDefault()) {
- value_.Set("", GetArenaForAllocation());
+ if (_impl_.value_.IsDefault()) {
+ _impl_.value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
diff --git a/contrib/libs/protobuf/src/google/protobuf/api.pb.cc b/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
index 8c84e4755c..1859a5d349 100644
--- a/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
@@ -22,15 +22,15 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Api::Api(
- ::_pbi::ConstantInitialized)
- : methods_()
- , options_()
- , mixins_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , version_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , source_context_(nullptr)
- , syntax_(0)
-{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.methods_)*/{}
+ , /*decltype(_impl_.options_)*/{}
+ , /*decltype(_impl_.mixins_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.source_context_)*/nullptr
+ , /*decltype(_impl_.syntax_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct ApiDefaultTypeInternal {
PROTOBUF_CONSTEXPR ApiDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -41,15 +41,15 @@ struct ApiDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApiDefaultTypeInternal _Api_default_instance_;
PROTOBUF_CONSTEXPR Method::Method(
- ::_pbi::ConstantInitialized)
- : options_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , request_type_url_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , response_type_url_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , request_streaming_(false)
- , response_streaming_(false)
- , syntax_(0)
-{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.options_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.request_type_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.response_type_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.request_streaming_)*/false
+ , /*decltype(_impl_.response_streaming_)*/false
+ , /*decltype(_impl_.syntax_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct MethodDefaultTypeInternal {
PROTOBUF_CONSTEXPR MethodDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -60,9 +60,10 @@ struct MethodDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDefaultTypeInternal _Method_default_instance_;
PROTOBUF_CONSTEXPR Mixin::Mixin(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , root_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.root_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct MixinDefaultTypeInternal {
PROTOBUF_CONSTEXPR MixinDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -84,34 +85,34 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_S
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, methods_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, version_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, source_context_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, mixins_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, syntax_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.methods_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.version_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.source_context_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.mixins_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.syntax_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, request_type_url_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, request_streaming_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, response_type_url_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, response_streaming_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, syntax_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.request_type_url_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.request_streaming_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.response_type_url_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.response_streaming_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.syntax_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, root_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _impl_.root_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Api)},
@@ -176,70 +177,82 @@ class Api::_Internal {
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
Api::_Internal::source_context(const Api* msg) {
- return *msg->source_context_;
+ return *msg->_impl_.source_context_;
}
void Api::clear_options() {
- options_.Clear();
+ _impl_.options_.Clear();
}
void Api::clear_source_context() {
- if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
+ if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
+ delete _impl_.source_context_;
}
- source_context_ = nullptr;
+ _impl_.source_context_ = nullptr;
}
Api::Api(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- methods_(arena),
- options_(arena),
- mixins_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Api)
}
Api::Api(const Api& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- methods_(from.methods_),
- options_(from.options_),
- mixins_(from.mixins_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Api* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.methods_){from._impl_.methods_}
+ , decltype(_impl_.options_){from._impl_.options_}
+ , decltype(_impl_.mixins_){from._impl_.mixins_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.version_){}
+ , decltype(_impl_.source_context_){nullptr}
+ , decltype(_impl_.syntax_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- version_.InitDefault();
+ _impl_.version_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- version_.Set("", GetArenaForAllocation());
+ _impl_.version_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_version().empty()) {
- version_.Set(from._internal_version(),
- GetArenaForAllocation());
+ _this->_impl_.version_.Set(from._internal_version(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_source_context()) {
- source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
- } else {
- source_context_ = nullptr;
+ _this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_);
}
- syntax_ = from.syntax_;
+ _this->_impl_.syntax_ = from._impl_.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
}
-inline void Api::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-version_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- version_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
+inline void Api::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.methods_){arena}
+ , decltype(_impl_.options_){arena}
+ , decltype(_impl_.mixins_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.version_){}
+ , decltype(_impl_.source_context_){nullptr}
+ , decltype(_impl_.syntax_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.version_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.version_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Api::~Api() {
@@ -253,13 +266,16 @@ Api::~Api() {
inline void Api::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- version_.Destroy();
- if (this != internal_default_instance()) delete source_context_;
+ _impl_.methods_.~RepeatedPtrField();
+ _impl_.options_.~RepeatedPtrField();
+ _impl_.mixins_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ _impl_.version_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.source_context_;
}
void Api::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Api::Clear() {
@@ -268,16 +284,16 @@ void Api::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- methods_.Clear();
- options_.Clear();
- mixins_.Clear();
- name_.ClearToEmpty();
- version_.ClearToEmpty();
- if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
+ _impl_.methods_.Clear();
+ _impl_.options_.Clear();
+ _impl_.mixins_.Clear();
+ _impl_.name_.ClearToEmpty();
+ _impl_.version_.ClearToEmpty();
+ if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
+ delete _impl_.source_context_;
}
- source_context_ = nullptr;
- syntax_ = 0;
+ _impl_.source_context_ = nullptr;
+ _impl_.syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -468,21 +484,21 @@ size_t Api::ByteSizeLong() const {
// repeated .google.protobuf.Method methods = 2;
total_size += 1UL * this->_internal_methods_size();
- for (const auto& msg : this->methods_) {
+ for (const auto& msg : this->_impl_.methods_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
- for (const auto& msg : this->options_) {
+ for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.Mixin mixins = 6;
total_size += 1UL * this->_internal_mixins_size();
- for (const auto& msg : this->mixins_) {
+ for (const auto& msg : this->_impl_.mixins_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -505,7 +521,7 @@ size_t Api::ByteSizeLong() const {
if (this->_internal_has_source_context()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *source_context_);
+ *_impl_.source_context_);
}
// .google.protobuf.Syntax syntax = 7;
@@ -514,44 +530,41 @@ size_t Api::ByteSizeLong() const {
::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Api::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Api::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Api::GetClassData() const { return &_class_data_; }
-void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Api *>(to)->MergeFrom(
- static_cast<const Api &>(from));
-}
-
-void Api::MergeFrom(const Api& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
- GOOGLE_DCHECK_NE(&from, this);
+void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Api*>(&to_msg);
+ auto& from = static_cast<const Api&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- methods_.MergeFrom(from.methods_);
- options_.MergeFrom(from.options_);
- mixins_.MergeFrom(from.mixins_);
+ _this->_impl_.methods_.MergeFrom(from._impl_.methods_);
+ _this->_impl_.options_.MergeFrom(from._impl_.options_);
+ _this->_impl_.mixins_.MergeFrom(from._impl_.mixins_);
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (!from._internal_version().empty()) {
- _internal_set_version(from._internal_version());
+ _this->_internal_set_version(from._internal_version());
}
if (from._internal_has_source_context()) {
- _internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
+ _this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(
+ from._internal_source_context());
}
if (from._internal_syntax() != 0) {
- _internal_set_syntax(from._internal_syntax());
+ _this->_internal_set_syntax(from._internal_syntax());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Api::CopyFrom(const Api& from) {
@@ -570,23 +583,23 @@ void Api::InternalSwap(Api* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- methods_.InternalSwap(&other->methods_);
- options_.InternalSwap(&other->options_);
- mixins_.InternalSwap(&other->mixins_);
+ _impl_.methods_.InternalSwap(&other->_impl_.methods_);
+ _impl_.options_.InternalSwap(&other->_impl_.options_);
+ _impl_.mixins_.InternalSwap(&other->_impl_.mixins_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &version_, lhs_arena,
- &other->version_, rhs_arena
+ &_impl_.version_, lhs_arena,
+ &other->_impl_.version_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Api, syntax_)
- + sizeof(Api::syntax_)
- - PROTOBUF_FIELD_OFFSET(Api, source_context_)>(
- reinterpret_cast<char*>(&source_context_),
- reinterpret_cast<char*>(&other->source_context_));
+ PROTOBUF_FIELD_OFFSET(Api, _impl_.syntax_)
+ + sizeof(Api::_impl_.syntax_)
+ - PROTOBUF_FIELD_OFFSET(Api, _impl_.source_context_)>(
+ reinterpret_cast<char*>(&_impl_.source_context_),
+ reinterpret_cast<char*>(&other->_impl_.source_context_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const {
@@ -602,66 +615,84 @@ class Method::_Internal {
};
void Method::clear_options() {
- options_.Clear();
+ _impl_.options_.Clear();
}
Method::Method(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- options_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Method)
}
Method::Method(const Method& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- options_(from.options_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Method* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.options_){from._impl_.options_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.request_type_url_){}
+ , decltype(_impl_.response_type_url_){}
+ , decltype(_impl_.request_streaming_){}
+ , decltype(_impl_.response_streaming_){}
+ , decltype(_impl_.syntax_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- request_type_url_.InitDefault();
+ _impl_.request_type_url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- request_type_url_.Set("", GetArenaForAllocation());
+ _impl_.request_type_url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_request_type_url().empty()) {
- request_type_url_.Set(from._internal_request_type_url(),
- GetArenaForAllocation());
+ _this->_impl_.request_type_url_.Set(from._internal_request_type_url(),
+ _this->GetArenaForAllocation());
}
- response_type_url_.InitDefault();
+ _impl_.response_type_url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- response_type_url_.Set("", GetArenaForAllocation());
+ _impl_.response_type_url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_response_type_url().empty()) {
- response_type_url_.Set(from._internal_response_type_url(),
- GetArenaForAllocation());
+ _this->_impl_.response_type_url_.Set(from._internal_response_type_url(),
+ _this->GetArenaForAllocation());
}
- ::memcpy(&request_streaming_, &from.request_streaming_,
- static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
+ ::memcpy(&_impl_.request_streaming_, &from._impl_.request_streaming_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.syntax_) -
+ reinterpret_cast<char*>(&_impl_.request_streaming_)) + sizeof(_impl_.syntax_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
}
-inline void Method::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-request_type_url_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- request_type_url_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-response_type_url_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- response_type_url_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&request_streaming_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
+inline void Method::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.options_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.request_type_url_){}
+ , decltype(_impl_.response_type_url_){}
+ , decltype(_impl_.request_streaming_){false}
+ , decltype(_impl_.response_streaming_){false}
+ , decltype(_impl_.syntax_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.request_type_url_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.request_type_url_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.response_type_url_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.response_type_url_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Method::~Method() {
@@ -675,13 +706,14 @@ Method::~Method() {
inline void Method::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- request_type_url_.Destroy();
- response_type_url_.Destroy();
+ _impl_.options_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ _impl_.request_type_url_.Destroy();
+ _impl_.response_type_url_.Destroy();
}
void Method::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Method::Clear() {
@@ -690,13 +722,13 @@ void Method::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- options_.Clear();
- name_.ClearToEmpty();
- request_type_url_.ClearToEmpty();
- response_type_url_.ClearToEmpty();
- ::memset(&request_streaming_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
+ _impl_.options_.Clear();
+ _impl_.name_.ClearToEmpty();
+ _impl_.request_type_url_.ClearToEmpty();
+ _impl_.response_type_url_.ClearToEmpty();
+ ::memset(&_impl_.request_streaming_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.syntax_) -
+ reinterpret_cast<char*>(&_impl_.request_streaming_)) + sizeof(_impl_.syntax_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -729,7 +761,7 @@ const char* Method::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
// bool request_streaming = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
- request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -747,7 +779,7 @@ const char* Method::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
// bool response_streaming = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
- response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -878,7 +910,7 @@ size_t Method::ByteSizeLong() const {
// repeated .google.protobuf.Option options = 6;
total_size += 1UL * this->_internal_options_size();
- for (const auto& msg : this->options_) {
+ for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -920,48 +952,44 @@ size_t Method::ByteSizeLong() const {
::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Method::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Method::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Method::GetClassData() const { return &_class_data_; }
-void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Method *>(to)->MergeFrom(
- static_cast<const Method &>(from));
-}
-
-void Method::MergeFrom(const Method& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
- GOOGLE_DCHECK_NE(&from, this);
+void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Method*>(&to_msg);
+ auto& from = static_cast<const Method&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- options_.MergeFrom(from.options_);
+ _this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (!from._internal_request_type_url().empty()) {
- _internal_set_request_type_url(from._internal_request_type_url());
+ _this->_internal_set_request_type_url(from._internal_request_type_url());
}
if (!from._internal_response_type_url().empty()) {
- _internal_set_response_type_url(from._internal_response_type_url());
+ _this->_internal_set_response_type_url(from._internal_response_type_url());
}
if (from._internal_request_streaming() != 0) {
- _internal_set_request_streaming(from._internal_request_streaming());
+ _this->_internal_set_request_streaming(from._internal_request_streaming());
}
if (from._internal_response_streaming() != 0) {
- _internal_set_response_streaming(from._internal_response_streaming());
+ _this->_internal_set_response_streaming(from._internal_response_streaming());
}
if (from._internal_syntax() != 0) {
- _internal_set_syntax(from._internal_syntax());
+ _this->_internal_set_syntax(from._internal_syntax());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Method::CopyFrom(const Method& from) {
@@ -980,25 +1008,25 @@ void Method::InternalSwap(Method* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- options_.InternalSwap(&other->options_);
+ _impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &request_type_url_, lhs_arena,
- &other->request_type_url_, rhs_arena
+ &_impl_.request_type_url_, lhs_arena,
+ &other->_impl_.request_type_url_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &response_type_url_, lhs_arena,
- &other->response_type_url_, rhs_arena
+ &_impl_.response_type_url_, lhs_arena,
+ &other->_impl_.response_type_url_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Method, syntax_)
- + sizeof(Method::syntax_)
- - PROTOBUF_FIELD_OFFSET(Method, request_streaming_)>(
- reinterpret_cast<char*>(&request_streaming_),
- reinterpret_cast<char*>(&other->request_streaming_));
+ PROTOBUF_FIELD_OFFSET(Method, _impl_.syntax_)
+ + sizeof(Method::_impl_.syntax_)
+ - PROTOBUF_FIELD_OFFSET(Method, _impl_.request_streaming_)>(
+ reinterpret_cast<char*>(&_impl_.request_streaming_),
+ reinterpret_cast<char*>(&other->_impl_.request_streaming_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const {
@@ -1016,40 +1044,54 @@ class Mixin::_Internal {
Mixin::Mixin(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin)
}
Mixin::Mixin(const Mixin& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Mixin* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.name_){}
+ , decltype(_impl_.root_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- root_.InitDefault();
+ _impl_.root_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- root_.Set("", GetArenaForAllocation());
+ _impl_.root_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_root().empty()) {
- root_.Set(from._internal_root(),
- GetArenaForAllocation());
+ _this->_impl_.root_.Set(from._internal_root(),
+ _this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
}
-inline void Mixin::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-root_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- root_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+inline void Mixin::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.name_){}
+ , decltype(_impl_.root_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.root_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.root_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Mixin::~Mixin() {
@@ -1063,12 +1105,12 @@ Mixin::~Mixin() {
inline void Mixin::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- root_.Destroy();
+ _impl_.name_.Destroy();
+ _impl_.root_.Destroy();
}
void Mixin::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Mixin::Clear() {
@@ -1077,8 +1119,8 @@ void Mixin::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- name_.ClearToEmpty();
- root_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
+ _impl_.root_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1187,35 +1229,31 @@ size_t Mixin::ByteSizeLong() const {
this->_internal_root());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Mixin::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Mixin::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Mixin::GetClassData() const { return &_class_data_; }
-void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Mixin *>(to)->MergeFrom(
- static_cast<const Mixin &>(from));
-}
-
-void Mixin::MergeFrom(const Mixin& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
- GOOGLE_DCHECK_NE(&from, this);
+void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Mixin*>(&to_msg);
+ auto& from = static_cast<const Mixin&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (!from._internal_root().empty()) {
- _internal_set_root(from._internal_root());
+ _this->_internal_set_root(from._internal_root());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Mixin::CopyFrom(const Mixin& from) {
@@ -1235,12 +1273,12 @@ void Mixin::InternalSwap(Mixin* other) {
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &root_, lhs_arena,
- &other->root_, rhs_arena
+ &_impl_.root_, lhs_arena,
+ &other->_impl_.root_, rhs_arena
);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/api.pb.h b/contrib/libs/protobuf/src/google/protobuf/api.pb.h
index 9c4fa9692e..069b350b70 100644
--- a/contrib/libs/protobuf/src/google/protobuf/api.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/api.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -146,9 +146,11 @@ class PROTOBUF_EXPORT Api final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Api& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Api& from);
+ void MergeFrom( const Api& from) {
+ Api::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -157,10 +159,10 @@ class PROTOBUF_EXPORT Api final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Api* other);
@@ -309,14 +311,17 @@ class PROTOBUF_EXPORT Api final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method > methods_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin > mixins_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_;
- ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
- int syntax_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method > methods_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin > mixins_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
+ int syntax_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto;
};
// -------------------------------------------------------------------
@@ -401,9 +406,11 @@ class PROTOBUF_EXPORT Method final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Method& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Method& from);
+ void MergeFrom( const Method& from) {
+ Method::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -412,10 +419,10 @@ class PROTOBUF_EXPORT Method final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Method* other);
@@ -542,14 +549,17 @@ class PROTOBUF_EXPORT Method final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr request_type_url_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr response_type_url_;
- bool request_streaming_;
- bool response_streaming_;
- int syntax_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr request_type_url_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr response_type_url_;
+ bool request_streaming_;
+ bool response_streaming_;
+ int syntax_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto;
};
// -------------------------------------------------------------------
@@ -634,9 +644,11 @@ class PROTOBUF_EXPORT Mixin final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Mixin& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Mixin& from);
+ void MergeFrom( const Mixin& from) {
+ Mixin::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -645,10 +657,10 @@ class PROTOBUF_EXPORT Mixin final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Mixin* other);
@@ -711,9 +723,12 @@ class PROTOBUF_EXPORT Mixin final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr root_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr root_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto;
};
// ===================================================================
@@ -729,7 +744,7 @@ class PROTOBUF_EXPORT Mixin final :
// string name = 1;
inline void Api::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Api::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.name)
@@ -739,7 +754,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Api::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Api.name)
}
inline TProtoStringType* Api::mutable_name() {
@@ -748,19 +763,19 @@ inline TProtoStringType* Api::mutable_name() {
return _s;
}
inline const TProtoStringType& Api::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Api::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Api::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Api::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Api.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Api::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -768,10 +783,10 @@ inline void Api::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.name)
@@ -779,32 +794,32 @@ inline void Api::set_allocated_name(TProtoStringType* name) {
// repeated .google.protobuf.Method methods = 2;
inline int Api::_internal_methods_size() const {
- return methods_.size();
+ return _impl_.methods_.size();
}
inline int Api::methods_size() const {
return _internal_methods_size();
}
inline void Api::clear_methods() {
- methods_.Clear();
+ _impl_.methods_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Method* Api::mutable_methods(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods)
- return methods_.Mutable(index);
+ return _impl_.methods_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method >*
Api::mutable_methods() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods)
- return &methods_;
+ return &_impl_.methods_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Method& Api::_internal_methods(int index) const {
- return methods_.Get(index);
+ return _impl_.methods_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Method& Api::methods(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.methods)
return _internal_methods(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Method* Api::_internal_add_methods() {
- return methods_.Add();
+ return _impl_.methods_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Method* Api::add_methods() {
::PROTOBUF_NAMESPACE_ID::Method* _add = _internal_add_methods();
@@ -814,34 +829,34 @@ inline ::PROTOBUF_NAMESPACE_ID::Method* Api::add_methods() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Method >&
Api::methods() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
- return methods_;
+ return _impl_.methods_;
}
// repeated .google.protobuf.Option options = 3;
inline int Api::_internal_options_size() const {
- return options_.size();
+ return _impl_.options_.size();
}
inline int Api::options_size() const {
return _internal_options_size();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Api::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.options)
- return options_.Mutable(index);
+ return _impl_.options_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
Api::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options)
- return &options_;
+ return &_impl_.options_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Api::_internal_options(int index) const {
- return options_.Get(index);
+ return _impl_.options_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Api::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.options)
return _internal_options(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Api::_internal_add_options() {
- return options_.Add();
+ return _impl_.options_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Api::add_options() {
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
@@ -851,12 +866,12 @@ inline ::PROTOBUF_NAMESPACE_ID::Option* Api::add_options() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
Api::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.options)
- return options_;
+ return _impl_.options_;
}
// string version = 4;
inline void Api::clear_version() {
- version_.ClearToEmpty();
+ _impl_.version_.ClearToEmpty();
}
inline const TProtoStringType& Api::version() const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.version)
@@ -866,7 +881,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Api::set_version(ArgT0&& arg0, ArgT... args) {
- version_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.version_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Api.version)
}
inline TProtoStringType* Api::mutable_version() {
@@ -875,19 +890,19 @@ inline TProtoStringType* Api::mutable_version() {
return _s;
}
inline const TProtoStringType& Api::_internal_version() const {
- return version_.Get();
+ return _impl_.version_.Get();
}
inline void Api::_internal_set_version(const TProtoStringType& value) {
- version_.Set(value, GetArenaForAllocation());
+ _impl_.version_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Api::_internal_mutable_version() {
- return version_.Mutable(GetArenaForAllocation());
+ return _impl_.version_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Api::release_version() {
// @@protoc_insertion_point(field_release:google.protobuf.Api.version)
- return version_.Release();
+ return _impl_.version_.Release();
}
inline void Api::set_allocated_version(TProtoStringType* version) {
if (version != nullptr) {
@@ -895,10 +910,10 @@ inline void Api::set_allocated_version(TProtoStringType* version) {
} else {
}
- version_.SetAllocated(version, GetArenaForAllocation());
+ _impl_.version_.SetAllocated(version, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (version_.IsDefault()) {
- version_.Set("", GetArenaForAllocation());
+ if (_impl_.version_.IsDefault()) {
+ _impl_.version_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version)
@@ -906,13 +921,13 @@ inline void Api::set_allocated_version(TProtoStringType* version) {
// .google.protobuf.SourceContext source_context = 5;
inline bool Api::_internal_has_source_context() const {
- return this != internal_default_instance() && source_context_ != nullptr;
+ return this != internal_default_instance() && _impl_.source_context_ != nullptr;
}
inline bool Api::has_source_context() const {
return _internal_has_source_context();
}
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Api::_internal_source_context() const {
- const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
+ const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = _impl_.source_context_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceContext&>(
::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
}
@@ -923,9 +938,9 @@ inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Api::source_context() const
inline void Api::unsafe_arena_set_allocated_source_context(
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_context_);
}
- source_context_ = source_context;
+ _impl_.source_context_ = source_context;
if (source_context) {
} else {
@@ -935,8 +950,8 @@ inline void Api::unsafe_arena_set_allocated_source_context(
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() {
- ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
- source_context_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = _impl_.source_context_;
+ _impl_.source_context_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -951,17 +966,17 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() {
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::unsafe_arena_release_source_context() {
// @@protoc_insertion_point(field_release:google.protobuf.Api.source_context)
- ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
- source_context_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = _impl_.source_context_;
+ _impl_.source_context_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::_internal_mutable_source_context() {
- if (source_context_ == nullptr) {
+ if (_impl_.source_context_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
- source_context_ = p;
+ _impl_.source_context_ = p;
}
- return source_context_;
+ return _impl_.source_context_;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() {
::PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
@@ -971,7 +986,7 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() {
inline void Api::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
+ delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_context_);
}
if (source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -985,38 +1000,38 @@ inline void Api::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceCon
} else {
}
- source_context_ = source_context;
+ _impl_.source_context_ = source_context;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.source_context)
}
// repeated .google.protobuf.Mixin mixins = 6;
inline int Api::_internal_mixins_size() const {
- return mixins_.size();
+ return _impl_.mixins_.size();
}
inline int Api::mixins_size() const {
return _internal_mixins_size();
}
inline void Api::clear_mixins() {
- mixins_.Clear();
+ _impl_.mixins_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::mutable_mixins(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins)
- return mixins_.Mutable(index);
+ return _impl_.mixins_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin >*
Api::mutable_mixins() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins)
- return &mixins_;
+ return &_impl_.mixins_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Mixin& Api::_internal_mixins(int index) const {
- return mixins_.Get(index);
+ return _impl_.mixins_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Mixin& Api::mixins(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.mixins)
return _internal_mixins(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::_internal_add_mixins() {
- return mixins_.Add();
+ return _impl_.mixins_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::add_mixins() {
::PROTOBUF_NAMESPACE_ID::Mixin* _add = _internal_add_mixins();
@@ -1026,15 +1041,15 @@ inline ::PROTOBUF_NAMESPACE_ID::Mixin* Api::add_mixins() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Mixin >&
Api::mixins() const {
// @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
- return mixins_;
+ return _impl_.mixins_;
}
// .google.protobuf.Syntax syntax = 7;
inline void Api::clear_syntax() {
- syntax_ = 0;
+ _impl_.syntax_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Api::_internal_syntax() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(_impl_.syntax_);
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const {
// @@protoc_insertion_point(field_get:google.protobuf.Api.syntax)
@@ -1042,7 +1057,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const {
}
inline void Api::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
- syntax_ = value;
+ _impl_.syntax_ = value;
}
inline void Api::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
_internal_set_syntax(value);
@@ -1055,7 +1070,7 @@ inline void Api::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
// string name = 1;
inline void Method::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Method::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.name)
@@ -1065,7 +1080,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Method::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Method.name)
}
inline TProtoStringType* Method::mutable_name() {
@@ -1074,19 +1089,19 @@ inline TProtoStringType* Method::mutable_name() {
return _s;
}
inline const TProtoStringType& Method::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Method::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Method::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Method::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Method.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Method::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -1094,10 +1109,10 @@ inline void Method::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name)
@@ -1105,7 +1120,7 @@ inline void Method::set_allocated_name(TProtoStringType* name) {
// string request_type_url = 2;
inline void Method::clear_request_type_url() {
- request_type_url_.ClearToEmpty();
+ _impl_.request_type_url_.ClearToEmpty();
}
inline const TProtoStringType& Method::request_type_url() const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.request_type_url)
@@ -1115,7 +1130,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Method::set_request_type_url(ArgT0&& arg0, ArgT... args) {
- request_type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.request_type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url)
}
inline TProtoStringType* Method::mutable_request_type_url() {
@@ -1124,19 +1139,19 @@ inline TProtoStringType* Method::mutable_request_type_url() {
return _s;
}
inline const TProtoStringType& Method::_internal_request_type_url() const {
- return request_type_url_.Get();
+ return _impl_.request_type_url_.Get();
}
inline void Method::_internal_set_request_type_url(const TProtoStringType& value) {
- request_type_url_.Set(value, GetArenaForAllocation());
+ _impl_.request_type_url_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Method::_internal_mutable_request_type_url() {
- return request_type_url_.Mutable(GetArenaForAllocation());
+ return _impl_.request_type_url_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Method::release_request_type_url() {
// @@protoc_insertion_point(field_release:google.protobuf.Method.request_type_url)
- return request_type_url_.Release();
+ return _impl_.request_type_url_.Release();
}
inline void Method::set_allocated_request_type_url(TProtoStringType* request_type_url) {
if (request_type_url != nullptr) {
@@ -1144,10 +1159,10 @@ inline void Method::set_allocated_request_type_url(TProtoStringType* request_typ
} else {
}
- request_type_url_.SetAllocated(request_type_url, GetArenaForAllocation());
+ _impl_.request_type_url_.SetAllocated(request_type_url, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (request_type_url_.IsDefault()) {
- request_type_url_.Set("", GetArenaForAllocation());
+ if (_impl_.request_type_url_.IsDefault()) {
+ _impl_.request_type_url_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url)
@@ -1155,10 +1170,10 @@ inline void Method::set_allocated_request_type_url(TProtoStringType* request_typ
// bool request_streaming = 3;
inline void Method::clear_request_streaming() {
- request_streaming_ = false;
+ _impl_.request_streaming_ = false;
}
inline bool Method::_internal_request_streaming() const {
- return request_streaming_;
+ return _impl_.request_streaming_;
}
inline bool Method::request_streaming() const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.request_streaming)
@@ -1166,7 +1181,7 @@ inline bool Method::request_streaming() const {
}
inline void Method::_internal_set_request_streaming(bool value) {
- request_streaming_ = value;
+ _impl_.request_streaming_ = value;
}
inline void Method::set_request_streaming(bool value) {
_internal_set_request_streaming(value);
@@ -1175,7 +1190,7 @@ inline void Method::set_request_streaming(bool value) {
// string response_type_url = 4;
inline void Method::clear_response_type_url() {
- response_type_url_.ClearToEmpty();
+ _impl_.response_type_url_.ClearToEmpty();
}
inline const TProtoStringType& Method::response_type_url() const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.response_type_url)
@@ -1185,7 +1200,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Method::set_response_type_url(ArgT0&& arg0, ArgT... args) {
- response_type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.response_type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url)
}
inline TProtoStringType* Method::mutable_response_type_url() {
@@ -1194,19 +1209,19 @@ inline TProtoStringType* Method::mutable_response_type_url() {
return _s;
}
inline const TProtoStringType& Method::_internal_response_type_url() const {
- return response_type_url_.Get();
+ return _impl_.response_type_url_.Get();
}
inline void Method::_internal_set_response_type_url(const TProtoStringType& value) {
- response_type_url_.Set(value, GetArenaForAllocation());
+ _impl_.response_type_url_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Method::_internal_mutable_response_type_url() {
- return response_type_url_.Mutable(GetArenaForAllocation());
+ return _impl_.response_type_url_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Method::release_response_type_url() {
// @@protoc_insertion_point(field_release:google.protobuf.Method.response_type_url)
- return response_type_url_.Release();
+ return _impl_.response_type_url_.Release();
}
inline void Method::set_allocated_response_type_url(TProtoStringType* response_type_url) {
if (response_type_url != nullptr) {
@@ -1214,10 +1229,10 @@ inline void Method::set_allocated_response_type_url(TProtoStringType* response_t
} else {
}
- response_type_url_.SetAllocated(response_type_url, GetArenaForAllocation());
+ _impl_.response_type_url_.SetAllocated(response_type_url, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (response_type_url_.IsDefault()) {
- response_type_url_.Set("", GetArenaForAllocation());
+ if (_impl_.response_type_url_.IsDefault()) {
+ _impl_.response_type_url_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url)
@@ -1225,10 +1240,10 @@ inline void Method::set_allocated_response_type_url(TProtoStringType* response_t
// bool response_streaming = 5;
inline void Method::clear_response_streaming() {
- response_streaming_ = false;
+ _impl_.response_streaming_ = false;
}
inline bool Method::_internal_response_streaming() const {
- return response_streaming_;
+ return _impl_.response_streaming_;
}
inline bool Method::response_streaming() const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.response_streaming)
@@ -1236,7 +1251,7 @@ inline bool Method::response_streaming() const {
}
inline void Method::_internal_set_response_streaming(bool value) {
- response_streaming_ = value;
+ _impl_.response_streaming_ = value;
}
inline void Method::set_response_streaming(bool value) {
_internal_set_response_streaming(value);
@@ -1245,29 +1260,29 @@ inline void Method::set_response_streaming(bool value) {
// repeated .google.protobuf.Option options = 6;
inline int Method::_internal_options_size() const {
- return options_.size();
+ return _impl_.options_.size();
}
inline int Method::options_size() const {
return _internal_options_size();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Method::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Method.options)
- return options_.Mutable(index);
+ return _impl_.options_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
Method::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options)
- return &options_;
+ return &_impl_.options_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Method::_internal_options(int index) const {
- return options_.Get(index);
+ return _impl_.options_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Method::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.options)
return _internal_options(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Method::_internal_add_options() {
- return options_.Add();
+ return _impl_.options_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Method::add_options() {
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
@@ -1277,15 +1292,15 @@ inline ::PROTOBUF_NAMESPACE_ID::Option* Method::add_options() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
Method::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Method.options)
- return options_;
+ return _impl_.options_;
}
// .google.protobuf.Syntax syntax = 7;
inline void Method::clear_syntax() {
- syntax_ = 0;
+ _impl_.syntax_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Method::_internal_syntax() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(_impl_.syntax_);
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const {
// @@protoc_insertion_point(field_get:google.protobuf.Method.syntax)
@@ -1293,7 +1308,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const {
}
inline void Method::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
- syntax_ = value;
+ _impl_.syntax_ = value;
}
inline void Method::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
_internal_set_syntax(value);
@@ -1306,7 +1321,7 @@ inline void Method::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
// string name = 1;
inline void Mixin::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Mixin::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Mixin.name)
@@ -1316,7 +1331,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Mixin::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Mixin.name)
}
inline TProtoStringType* Mixin::mutable_name() {
@@ -1325,19 +1340,19 @@ inline TProtoStringType* Mixin::mutable_name() {
return _s;
}
inline const TProtoStringType& Mixin::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Mixin::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Mixin::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Mixin::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Mixin.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Mixin::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -1345,10 +1360,10 @@ inline void Mixin::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name)
@@ -1356,7 +1371,7 @@ inline void Mixin::set_allocated_name(TProtoStringType* name) {
// string root = 2;
inline void Mixin::clear_root() {
- root_.ClearToEmpty();
+ _impl_.root_.ClearToEmpty();
}
inline const TProtoStringType& Mixin::root() const {
// @@protoc_insertion_point(field_get:google.protobuf.Mixin.root)
@@ -1366,7 +1381,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Mixin::set_root(ArgT0&& arg0, ArgT... args) {
- root_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.root_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Mixin.root)
}
inline TProtoStringType* Mixin::mutable_root() {
@@ -1375,19 +1390,19 @@ inline TProtoStringType* Mixin::mutable_root() {
return _s;
}
inline const TProtoStringType& Mixin::_internal_root() const {
- return root_.Get();
+ return _impl_.root_.Get();
}
inline void Mixin::_internal_set_root(const TProtoStringType& value) {
- root_.Set(value, GetArenaForAllocation());
+ _impl_.root_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Mixin::_internal_mutable_root() {
- return root_.Mutable(GetArenaForAllocation());
+ return _impl_.root_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Mixin::release_root() {
// @@protoc_insertion_point(field_release:google.protobuf.Mixin.root)
- return root_.Release();
+ return _impl_.root_.Release();
}
inline void Mixin::set_allocated_root(TProtoStringType* root) {
if (root != nullptr) {
@@ -1395,10 +1410,10 @@ inline void Mixin::set_allocated_root(TProtoStringType* root) {
} else {
}
- root_.SetAllocated(root, GetArenaForAllocation());
+ _impl_.root_.SetAllocated(root, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (root_.IsDefault()) {
- root_.Set("", GetArenaForAllocation());
+ if (_impl_.root_.IsDefault()) {
+ _impl_.root_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root)
diff --git a/contrib/libs/protobuf/src/google/protobuf/arena.h b/contrib/libs/protobuf/src/google/protobuf/arena.h
index 2c95ddc8f6..05e2234d5d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arena.h
+++ b/contrib/libs/protobuf/src/google/protobuf/arena.h
@@ -414,6 +414,8 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena {
// Provides access to protected GetOwningArena to generated messages.
static Arena* GetOwningArena(const T* p) { return p->GetOwningArena(); }
+ static void InternalSwap(T* a, T* b) { a->InternalSwap(b); }
+
static Arena* GetArenaForAllocationInternal(
const T* p, std::true_type /*is_derived_from<MessageLite>*/) {
return p->GetArenaForAllocation();
diff --git a/contrib/libs/protobuf/src/google/protobuf/arena_impl.h b/contrib/libs/protobuf/src/google/protobuf/arena_impl.h
index ccaabe7e76..e8ab03ef80 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arena_impl.h
+++ b/contrib/libs/protobuf/src/google/protobuf/arena_impl.h
@@ -55,6 +55,13 @@ namespace google {
namespace protobuf {
namespace internal {
+// To prevent sharing cache lines between threads
+#ifdef __cpp_aligned_new
+enum { kCacheAlignment = 64 };
+#else
+enum { kCacheAlignment = alignof(max_align_t) }; // do the best we can
+#endif
+
inline constexpr size_t AlignUpTo8(size_t n) {
// Align n to next multiple of 8 (from Hacker's Delight, Chapter 3.)
return (n + 7) & static_cast<size_t>(-8);
@@ -497,10 +504,10 @@ class PROTOBUF_EXPORT ThreadSafeArena {
// have fallback function calls in tail position. This substantially improves
// code for the happy path.
PROTOBUF_NDEBUG_INLINE bool MaybeAllocateAligned(size_t n, void** out) {
- SerialArena* a;
+ SerialArena* arena;
if (PROTOBUF_PREDICT_TRUE(!alloc_policy_.should_record_allocs() &&
- GetSerialArenaFromThreadCache(&a))) {
- return a->MaybeAllocateAligned(n, out);
+ GetSerialArenaFromThreadCache(&arena))) {
+ return arena->MaybeAllocateAligned(n, out);
}
return false;
}
@@ -564,7 +571,7 @@ class PROTOBUF_EXPORT ThreadSafeArena {
// fast path optimizes the case where a single thread uses multiple arenas.
ThreadCache* tc = &thread_cache();
SerialArena* serial = hint_.load(std::memory_order_acquire);
- if (PROTOBUF_PREDICT_TRUE(serial != NULL && serial->owner() == tc)) {
+ if (PROTOBUF_PREDICT_TRUE(serial != nullptr && serial->owner() == tc)) {
*arena = serial;
return true;
}
@@ -602,7 +609,7 @@ class PROTOBUF_EXPORT ThreadSafeArena {
#ifdef _MSC_VER
#pragma warning(disable : 4324)
#endif
- struct alignas(64) ThreadCache {
+ struct alignas(kCacheAlignment) ThreadCache {
#if defined(GOOGLE_PROTOBUF_NO_THREADLOCAL)
// If we are using the ThreadLocalStorage class to store the ThreadCache,
// then the ThreadCache's default constructor has to be responsible for
@@ -610,7 +617,7 @@ class PROTOBUF_EXPORT ThreadSafeArena {
ThreadCache()
: next_lifecycle_id(0),
last_lifecycle_id_seen(-1),
- last_serial_arena(NULL) {}
+ last_serial_arena(nullptr) {}
#endif
// Number of per-thread lifecycle IDs to reserve. Must be power of two.
@@ -633,7 +640,7 @@ class PROTOBUF_EXPORT ThreadSafeArena {
#ifdef _MSC_VER
#pragma warning(disable : 4324)
#endif
- struct alignas(64) CacheAlignedLifecycleIdGenerator {
+ struct alignas(kCacheAlignment) CacheAlignedLifecycleIdGenerator {
std::atomic<LifecycleIdAtomic> id;
};
static CacheAlignedLifecycleIdGenerator lifecycle_id_generator_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/arenastring.cc b/contrib/libs/protobuf/src/google/protobuf/arenastring.cc
index b51d403ab5..bedee9446a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arenastring.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/arenastring.cc
@@ -187,7 +187,7 @@ TProtoStringType* ArenaStringPtr::Release() {
if (IsDefault()) return nullptr;
TProtoStringType* released = tagged_ptr_.Get();
- if (!tagged_ptr_.IsAllocated()) {
+ if (tagged_ptr_.IsArena()) {
released = tagged_ptr_.IsMutable() ? new TProtoStringType(std::move(*released))
: new TProtoStringType(*released);
}
@@ -216,9 +216,7 @@ void ArenaStringPtr::SetAllocated(TProtoStringType* value, Arena* arena) {
}
void ArenaStringPtr::Destroy() {
- if (tagged_ptr_.IsAllocated()) {
- delete tagged_ptr_.Get();
- }
+ delete tagged_ptr_.GetIfAllocated();
}
void ArenaStringPtr::ClearToEmpty() {
diff --git a/contrib/libs/protobuf/src/google/protobuf/arenastring.h b/contrib/libs/protobuf/src/google/protobuf/arenastring.h
index 3619a9b930..b897c1e549 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arenastring.h
+++ b/contrib/libs/protobuf/src/google/protobuf/arenastring.h
@@ -96,13 +96,12 @@ class PROTOBUF_EXPORT LazyString {
class TaggedStringPtr {
public:
- // Bit flags qualifying string properties. We can use up to 3 bits as
- // ptr_ is guaranteed and enforced to be aligned on 8 byte boundaries.
+ // Bit flags qualifying string properties. We can use 2 bits as
+ // ptr_ is guaranteed and enforced to be aligned on 4 byte boundaries.
enum Flags {
kArenaBit = 0x1, // ptr is arena allocated
- kAllocatedBit = 0x2, // ptr is heap allocated
- kMutableBit = 0x4, // ptr contents are fully mutable
- kMask = 0x7 // Bit mask
+ kMutableBit = 0x2, // ptr contents are fully mutable
+ kMask = 0x3 // Bit mask
};
// Composed logical types
@@ -112,7 +111,7 @@ class TaggedStringPtr {
// Allocated strings are mutable and (as the name implies) owned.
// A heap allocated string must be deleted.
- kAllocated = kAllocatedBit | kMutableBit,
+ kAllocated = kMutableBit,
// Mutable arena strings are strings where the string instance is owned
// by the arena, but the string contents itself are owned by the string
@@ -166,8 +165,16 @@ class TaggedStringPtr {
// Returns true if the current string is an immutable default value.
inline bool IsDefault() const { return (as_int() & kMask) == kDefault; }
- // Returns true if the current string is a heap allocated mutable value.
- inline bool IsAllocated() const { return as_int() & kAllocatedBit; }
+ // If the current string is a heap-allocated mutable value, returns a pointer
+ // to it. Returns nullptr otherwise.
+ inline TProtoStringType *GetIfAllocated() const {
+ auto allocated = as_int() ^ kAllocated;
+ if (allocated & kMask) return nullptr;
+
+ auto ptr = reinterpret_cast<TProtoStringType*>(allocated);
+ PROTOBUF_ASSUME(ptr != nullptr);
+ return ptr;
+ }
// Returns true if the current string is an arena allocated value.
// This means it's either a mutable or fixed size arena string.
@@ -224,8 +231,8 @@ static_assert(std::is_trivial<TaggedStringPtr>::value,
// Because ArenaStringPtr is used in oneof unions, its constructor is a NOP and
// the field is always manually initialized via method calls.
//
-// See TaggedPtr for more information about the types of string values being
-// held, and the mutable and ownership invariants for each type.
+// See TaggedStringPtr for more information about the types of string values
+// being held, and the mutable and ownership invariants for each type.
struct PROTOBUF_EXPORT ArenaStringPtr {
ArenaStringPtr() = default;
constexpr ArenaStringPtr(ExplicitlyConstructedArenaString* default_value,
diff --git a/contrib/libs/protobuf/src/google/protobuf/arenaz_sampler.cc b/contrib/libs/protobuf/src/google/protobuf/arenaz_sampler.cc
index 400ac04c30..7fde878e41 100644
--- a/contrib/libs/protobuf/src/google/protobuf/arenaz_sampler.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/arenaz_sampler.cc
@@ -55,13 +55,13 @@ void UnsampleSlow(ThreadSafeArenaStats* info) {
namespace {
PROTOBUF_CONSTINIT std::atomic<bool> g_arenaz_enabled{true};
-PROTOBUF_CONSTINIT std::atomic<arc_i32> g_arenaz_sample_parameter{1 << 20};
+PROTOBUF_CONSTINIT std::atomic<arc_i32> g_arenaz_sample_parameter{1 << 10};
PROTOBUF_THREAD_LOCAL absl::profiling_internal::ExponentialBiased
g_exponential_biased_generator;
} // namespace
-PROTOBUF_THREAD_LOCAL arc_i64 global_next_sample = 1LL << 20;
+PROTOBUF_THREAD_LOCAL arc_i64 global_next_sample = 1LL << 10;
ThreadSafeArenaStats::ThreadSafeArenaStats() { PrepareForSampling(); }
ThreadSafeArenaStats::~ThreadSafeArenaStats() = default;
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
index 5c784615e8..ed6d2dc5cc 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
@@ -41,6 +41,7 @@
#include <map>
#include <memory>
#include <set>
+#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
@@ -1101,8 +1102,9 @@ typedef HASH_MAP<TProtoStringType, const SourceCodeInfo_Location*>
std::set<TProtoStringType>* NewAllowedProto3Extendee() {
auto allowed_proto3_extendees = new std::set<TProtoStringType>;
const char* kOptionNames[] = {
- "FileOptions", "MessageOptions", "FieldOptions", "EnumOptions",
- "EnumValueOptions", "ServiceOptions", "MethodOptions", "OneofOptions"};
+ "FileOptions", "MessageOptions", "FieldOptions",
+ "EnumOptions", "EnumValueOptions", "ServiceOptions",
+ "MethodOptions", "OneofOptions", "ExtensionRangeOptions"};
for (const char* option_name : kOptionNames) {
// descriptor.proto has a different package name in opensource. We allow
// both so the opensource protocol compiler can also compile internal
@@ -3698,6 +3700,29 @@ class DescriptorBuilder {
FileDescriptorTables* file_tables_;
std::set<const FileDescriptor*> dependencies_;
+ struct MessageHints {
+ int fields_to_suggest = 0;
+ const Message* first_reason = nullptr;
+ DescriptorPool::ErrorCollector::ErrorLocation first_reason_location =
+ DescriptorPool::ErrorCollector::ErrorLocation::OTHER;
+
+ void RequestHintOnFieldNumbers(
+ const Message& reason,
+ DescriptorPool::ErrorCollector::ErrorLocation reason_location,
+ int range_start = 0, int range_end = 1) {
+ auto fit = [](int value) {
+ return std::min(std::max(value, 0), FieldDescriptor::kMaxNumber);
+ };
+ fields_to_suggest =
+ fit(fields_to_suggest + fit(fit(range_end) - fit(range_start)));
+ if (first_reason) return;
+ first_reason = &reason;
+ first_reason_location = reason_location;
+ }
+ };
+
+ std::unordered_map<const Descriptor*, MessageHints> message_hints_;
+
// unused_dependency_ is used to record the unused imported files.
// Note: public import is not considered.
std::set<const FileDescriptor*> unused_dependency_;
@@ -3772,9 +3797,9 @@ class DescriptorBuilder {
// Like FindSymbol(), but looks up the name relative to some other symbol
// name. This first searches siblings of relative_to, then siblings of its
- // parents, etc. For example, LookupSymbol("foo.bar", "baz.qux.corge") makes
+ // parents, etc. For example, LookupSymbol("foo.bar", "baz.moo.corge") makes
// the following calls, returning the first non-null result:
- // FindSymbol("baz.qux.foo.bar"), FindSymbol("baz.foo.bar"),
+ // FindSymbol("baz.moo.foo.bar"), FindSymbol("baz.foo.bar"),
// FindSymbol("foo.bar"). If AllowUnknownDependencies() has been called
// on the DescriptorPool, this will generate a placeholder type if
// the name is not found (unless the name itself is malformed). The
@@ -3911,6 +3936,8 @@ class DescriptorBuilder {
const ServiceDescriptorProto& proto);
void CrossLinkMethod(MethodDescriptor* method,
const MethodDescriptorProto& proto);
+ void SuggestFieldNumbers(FileDescriptor* file,
+ const FileDescriptorProto& proto);
// Must be run only after cross-linking.
void InterpretOptions();
@@ -5005,6 +5032,13 @@ const FileDescriptor* DescriptorBuilder::BuildFile(
}
}
+ static const int kMaximumPackageLength = 511;
+ if (proto.package().size() > kMaximumPackageLength) {
+ AddError(proto.package(), proto, DescriptorPool::ErrorCollector::NAME,
+ "Package name is too long");
+ return nullptr;
+ }
+
// If we have a fallback_database_, and we aren't doing lazy import building,
// attempt to load all dependencies now, before checkpointing tables_. This
// avoids confusion with recursive checkpoints.
@@ -5266,6 +5300,10 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
// Cross-link.
CrossLinkFile(result, proto);
+ if (!message_hints_.empty()) {
+ SuggestFieldNumbers(result, proto);
+ }
+
// Interpret any remaining uninterpreted options gathered into
// options_to_interpret_ during descriptor building. Cross-linking has made
// extension options known, so all interpretations should now succeed.
@@ -5440,6 +5478,8 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto,
for (int j = 0; j < result->extension_range_count(); j++) {
const Descriptor::ExtensionRange* range = result->extension_range(j);
if (range->start <= field->number() && field->number() < range->end) {
+ message_hints_[result].RequestHintOnFieldNumbers(
+ proto.extension_range(j), DescriptorPool::ErrorCollector::NUMBER);
AddError(
field->full_name(), proto.extension_range(j),
DescriptorPool::ErrorCollector::NUMBER,
@@ -5451,6 +5491,8 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto,
for (int j = 0; j < result->reserved_range_count(); j++) {
const Descriptor::ReservedRange* range = result->reserved_range(j);
if (range->start <= field->number() && field->number() < range->end) {
+ message_hints_[result].RequestHintOnFieldNumbers(
+ proto.reserved_range(j), DescriptorPool::ErrorCollector::NUMBER);
AddError(field->full_name(), proto.reserved_range(j),
DescriptorPool::ErrorCollector::NUMBER,
strings::Substitute("Field \"$0\" uses reserved number $1.",
@@ -5697,6 +5739,8 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
}
if (result->number() <= 0) {
+ message_hints_[parent].RequestHintOnFieldNumbers(
+ proto, DescriptorPool::ErrorCollector::NUMBER);
AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Field numbers must be positive integers.");
} else if (!is_extension && result->number() > FieldDescriptor::kMaxNumber) {
@@ -5708,11 +5752,15 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto,
// This avoids cross-linking issues that arise when attempting to check if
// the extendee is a message_set_wire_format message, which has a higher max
// on extension numbers.
+ message_hints_[parent].RequestHintOnFieldNumbers(
+ proto, DescriptorPool::ErrorCollector::NUMBER);
AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
strings::Substitute("Field numbers cannot be greater than $0.",
FieldDescriptor::kMaxNumber));
} else if (result->number() >= FieldDescriptor::kFirstReservedNumber &&
result->number() <= FieldDescriptor::kLastReservedNumber) {
+ message_hints_[parent].RequestHintOnFieldNumbers(
+ proto, DescriptorPool::ErrorCollector::NUMBER);
AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
strings::Substitute(
"Field numbers $0 through $1 are reserved for the protocol "
@@ -5777,6 +5825,9 @@ void DescriptorBuilder::BuildExtensionRange(
result->start = proto.start();
result->end = proto.end();
if (result->start <= 0) {
+ message_hints_[parent].RequestHintOnFieldNumbers(
+ proto, DescriptorPool::ErrorCollector::NUMBER, result->start,
+ result->end);
AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Extension numbers must be positive integers.");
}
@@ -5814,6 +5865,9 @@ void DescriptorBuilder::BuildReservedRange(
result->start = proto.start();
result->end = proto.end();
if (result->start <= 0) {
+ message_hints_[parent].RequestHintOnFieldNumbers(
+ proto, DescriptorPool::ErrorCollector::NUMBER, result->start,
+ result->end);
AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Reserved numbers must be positive integers.");
}
@@ -6648,6 +6702,79 @@ void DescriptorBuilder::CrossLinkMethod(MethodDescriptor* method,
method->output_type_.Set(output_type.descriptor());
}
}
+
+void DescriptorBuilder::SuggestFieldNumbers(FileDescriptor* file,
+ const FileDescriptorProto& proto) {
+ for (int message_index = 0; message_index < file->message_type_count();
+ message_index++) {
+ const Descriptor* message = &file->message_types_[message_index];
+ auto* hints = FindOrNull(message_hints_, message);
+ if (!hints) continue;
+ constexpr int kMaxSuggestions = 3;
+ int fields_to_suggest = std::min(kMaxSuggestions, hints->fields_to_suggest);
+ if (fields_to_suggest <= 0) continue;
+ struct Range {
+ int from;
+ int to;
+ };
+ std::vector<Range> used_ordinals;
+ auto add_ordinal = [&](int ordinal) {
+ if (ordinal <= 0 || ordinal > FieldDescriptor::kMaxNumber) return;
+ if (!used_ordinals.empty() &&
+ ordinal == used_ordinals.back().to) {
+ used_ordinals.back().to = ordinal + 1;
+ } else {
+ used_ordinals.push_back({ordinal, ordinal + 1});
+ }
+ };
+ auto add_range = [&](int from, int to) {
+ from = std::max(0, std::min(FieldDescriptor::kMaxNumber + 1, from));
+ to = std::max(0, std::min(FieldDescriptor::kMaxNumber + 1, to));
+ if (from >= to) return;
+ used_ordinals.push_back({from, to});
+ };
+ for (int i = 0; i < message->field_count(); i++) {
+ add_ordinal(message->field(i)->number());
+ }
+ for (int i = 0; i < message->extension_count(); i++) {
+ add_ordinal(message->extension(i)->number());
+ }
+ for (int i = 0; i < message->reserved_range_count(); i++) {
+ auto range = message->reserved_range(i);
+ add_range(range->start, range->end);
+ }
+ for (int i = 0; i < message->extension_range_count(); i++) {
+ auto range = message->extension_range(i);
+ add_range(range->start, range->end);
+ }
+ used_ordinals.push_back(
+ {FieldDescriptor::kMaxNumber, FieldDescriptor::kMaxNumber + 1});
+ used_ordinals.push_back({FieldDescriptor::kFirstReservedNumber,
+ FieldDescriptor::kLastReservedNumber});
+ std::sort(used_ordinals.begin(), used_ordinals.end(),
+ [](Range lhs, Range rhs) {
+ return std::tie(lhs.from, lhs.to) < std::tie(rhs.from, rhs.to);
+ });
+ int current_ordinal = 1;
+ std::stringstream id_list;
+ id_list << "Suggested field numbers for " << message->full_name() << ": ";
+ const char* separator = "";
+ for (auto& current_range : used_ordinals) {
+ while (current_ordinal < current_range.from && fields_to_suggest > 0) {
+ id_list << separator << current_ordinal++;
+ separator = ", ";
+ fields_to_suggest--;
+ }
+ if (fields_to_suggest == 0) break;
+ current_ordinal = std::max(current_ordinal, current_range.to);
+ }
+ if (hints->first_reason) {
+ AddError(message->full_name(), *hints->first_reason,
+ hints->first_reason_location, id_list.str());
+ }
+ }
+}
+
// -------------------------------------------------------------------
#define VALIDATE_OPTIONS_FROM_ARRAY(descriptor, array_name, type) \
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
index 2f93b32da1..18b2c60954 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
@@ -22,8 +22,9 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR FileDescriptorSet::FileDescriptorSet(
- ::_pbi::ConstantInitialized)
- : file_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.file_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct FileDescriptorSetDefaultTypeInternal {
PROTOBUF_CONSTEXPR FileDescriptorSetDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -34,19 +35,21 @@ struct FileDescriptorSetDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_;
PROTOBUF_CONSTEXPR FileDescriptorProto::FileDescriptorProto(
- ::_pbi::ConstantInitialized)
- : dependency_()
- , message_type_()
- , enum_type_()
- , service_()
- , extension_()
- , public_dependency_()
- , weak_dependency_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , package_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , syntax_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr)
- , source_code_info_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.dependency_)*/{}
+ , /*decltype(_impl_.message_type_)*/{}
+ , /*decltype(_impl_.enum_type_)*/{}
+ , /*decltype(_impl_.service_)*/{}
+ , /*decltype(_impl_.extension_)*/{}
+ , /*decltype(_impl_.public_dependency_)*/{}
+ , /*decltype(_impl_.weak_dependency_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.package_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.syntax_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr
+ , /*decltype(_impl_.source_code_info_)*/nullptr} {}
struct FileDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR FileDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -57,10 +60,12 @@ struct FileDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(
- ::_pbi::ConstantInitialized)
- : options_(nullptr)
- , start_(0)
- , end_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.options_)*/nullptr
+ , /*decltype(_impl_.start_)*/0
+ , /*decltype(_impl_.end_)*/0} {}
struct DescriptorProto_ExtensionRangeDefaultTypeInternal {
PROTOBUF_CONSTEXPR DescriptorProto_ExtensionRangeDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -71,9 +76,11 @@ struct DescriptorProto_ExtensionRangeDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_;
PROTOBUF_CONSTEXPR DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(
- ::_pbi::ConstantInitialized)
- : start_(0)
- , end_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.start_)*/0
+ , /*decltype(_impl_.end_)*/0} {}
struct DescriptorProto_ReservedRangeDefaultTypeInternal {
PROTOBUF_CONSTEXPR DescriptorProto_ReservedRangeDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -84,17 +91,19 @@ struct DescriptorProto_ReservedRangeDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_;
PROTOBUF_CONSTEXPR DescriptorProto::DescriptorProto(
- ::_pbi::ConstantInitialized)
- : field_()
- , nested_type_()
- , enum_type_()
- , extension_range_()
- , extension_()
- , oneof_decl_()
- , reserved_range_()
- , reserved_name_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.field_)*/{}
+ , /*decltype(_impl_.nested_type_)*/{}
+ , /*decltype(_impl_.enum_type_)*/{}
+ , /*decltype(_impl_.extension_range_)*/{}
+ , /*decltype(_impl_.extension_)*/{}
+ , /*decltype(_impl_.oneof_decl_)*/{}
+ , /*decltype(_impl_.reserved_range_)*/{}
+ , /*decltype(_impl_.reserved_name_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr} {}
struct DescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR DescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -105,8 +114,10 @@ struct DescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR ExtensionRangeOptions::ExtensionRangeOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct ExtensionRangeOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR ExtensionRangeOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -117,20 +128,20 @@ struct ExtensionRangeOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExtensionRangeOptionsDefaultTypeInternal _ExtensionRangeOptions_default_instance_;
PROTOBUF_CONSTEXPR FieldDescriptorProto::FieldDescriptorProto(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , extendee_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , type_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , default_value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , json_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr)
- , number_(0)
- , oneof_index_(0)
- , proto3_optional_(false)
- , label_(1)
-
- , type_(1)
-{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.extendee_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.type_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.default_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.json_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr
+ , /*decltype(_impl_.number_)*/0
+ , /*decltype(_impl_.oneof_index_)*/0
+ , /*decltype(_impl_.proto3_optional_)*/false
+ , /*decltype(_impl_.label_)*/1
+ , /*decltype(_impl_.type_)*/1} {}
struct FieldDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR FieldDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -141,9 +152,11 @@ struct FieldDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR OneofDescriptorProto::OneofDescriptorProto(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr} {}
struct OneofDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR OneofDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -154,9 +167,11 @@ struct OneofDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(
- ::_pbi::ConstantInitialized)
- : start_(0)
- , end_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.start_)*/0
+ , /*decltype(_impl_.end_)*/0} {}
struct EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -167,12 +182,14 @@ struct EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal _EnumDescriptorProto_EnumReservedRange_default_instance_;
PROTOBUF_CONSTEXPR EnumDescriptorProto::EnumDescriptorProto(
- ::_pbi::ConstantInitialized)
- : value_()
- , reserved_range_()
- , reserved_name_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.value_)*/{}
+ , /*decltype(_impl_.reserved_range_)*/{}
+ , /*decltype(_impl_.reserved_name_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr} {}
struct EnumDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -183,10 +200,12 @@ struct EnumDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR EnumValueDescriptorProto::EnumValueDescriptorProto(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr)
- , number_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr
+ , /*decltype(_impl_.number_)*/0} {}
struct EnumValueDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumValueDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -197,10 +216,12 @@ struct EnumValueDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR ServiceDescriptorProto::ServiceDescriptorProto(
- ::_pbi::ConstantInitialized)
- : method_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.method_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr} {}
struct ServiceDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR ServiceDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -211,13 +232,15 @@ struct ServiceDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR MethodDescriptorProto::MethodDescriptorProto(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , input_type_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , output_type_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , options_(nullptr)
- , client_streaming_(false)
- , server_streaming_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.input_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.output_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.options_)*/nullptr
+ , /*decltype(_impl_.client_streaming_)*/false
+ , /*decltype(_impl_.server_streaming_)*/false} {}
struct MethodDescriptorProtoDefaultTypeInternal {
PROTOBUF_CONSTEXPR MethodDescriptorProtoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -228,29 +251,31 @@ struct MethodDescriptorProtoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_;
PROTOBUF_CONSTEXPR FileOptions::FileOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , java_package_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , java_outer_classname_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , go_package_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , objc_class_prefix_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , csharp_namespace_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , swift_prefix_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , php_class_prefix_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , php_namespace_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , php_metadata_namespace_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , ruby_package_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , java_multiple_files_(false)
- , java_generate_equals_and_hash_(false)
- , java_string_check_utf8_(false)
- , cc_generic_services_(false)
- , java_generic_services_(false)
- , py_generic_services_(false)
- , php_generic_services_(false)
- , deprecated_(false)
- , optimize_for_(1)
-
- , cc_enable_arenas_(true){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.java_package_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.java_outer_classname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.go_package_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.objc_class_prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.csharp_namespace_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.swift_prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.php_class_prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.php_namespace_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.php_metadata_namespace_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.ruby_package_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.java_multiple_files_)*/false
+ , /*decltype(_impl_.java_generate_equals_and_hash_)*/false
+ , /*decltype(_impl_.java_string_check_utf8_)*/false
+ , /*decltype(_impl_.cc_generic_services_)*/false
+ , /*decltype(_impl_.java_generic_services_)*/false
+ , /*decltype(_impl_.py_generic_services_)*/false
+ , /*decltype(_impl_.php_generic_services_)*/false
+ , /*decltype(_impl_.deprecated_)*/false
+ , /*decltype(_impl_.optimize_for_)*/1
+ , /*decltype(_impl_.cc_enable_arenas_)*/true} {}
struct FileOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR FileOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -261,12 +286,15 @@ struct FileOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileOptionsDefaultTypeInternal _FileOptions_default_instance_;
PROTOBUF_CONSTEXPR MessageOptions::MessageOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , message_set_wire_format_(false)
- , no_standard_descriptor_accessor_(false)
- , deprecated_(false)
- , map_entry_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.message_set_wire_format_)*/false
+ , /*decltype(_impl_.no_standard_descriptor_accessor_)*/false
+ , /*decltype(_impl_.deprecated_)*/false
+ , /*decltype(_impl_.map_entry_)*/false} {}
struct MessageOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR MessageOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -277,17 +305,18 @@ struct MessageOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_;
PROTOBUF_CONSTEXPR FieldOptions::FieldOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , ctype_(0)
-
- , jstype_(0)
-
- , packed_(false)
- , lazy_(false)
- , unverified_lazy_(false)
- , deprecated_(false)
- , weak_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.ctype_)*/0
+ , /*decltype(_impl_.jstype_)*/0
+ , /*decltype(_impl_.packed_)*/false
+ , /*decltype(_impl_.lazy_)*/false
+ , /*decltype(_impl_.unverified_lazy_)*/false
+ , /*decltype(_impl_.deprecated_)*/false
+ , /*decltype(_impl_.weak_)*/false} {}
struct FieldOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR FieldOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -298,8 +327,10 @@ struct FieldOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_;
PROTOBUF_CONSTEXPR OneofOptions::OneofOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct OneofOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR OneofOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -310,10 +341,13 @@ struct OneofOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_;
PROTOBUF_CONSTEXPR EnumOptions::EnumOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , allow_alias_(false)
- , deprecated_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.allow_alias_)*/false
+ , /*decltype(_impl_.deprecated_)*/false} {}
struct EnumOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -324,9 +358,12 @@ struct EnumOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_;
PROTOBUF_CONSTEXPR EnumValueOptions::EnumValueOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , deprecated_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.deprecated_)*/false} {}
struct EnumValueOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumValueOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -337,9 +374,12 @@ struct EnumValueOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_;
PROTOBUF_CONSTEXPR ServiceOptions::ServiceOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , deprecated_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.deprecated_)*/false} {}
struct ServiceOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR ServiceOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -350,11 +390,13 @@ struct ServiceOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_;
PROTOBUF_CONSTEXPR MethodOptions::MethodOptions(
- ::_pbi::ConstantInitialized)
- : uninterpreted_option_()
- , deprecated_(false)
- , idempotency_level_(0)
-{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.uninterpreted_option_)*/{}
+ , /*decltype(_impl_.deprecated_)*/false
+ , /*decltype(_impl_.idempotency_level_)*/0} {}
struct MethodOptionsDefaultTypeInternal {
PROTOBUF_CONSTEXPR MethodOptionsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -365,9 +407,11 @@ struct MethodOptionsDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_;
PROTOBUF_CONSTEXPR UninterpretedOption_NamePart::UninterpretedOption_NamePart(
- ::_pbi::ConstantInitialized)
- : name_part_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , is_extension_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_part_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.is_extension_)*/false} {}
struct UninterpretedOption_NamePartDefaultTypeInternal {
PROTOBUF_CONSTEXPR UninterpretedOption_NamePartDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -378,14 +422,16 @@ struct UninterpretedOption_NamePartDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_;
PROTOBUF_CONSTEXPR UninterpretedOption::UninterpretedOption(
- ::_pbi::ConstantInitialized)
- : name_()
- , identifier_value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , string_value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , aggregate_value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , positive_int_value_(arc_ui64{0u})
- , negative_int_value_(arc_i64{0})
- , double_value_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_)*/{}
+ , /*decltype(_impl_.identifier_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.string_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.aggregate_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.positive_int_value_)*/arc_ui64{0u}
+ , /*decltype(_impl_.negative_int_value_)*/arc_i64{0}
+ , /*decltype(_impl_.double_value_)*/0} {}
struct UninterpretedOptionDefaultTypeInternal {
PROTOBUF_CONSTEXPR UninterpretedOptionDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -396,14 +442,16 @@ struct UninterpretedOptionDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_;
PROTOBUF_CONSTEXPR SourceCodeInfo_Location::SourceCodeInfo_Location(
- ::_pbi::ConstantInitialized)
- : path_()
- , _path_cached_byte_size_(0)
- , span_()
- , _span_cached_byte_size_(0)
- , leading_detached_comments_()
- , leading_comments_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , trailing_comments_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.path_)*/{}
+ , /*decltype(_impl_._path_cached_byte_size_)*/{0}
+ , /*decltype(_impl_.span_)*/{}
+ , /*decltype(_impl_._span_cached_byte_size_)*/{0}
+ , /*decltype(_impl_.leading_detached_comments_)*/{}
+ , /*decltype(_impl_.leading_comments_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.trailing_comments_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct SourceCodeInfo_LocationDefaultTypeInternal {
PROTOBUF_CONSTEXPR SourceCodeInfo_LocationDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -414,8 +462,9 @@ struct SourceCodeInfo_LocationDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_;
PROTOBUF_CONSTEXPR SourceCodeInfo::SourceCodeInfo(
- ::_pbi::ConstantInitialized)
- : location_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.location_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct SourceCodeInfoDefaultTypeInternal {
PROTOBUF_CONSTEXPR SourceCodeInfoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -426,12 +475,14 @@ struct SourceCodeInfoDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_;
PROTOBUF_CONSTEXPR GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(
- ::_pbi::ConstantInitialized)
- : path_()
- , _path_cached_byte_size_(0)
- , source_file_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , begin_(0)
- , end_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.path_)*/{}
+ , /*decltype(_impl_._path_cached_byte_size_)*/{0}
+ , /*decltype(_impl_.source_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.begin_)*/0
+ , /*decltype(_impl_.end_)*/0} {}
struct GeneratedCodeInfo_AnnotationDefaultTypeInternal {
PROTOBUF_CONSTEXPR GeneratedCodeInfo_AnnotationDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -442,8 +493,9 @@ struct GeneratedCodeInfo_AnnotationDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_;
PROTOBUF_CONSTEXPR GeneratedCodeInfo::GeneratedCodeInfo(
- ::_pbi::ConstantInitialized)
- : annotation_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.annotation_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct GeneratedCodeInfoDefaultTypeInternal {
PROTOBUF_CONSTEXPR GeneratedCodeInfoDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -465,25 +517,25 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorSet, file_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _impl_.file_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, package_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, dependency_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, public_dependency_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, weak_dependency_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, message_type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, enum_type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, service_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, extension_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, source_code_info_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, syntax_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.package_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.dependency_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.public_dependency_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.weak_dependency_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.message_type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.enum_type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.service_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.extension_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.source_code_info_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _impl_.syntax_),
0,
1,
~0u,
@@ -496,44 +548,44 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
3,
4,
2,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, start_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, end_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _impl_.start_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _impl_.end_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _impl_.options_),
1,
2,
0,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, start_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, end_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _impl_.start_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _impl_.end_),
0,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, field_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, extension_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, nested_type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, enum_type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, extension_range_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, oneof_decl_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, reserved_range_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, reserved_name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.field_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.extension_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.nested_type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.enum_type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.extension_range_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.oneof_decl_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.reserved_range_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DescriptorProto, _impl_.reserved_name_),
0,
~0u,
~0u,
@@ -546,28 +598,28 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
~0u,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, uninterpreted_option_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _impl_.uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, number_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, label_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, type_name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, extendee_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, default_value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, oneof_index_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, json_name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, proto3_optional_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.number_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.label_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.type_name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.extendee_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.default_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.oneof_index_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.json_name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _impl_.proto3_optional_),
0,
6,
9,
@@ -579,111 +631,111 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
4,
5,
8,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _impl_.options_),
0,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, start_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, end_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _impl_.start_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _impl_.end_),
0,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, reserved_range_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, reserved_name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _impl_.value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _impl_.reserved_range_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _impl_.reserved_name_),
0,
~0u,
1,
~0u,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, number_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _impl_.number_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _impl_.options_),
0,
2,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, method_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _impl_.method_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _impl_.options_),
0,
~0u,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, input_type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, output_type_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, client_streaming_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, server_streaming_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_.input_type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_.output_type_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_.client_streaming_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _impl_.server_streaming_),
0,
1,
2,
3,
4,
5,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, java_package_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, java_outer_classname_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, java_multiple_files_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, java_generate_equals_and_hash_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, java_string_check_utf8_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, optimize_for_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, go_package_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, cc_generic_services_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, java_generic_services_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, py_generic_services_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, php_generic_services_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, cc_enable_arenas_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, objc_class_prefix_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, csharp_namespace_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, swift_prefix_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, php_class_prefix_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, php_namespace_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, php_metadata_namespace_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, ruby_package_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.java_package_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.java_outer_classname_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.java_multiple_files_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.java_generate_equals_and_hash_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.java_string_check_utf8_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.optimize_for_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.go_package_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.cc_generic_services_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.java_generic_services_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.py_generic_services_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.php_generic_services_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.cc_enable_arenas_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.objc_class_prefix_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.csharp_namespace_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.swift_prefix_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.php_class_prefix_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.php_namespace_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.php_metadata_namespace_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.ruby_package_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FileOptions, _impl_.uninterpreted_option_),
0,
1,
10,
@@ -705,36 +757,36 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
8,
9,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, message_set_wire_format_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, no_standard_descriptor_accessor_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, map_entry_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.message_set_wire_format_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.no_standard_descriptor_accessor_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.map_entry_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MessageOptions, _impl_.uninterpreted_option_),
0,
1,
2,
3,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, ctype_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, packed_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, jstype_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, lazy_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, unverified_lazy_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, weak_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.ctype_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.packed_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.jstype_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.lazy_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.unverified_lazy_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.weak_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldOptions, _impl_.uninterpreted_option_),
0,
2,
1,
@@ -745,78 +797,78 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
~0u,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, uninterpreted_option_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::OneofOptions, _impl_.uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, allow_alias_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.allow_alias_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumOptions, _impl_.uninterpreted_option_),
0,
1,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValueOptions, _impl_.uninterpreted_option_),
0,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ServiceOptions, _impl_.uninterpreted_option_),
0,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _internal_metadata_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _extensions_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _impl_._extensions_),
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, deprecated_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, idempotency_level_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, uninterpreted_option_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _impl_.deprecated_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _impl_.idempotency_level_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::MethodOptions, _impl_.uninterpreted_option_),
0,
1,
~0u,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, name_part_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, is_extension_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _impl_.name_part_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _impl_.is_extension_),
0,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, identifier_value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, positive_int_value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, negative_int_value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, double_value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, string_value_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, aggregate_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.identifier_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.positive_int_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.negative_int_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.double_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.string_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UninterpretedOption, _impl_.aggregate_value_),
~0u,
0,
3,
@@ -824,17 +876,17 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
5,
1,
2,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, path_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, span_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, leading_comments_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, trailing_comments_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, leading_detached_comments_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _impl_.path_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _impl_.span_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _impl_.leading_comments_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _impl_.trailing_comments_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _impl_.leading_detached_comments_),
~0u,
~0u,
0,
@@ -846,17 +898,17 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo, location_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo, _impl_.location_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, path_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, source_file_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, begin_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, end_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _impl_.path_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _impl_.source_file_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _impl_.begin_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _impl_.end_),
~0u,
0,
1,
@@ -867,7 +919,7 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PRO
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, annotation_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, _impl_.annotation_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FileDescriptorSet)},
@@ -1276,19 +1328,29 @@ class FileDescriptorSet::_Internal {
FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- file_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorSet)
}
FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- file_(from.file_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ FileDescriptorSet* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.file_){from._impl_.file_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet)
}
-inline void FileDescriptorSet::SharedCtor() {
+inline void FileDescriptorSet::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.file_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
FileDescriptorSet::~FileDescriptorSet() {
@@ -1302,10 +1364,11 @@ FileDescriptorSet::~FileDescriptorSet() {
inline void FileDescriptorSet::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_.file_.~RepeatedPtrField();
}
void FileDescriptorSet::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FileDescriptorSet::Clear() {
@@ -1314,7 +1377,7 @@ void FileDescriptorSet::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- file_.Clear();
+ _impl_.file_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1392,35 +1455,31 @@ size_t FileDescriptorSet::ByteSizeLong() const {
// repeated .google.protobuf.FileDescriptorProto file = 1;
total_size += 1UL * this->_internal_file_size();
- for (const auto& msg : this->file_) {
+ for (const auto& msg : this->_impl_.file_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FileDescriptorSet::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FileDescriptorSet::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FileDescriptorSet::GetClassData() const { return &_class_data_; }
-void FileDescriptorSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FileDescriptorSet *>(to)->MergeFrom(
- static_cast<const FileDescriptorSet &>(from));
-}
-
-void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet)
- GOOGLE_DCHECK_NE(&from, this);
+void FileDescriptorSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FileDescriptorSet*>(&to_msg);
+ auto& from = static_cast<const FileDescriptorSet&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- file_.MergeFrom(from.file_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.file_.MergeFrom(from._impl_.file_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
@@ -1431,7 +1490,7 @@ void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
}
bool FileDescriptorSet::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(file_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.file_))
return false;
return true;
}
@@ -1439,7 +1498,7 @@ bool FileDescriptorSet::IsInitialized() const {
void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- file_.InternalSwap(&other->file_);
+ _impl_.file_.InternalSwap(&other->_impl_.file_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorSet::GetMetadata() const {
@@ -1452,7 +1511,7 @@ void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
class FileDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<FileDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<FileDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -1474,90 +1533,103 @@ class FileDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::FileOptions&
FileDescriptorProto::_Internal::options(const FileDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo&
FileDescriptorProto::_Internal::source_code_info(const FileDescriptorProto* msg) {
- return *msg->source_code_info_;
+ return *msg->_impl_.source_code_info_;
}
FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- dependency_(arena),
- message_type_(arena),
- enum_type_(arena),
- service_(arena),
- extension_(arena),
- public_dependency_(arena),
- weak_dependency_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorProto)
}
FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- dependency_(from.dependency_),
- message_type_(from.message_type_),
- enum_type_(from.enum_type_),
- service_(from.service_),
- extension_(from.extension_),
- public_dependency_(from.public_dependency_),
- weak_dependency_(from.weak_dependency_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ FileDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.dependency_){from._impl_.dependency_}
+ , decltype(_impl_.message_type_){from._impl_.message_type_}
+ , decltype(_impl_.enum_type_){from._impl_.enum_type_}
+ , decltype(_impl_.service_){from._impl_.service_}
+ , decltype(_impl_.extension_){from._impl_.extension_}
+ , decltype(_impl_.public_dependency_){from._impl_.public_dependency_}
+ , decltype(_impl_.weak_dependency_){from._impl_.weak_dependency_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.package_){}
+ , decltype(_impl_.syntax_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.source_code_info_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- package_.InitDefault();
+ _impl_.package_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- package_.Set("", GetArenaForAllocation());
+ _impl_.package_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_package()) {
- package_.Set(from._internal_package(),
- GetArenaForAllocation());
+ _this->_impl_.package_.Set(from._internal_package(),
+ _this->GetArenaForAllocation());
}
- syntax_.InitDefault();
+ _impl_.syntax_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- syntax_.Set("", GetArenaForAllocation());
+ _impl_.syntax_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_syntax()) {
- syntax_.Set(from._internal_syntax(),
- GetArenaForAllocation());
+ _this->_impl_.syntax_.Set(from._internal_syntax(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::FileOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::FileOptions(*from._impl_.options_);
}
if (from._internal_has_source_code_info()) {
- source_code_info_ = new ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo(*from.source_code_info_);
- } else {
- source_code_info_ = nullptr;
+ _this->_impl_.source_code_info_ = new ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo(*from._impl_.source_code_info_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto)
}
-inline void FileDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-package_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- package_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-syntax_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- syntax_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&source_code_info_) -
- reinterpret_cast<char*>(&options_)) + sizeof(source_code_info_));
+inline void FileDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.dependency_){arena}
+ , decltype(_impl_.message_type_){arena}
+ , decltype(_impl_.enum_type_){arena}
+ , decltype(_impl_.service_){arena}
+ , decltype(_impl_.extension_){arena}
+ , decltype(_impl_.public_dependency_){arena}
+ , decltype(_impl_.weak_dependency_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.package_){}
+ , decltype(_impl_.syntax_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.source_code_info_){nullptr}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.package_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.package_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.syntax_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.syntax_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
FileDescriptorProto::~FileDescriptorProto() {
@@ -1571,15 +1643,22 @@ FileDescriptorProto::~FileDescriptorProto() {
inline void FileDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- package_.Destroy();
- syntax_.Destroy();
- if (this != internal_default_instance()) delete options_;
- if (this != internal_default_instance()) delete source_code_info_;
+ _impl_.dependency_.~RepeatedPtrField();
+ _impl_.message_type_.~RepeatedPtrField();
+ _impl_.enum_type_.~RepeatedPtrField();
+ _impl_.service_.~RepeatedPtrField();
+ _impl_.extension_.~RepeatedPtrField();
+ _impl_.public_dependency_.~RepeatedField();
+ _impl_.weak_dependency_.~RepeatedField();
+ _impl_.name_.Destroy();
+ _impl_.package_.Destroy();
+ _impl_.syntax_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
+ if (this != internal_default_instance()) delete _impl_.source_code_info_;
}
void FileDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FileDescriptorProto::Clear() {
@@ -1588,34 +1667,34 @@ void FileDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- dependency_.Clear();
- message_type_.Clear();
- enum_type_.Clear();
- service_.Clear();
- extension_.Clear();
- public_dependency_.Clear();
- weak_dependency_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.dependency_.Clear();
+ _impl_.message_type_.Clear();
+ _impl_.enum_type_.Clear();
+ _impl_.service_.Clear();
+ _impl_.extension_.Clear();
+ _impl_.public_dependency_.Clear();
+ _impl_.weak_dependency_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- package_.ClearNonDefaultToEmpty();
+ _impl_.package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
- syntax_.ClearNonDefaultToEmpty();
+ _impl_.syntax_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
if (cached_has_bits & 0x00000010u) {
- GOOGLE_DCHECK(source_code_info_ != nullptr);
- source_code_info_->Clear();
+ GOOGLE_DCHECK(_impl_.source_code_info_ != nullptr);
+ _impl_.source_code_info_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1795,7 +1874,7 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseCo
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -1809,7 +1888,7 @@ uint8_t* FileDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1926,36 +2005,36 @@ size_t FileDescriptorProto::ByteSizeLong() const {
// repeated string dependency = 3;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(dependency_.size());
- for (int i = 0, n = dependency_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.dependency_.size());
+ for (int i = 0, n = _impl_.dependency_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- dependency_.Get(i));
+ _impl_.dependency_.Get(i));
}
// repeated .google.protobuf.DescriptorProto message_type = 4;
total_size += 1UL * this->_internal_message_type_size();
- for (const auto& msg : this->message_type_) {
+ for (const auto& msg : this->_impl_.message_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
total_size += 1UL * this->_internal_enum_type_size();
- for (const auto& msg : this->enum_type_) {
+ for (const auto& msg : this->_impl_.enum_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
total_size += 1UL * this->_internal_service_size();
- for (const auto& msg : this->service_) {
+ for (const auto& msg : this->_impl_.service_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
total_size += 1UL * this->_internal_extension_size();
- for (const auto& msg : this->extension_) {
+ for (const auto& msg : this->_impl_.extension_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -1963,7 +2042,7 @@ size_t FileDescriptorProto::ByteSizeLong() const {
// repeated int32 public_dependency = 10;
{
size_t data_size = ::_pbi::WireFormatLite::
- Int32Size(this->public_dependency_);
+ Int32Size(this->_impl_.public_dependency_);
total_size += 1 *
::_pbi::FromIntSize(this->_internal_public_dependency_size());
total_size += data_size;
@@ -1972,13 +2051,13 @@ size_t FileDescriptorProto::ByteSizeLong() const {
// repeated int32 weak_dependency = 11;
{
size_t data_size = ::_pbi::WireFormatLite::
- Int32Size(this->weak_dependency_);
+ Int32Size(this->_impl_.weak_dependency_);
total_size += 1 *
::_pbi::FromIntSize(this->_internal_weak_dependency_size());
total_size += data_size;
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -2005,65 +2084,63 @@ size_t FileDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *source_code_info_);
+ *_impl_.source_code_info_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FileDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FileDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FileDescriptorProto::GetClassData() const { return &_class_data_; }
-void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FileDescriptorProto *>(to)->MergeFrom(
- static_cast<const FileDescriptorProto &>(from));
-}
-
-void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FileDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const FileDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- dependency_.MergeFrom(from.dependency_);
- message_type_.MergeFrom(from.message_type_);
- enum_type_.MergeFrom(from.enum_type_);
- service_.MergeFrom(from.service_);
- extension_.MergeFrom(from.extension_);
- public_dependency_.MergeFrom(from.public_dependency_);
- weak_dependency_.MergeFrom(from.weak_dependency_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.dependency_.MergeFrom(from._impl_.dependency_);
+ _this->_impl_.message_type_.MergeFrom(from._impl_.message_type_);
+ _this->_impl_.enum_type_.MergeFrom(from._impl_.enum_type_);
+ _this->_impl_.service_.MergeFrom(from._impl_.service_);
+ _this->_impl_.extension_.MergeFrom(from._impl_.extension_);
+ _this->_impl_.public_dependency_.MergeFrom(from._impl_.public_dependency_);
+ _this->_impl_.weak_dependency_.MergeFrom(from._impl_.weak_dependency_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_package(from._internal_package());
+ _this->_internal_set_package(from._internal_package());
}
if (cached_has_bits & 0x00000004u) {
- _internal_set_syntax(from._internal_syntax());
+ _this->_internal_set_syntax(from._internal_syntax());
}
if (cached_has_bits & 0x00000008u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(
+ from._internal_options());
}
if (cached_has_bits & 0x00000010u) {
- _internal_mutable_source_code_info()->::PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(from._internal_source_code_info());
+ _this->_internal_mutable_source_code_info()->::PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(
+ from._internal_source_code_info());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
@@ -2074,16 +2151,16 @@ void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
}
bool FileDescriptorProto::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(message_type_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.message_type_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(enum_type_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.enum_type_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(service_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.service_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(extension_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.extension_))
return false;
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -2093,32 +2170,32 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- dependency_.InternalSwap(&other->dependency_);
- message_type_.InternalSwap(&other->message_type_);
- enum_type_.InternalSwap(&other->enum_type_);
- service_.InternalSwap(&other->service_);
- extension_.InternalSwap(&other->extension_);
- public_dependency_.InternalSwap(&other->public_dependency_);
- weak_dependency_.InternalSwap(&other->weak_dependency_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.dependency_.InternalSwap(&other->_impl_.dependency_);
+ _impl_.message_type_.InternalSwap(&other->_impl_.message_type_);
+ _impl_.enum_type_.InternalSwap(&other->_impl_.enum_type_);
+ _impl_.service_.InternalSwap(&other->_impl_.service_);
+ _impl_.extension_.InternalSwap(&other->_impl_.extension_);
+ _impl_.public_dependency_.InternalSwap(&other->_impl_.public_dependency_);
+ _impl_.weak_dependency_.InternalSwap(&other->_impl_.weak_dependency_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &package_, lhs_arena,
- &other->package_, rhs_arena
+ &_impl_.package_, lhs_arena,
+ &other->_impl_.package_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &syntax_, lhs_arena,
- &other->syntax_, rhs_arena
+ &_impl_.syntax_, lhs_arena,
+ &other->_impl_.syntax_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(FileDescriptorProto, source_code_info_)
- + sizeof(FileDescriptorProto::source_code_info_)
- - PROTOBUF_FIELD_OFFSET(FileDescriptorProto, options_)>(
- reinterpret_cast<char*>(&options_),
- reinterpret_cast<char*>(&other->options_));
+ PROTOBUF_FIELD_OFFSET(FileDescriptorProto, _impl_.source_code_info_)
+ + sizeof(FileDescriptorProto::_impl_.source_code_info_)
+ - PROTOBUF_FIELD_OFFSET(FileDescriptorProto, _impl_.options_)>(
+ reinterpret_cast<char*>(&_impl_.options_),
+ reinterpret_cast<char*>(&other->_impl_.options_));
}
::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorProto::GetMetadata() const {
@@ -2131,7 +2208,7 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
class DescriptorProto_ExtensionRange::_Internal {
public:
- using HasBits = decltype(std::declval<DescriptorProto_ExtensionRange>()._has_bits_);
+ using HasBits = decltype(std::declval<DescriptorProto_ExtensionRange>()._impl_._has_bits_);
static void set_has_start(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
@@ -2146,34 +2223,45 @@ class DescriptorProto_ExtensionRange::_Internal {
const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions&
DescriptorProto_ExtensionRange::_Internal::options(const DescriptorProto_ExtensionRange* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ExtensionRange)
}
DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ DescriptorProto_ExtensionRange* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.start_){}
+ , decltype(_impl_.end_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions(*from._impl_.options_);
}
- ::memcpy(&start_, &from.start_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memcpy(&_impl_.start_, &from._impl_.start_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
}
-inline void DescriptorProto_ExtensionRange::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&options_)) + sizeof(end_));
+inline void DescriptorProto_ExtensionRange::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.start_){0}
+ , decltype(_impl_.end_){0}
+ };
}
DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
@@ -2187,11 +2275,11 @@ DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
inline void DescriptorProto_ExtensionRange::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- if (this != internal_default_instance()) delete options_;
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void DescriptorProto_ExtensionRange::Clear() {
@@ -2200,17 +2288,17 @@ void DescriptorProto_ExtensionRange::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
if (cached_has_bits & 0x00000006u) {
- ::memset(&start_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memset(&_impl_.start_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2225,7 +2313,7 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::_p
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
- start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -2234,7 +2322,7 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::_p
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
- end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -2263,7 +2351,7 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::_p
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -2277,7 +2365,7 @@ uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional int32 start = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
@@ -2313,13 +2401,13 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional .google.protobuf.ExtensionRangeOptions options = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
// optional int32 start = 1;
@@ -2333,42 +2421,39 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DescriptorProto_ExtensionRange::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
DescriptorProto_ExtensionRange::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DescriptorProto_ExtensionRange::GetClassData() const { return &_class_data_; }
-void DescriptorProto_ExtensionRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<DescriptorProto_ExtensionRange *>(to)->MergeFrom(
- static_cast<const DescriptorProto_ExtensionRange &>(from));
-}
-
-void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange)
- GOOGLE_DCHECK_NE(&from, this);
+void DescriptorProto_ExtensionRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<DescriptorProto_ExtensionRange*>(&to_msg);
+ auto& from = static_cast<const DescriptorProto_ExtensionRange&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::MergeFrom(
+ from._internal_options());
}
if (cached_has_bits & 0x00000002u) {
- start_ = from.start_;
+ _this->_impl_.start_ = from._impl_.start_;
}
if (cached_has_bits & 0x00000004u) {
- end_ = from.end_;
+ _this->_impl_.end_ = from._impl_.end_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) {
@@ -2380,7 +2465,7 @@ void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRan
bool DescriptorProto_ExtensionRange::IsInitialized() const {
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -2388,13 +2473,13 @@ bool DescriptorProto_ExtensionRange::IsInitialized() const {
void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_)
- + sizeof(DescriptorProto_ExtensionRange::end_)
- - PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, options_)>(
- reinterpret_cast<char*>(&options_),
- reinterpret_cast<char*>(&other->options_));
+ PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, _impl_.end_)
+ + sizeof(DescriptorProto_ExtensionRange::_impl_.end_)
+ - PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, _impl_.options_)>(
+ reinterpret_cast<char*>(&_impl_.options_),
+ reinterpret_cast<char*>(&other->_impl_.options_));
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
@@ -2407,7 +2492,7 @@ void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange
class DescriptorProto_ReservedRange::_Internal {
public:
- using HasBits = decltype(std::declval<DescriptorProto_ReservedRange>()._has_bits_);
+ using HasBits = decltype(std::declval<DescriptorProto_ReservedRange>()._impl_._has_bits_);
static void set_has_start(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -2419,24 +2504,35 @@ class DescriptorProto_ReservedRange::_Internal {
DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ReservedRange)
}
DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ DescriptorProto_ReservedRange* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.start_){}
+ , decltype(_impl_.end_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&start_, &from.start_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memcpy(&_impl_.start_, &from._impl_.start_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange)
}
-inline void DescriptorProto_ReservedRange::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&start_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+inline void DescriptorProto_ReservedRange::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.start_){0}
+ , decltype(_impl_.end_){0}
+ };
}
DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
@@ -2453,7 +2549,7 @@ inline void DescriptorProto_ReservedRange::SharedDtor() {
}
void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void DescriptorProto_ReservedRange::Clear() {
@@ -2462,13 +2558,13 @@ void DescriptorProto_ReservedRange::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- ::memset(&start_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memset(&_impl_.start_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2483,7 +2579,7 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::_pb
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
- start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -2492,7 +2588,7 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::_pb
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
- end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -2513,7 +2609,7 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::_pb
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -2527,7 +2623,7 @@ uint8_t* DescriptorProto_ReservedRange::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional int32 start = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -2556,7 +2652,7 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional int32 start = 1;
if (cached_has_bits & 0x00000001u) {
@@ -2569,39 +2665,35 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DescriptorProto_ReservedRange::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
DescriptorProto_ReservedRange::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DescriptorProto_ReservedRange::GetClassData() const { return &_class_data_; }
-void DescriptorProto_ReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<DescriptorProto_ReservedRange *>(to)->MergeFrom(
- static_cast<const DescriptorProto_ReservedRange &>(from));
-}
-
-void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange)
- GOOGLE_DCHECK_NE(&from, this);
+void DescriptorProto_ReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<DescriptorProto_ReservedRange*>(&to_msg);
+ auto& from = static_cast<const DescriptorProto_ReservedRange&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- start_ = from.start_;
+ _this->_impl_.start_ = from._impl_.start_;
}
if (cached_has_bits & 0x00000002u) {
- end_ = from.end_;
+ _this->_impl_.end_ = from._impl_.end_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) {
@@ -2618,13 +2710,13 @@ bool DescriptorProto_ReservedRange::IsInitialized() const {
void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, end_)
- + sizeof(DescriptorProto_ReservedRange::end_)
- - PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, start_)>(
- reinterpret_cast<char*>(&start_),
- reinterpret_cast<char*>(&other->start_));
+ PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, _impl_.end_)
+ + sizeof(DescriptorProto_ReservedRange::_impl_.end_)
+ - PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, _impl_.start_)>(
+ reinterpret_cast<char*>(&_impl_.start_),
+ reinterpret_cast<char*>(&other->_impl_.start_));
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ReservedRange::GetMetadata() const {
@@ -2637,7 +2729,7 @@ void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange*
class DescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<DescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<DescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -2649,56 +2741,68 @@ class DescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::MessageOptions&
DescriptorProto::_Internal::options(const DescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- field_(arena),
- nested_type_(arena),
- enum_type_(arena),
- extension_range_(arena),
- extension_(arena),
- oneof_decl_(arena),
- reserved_range_(arena),
- reserved_name_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto)
}
DescriptorProto::DescriptorProto(const DescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- field_(from.field_),
- nested_type_(from.nested_type_),
- enum_type_(from.enum_type_),
- extension_range_(from.extension_range_),
- extension_(from.extension_),
- oneof_decl_(from.oneof_decl_),
- reserved_range_(from.reserved_range_),
- reserved_name_(from.reserved_name_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ DescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.field_){from._impl_.field_}
+ , decltype(_impl_.nested_type_){from._impl_.nested_type_}
+ , decltype(_impl_.enum_type_){from._impl_.enum_type_}
+ , decltype(_impl_.extension_range_){from._impl_.extension_range_}
+ , decltype(_impl_.extension_){from._impl_.extension_}
+ , decltype(_impl_.oneof_decl_){from._impl_.oneof_decl_}
+ , decltype(_impl_.reserved_range_){from._impl_.reserved_range_}
+ , decltype(_impl_.reserved_name_){from._impl_.reserved_name_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::MessageOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::MessageOptions(*from._impl_.options_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto)
}
-inline void DescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-options_ = nullptr;
+inline void DescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.field_){arena}
+ , decltype(_impl_.nested_type_){arena}
+ , decltype(_impl_.enum_type_){arena}
+ , decltype(_impl_.extension_range_){arena}
+ , decltype(_impl_.extension_){arena}
+ , decltype(_impl_.oneof_decl_){arena}
+ , decltype(_impl_.reserved_range_){arena}
+ , decltype(_impl_.reserved_name_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
DescriptorProto::~DescriptorProto() {
@@ -2712,12 +2816,20 @@ DescriptorProto::~DescriptorProto() {
inline void DescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.field_.~RepeatedPtrField();
+ _impl_.nested_type_.~RepeatedPtrField();
+ _impl_.enum_type_.~RepeatedPtrField();
+ _impl_.extension_range_.~RepeatedPtrField();
+ _impl_.extension_.~RepeatedPtrField();
+ _impl_.oneof_decl_.~RepeatedPtrField();
+ _impl_.reserved_range_.~RepeatedPtrField();
+ _impl_.reserved_name_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void DescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void DescriptorProto::Clear() {
@@ -2726,25 +2838,25 @@ void DescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- field_.Clear();
- nested_type_.Clear();
- enum_type_.Clear();
- extension_range_.Clear();
- extension_.Clear();
- oneof_decl_.Clear();
- reserved_range_.Clear();
- reserved_name_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.field_.Clear();
+ _impl_.nested_type_.Clear();
+ _impl_.enum_type_.Clear();
+ _impl_.extension_range_.Clear();
+ _impl_.extension_.Clear();
+ _impl_.oneof_decl_.Clear();
+ _impl_.reserved_range_.Clear();
+ _impl_.reserved_name_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2899,7 +3011,7 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContex
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -2913,7 +3025,7 @@ uint8_t* DescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -3015,62 +3127,62 @@ size_t DescriptorProto::ByteSizeLong() const {
// repeated .google.protobuf.FieldDescriptorProto field = 2;
total_size += 1UL * this->_internal_field_size();
- for (const auto& msg : this->field_) {
+ for (const auto& msg : this->_impl_.field_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.DescriptorProto nested_type = 3;
total_size += 1UL * this->_internal_nested_type_size();
- for (const auto& msg : this->nested_type_) {
+ for (const auto& msg : this->_impl_.nested_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
total_size += 1UL * this->_internal_enum_type_size();
- for (const auto& msg : this->enum_type_) {
+ for (const auto& msg : this->_impl_.enum_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
total_size += 1UL * this->_internal_extension_range_size();
- for (const auto& msg : this->extension_range_) {
+ for (const auto& msg : this->_impl_.extension_range_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
total_size += 1UL * this->_internal_extension_size();
- for (const auto& msg : this->extension_) {
+ for (const auto& msg : this->_impl_.extension_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
total_size += 1UL * this->_internal_oneof_decl_size();
- for (const auto& msg : this->oneof_decl_) {
+ for (const auto& msg : this->_impl_.oneof_decl_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
total_size += 1UL * this->_internal_reserved_range_size();
- for (const auto& msg : this->reserved_range_) {
+ for (const auto& msg : this->_impl_.reserved_range_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated string reserved_name = 10;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(reserved_name_.size());
- for (int i = 0, n = reserved_name_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.reserved_name_.size());
+ for (int i = 0, n = _impl_.reserved_name_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- reserved_name_.Get(i));
+ _impl_.reserved_name_.Get(i));
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -3083,50 +3195,47 @@ size_t DescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
DescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DescriptorProto::GetClassData() const { return &_class_data_; }
-void DescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<DescriptorProto *>(to)->MergeFrom(
- static_cast<const DescriptorProto &>(from));
-}
-
-void DescriptorProto::MergeFrom(const DescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void DescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<DescriptorProto*>(&to_msg);
+ auto& from = static_cast<const DescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- field_.MergeFrom(from.field_);
- nested_type_.MergeFrom(from.nested_type_);
- enum_type_.MergeFrom(from.enum_type_);
- extension_range_.MergeFrom(from.extension_range_);
- extension_.MergeFrom(from.extension_);
- oneof_decl_.MergeFrom(from.oneof_decl_);
- reserved_range_.MergeFrom(from.reserved_range_);
- reserved_name_.MergeFrom(from.reserved_name_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.field_.MergeFrom(from._impl_.field_);
+ _this->_impl_.nested_type_.MergeFrom(from._impl_.nested_type_);
+ _this->_impl_.enum_type_.MergeFrom(from._impl_.enum_type_);
+ _this->_impl_.extension_range_.MergeFrom(from._impl_.extension_range_);
+ _this->_impl_.extension_.MergeFrom(from._impl_.extension_);
+ _this->_impl_.oneof_decl_.MergeFrom(from._impl_.oneof_decl_);
+ _this->_impl_.reserved_range_.MergeFrom(from._impl_.reserved_range_);
+ _this->_impl_.reserved_name_.MergeFrom(from._impl_.reserved_name_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::MessageOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::MessageOptions::MergeFrom(
+ from._internal_options());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DescriptorProto::CopyFrom(const DescriptorProto& from) {
@@ -3137,20 +3246,20 @@ void DescriptorProto::CopyFrom(const DescriptorProto& from) {
}
bool DescriptorProto::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(field_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.field_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(nested_type_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.nested_type_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(enum_type_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.enum_type_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(extension_range_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.extension_range_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(extension_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.extension_))
return false;
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(oneof_decl_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.oneof_decl_))
return false;
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -3160,20 +3269,20 @@ void DescriptorProto::InternalSwap(DescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- field_.InternalSwap(&other->field_);
- nested_type_.InternalSwap(&other->nested_type_);
- enum_type_.InternalSwap(&other->enum_type_);
- extension_range_.InternalSwap(&other->extension_range_);
- extension_.InternalSwap(&other->extension_);
- oneof_decl_.InternalSwap(&other->oneof_decl_);
- reserved_range_.InternalSwap(&other->reserved_range_);
- reserved_name_.InternalSwap(&other->reserved_name_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.field_.InternalSwap(&other->_impl_.field_);
+ _impl_.nested_type_.InternalSwap(&other->_impl_.nested_type_);
+ _impl_.enum_type_.InternalSwap(&other->_impl_.enum_type_);
+ _impl_.extension_range_.InternalSwap(&other->_impl_.extension_range_);
+ _impl_.extension_.InternalSwap(&other->_impl_.extension_);
+ _impl_.oneof_decl_.InternalSwap(&other->_impl_.oneof_decl_);
+ _impl_.reserved_range_.InternalSwap(&other->_impl_.reserved_range_);
+ _impl_.reserved_name_.InternalSwap(&other->_impl_.reserved_name_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
- swap(options_, other->options_);
+ swap(_impl_.options_, other->_impl_.options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto::GetMetadata() const {
@@ -3190,21 +3299,32 @@ class ExtensionRangeOptions::_Internal {
ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ExtensionRangeOptions)
}
ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ ExtensionRangeOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions)
}
-inline void ExtensionRangeOptions::SharedCtor() {
+inline void ExtensionRangeOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
ExtensionRangeOptions::~ExtensionRangeOptions() {
@@ -3218,10 +3338,12 @@ ExtensionRangeOptions::~ExtensionRangeOptions() {
inline void ExtensionRangeOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void ExtensionRangeOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void ExtensionRangeOptions::Clear() {
@@ -3230,8 +3352,8 @@ void ExtensionRangeOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -3264,7 +3386,7 @@ const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::_pbi::Parse
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -3297,7 +3419,7 @@ uint8_t* ExtensionRangeOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -3312,7 +3434,7 @@ size_t ExtensionRangeOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ExtensionRangeOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -3320,36 +3442,32 @@ size_t ExtensionRangeOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ExtensionRangeOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
ExtensionRangeOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ExtensionRangeOptions::GetClassData() const { return &_class_data_; }
-void ExtensionRangeOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<ExtensionRangeOptions *>(to)->MergeFrom(
- static_cast<const ExtensionRangeOptions &>(from));
-}
-
-void ExtensionRangeOptions::MergeFrom(const ExtensionRangeOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void ExtensionRangeOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<ExtensionRangeOptions*>(&to_msg);
+ auto& from = static_cast<const ExtensionRangeOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ExtensionRangeOptions::CopyFrom(const ExtensionRangeOptions& from) {
@@ -3360,20 +3478,20 @@ void ExtensionRangeOptions::CopyFrom(const ExtensionRangeOptions& from) {
}
bool ExtensionRangeOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ExtensionRangeOptions::GetMetadata() const {
@@ -3386,7 +3504,7 @@ void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) {
class FieldDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<FieldDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<FieldDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -3425,96 +3543,121 @@ class FieldDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::FieldOptions&
FieldDescriptorProto::_Internal::options(const FieldDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FieldDescriptorProto)
}
FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ FieldDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.extendee_){}
+ , decltype(_impl_.type_name_){}
+ , decltype(_impl_.default_value_){}
+ , decltype(_impl_.json_name_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.number_){}
+ , decltype(_impl_.oneof_index_){}
+ , decltype(_impl_.proto3_optional_){}
+ , decltype(_impl_.label_){}
+ , decltype(_impl_.type_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- extendee_.InitDefault();
+ _impl_.extendee_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- extendee_.Set("", GetArenaForAllocation());
+ _impl_.extendee_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_extendee()) {
- extendee_.Set(from._internal_extendee(),
- GetArenaForAllocation());
+ _this->_impl_.extendee_.Set(from._internal_extendee(),
+ _this->GetArenaForAllocation());
}
- type_name_.InitDefault();
+ _impl_.type_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_name_.Set("", GetArenaForAllocation());
+ _impl_.type_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_type_name()) {
- type_name_.Set(from._internal_type_name(),
- GetArenaForAllocation());
+ _this->_impl_.type_name_.Set(from._internal_type_name(),
+ _this->GetArenaForAllocation());
}
- default_value_.InitDefault();
+ _impl_.default_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- default_value_.Set("", GetArenaForAllocation());
+ _impl_.default_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_default_value()) {
- default_value_.Set(from._internal_default_value(),
- GetArenaForAllocation());
+ _this->_impl_.default_value_.Set(from._internal_default_value(),
+ _this->GetArenaForAllocation());
}
- json_name_.InitDefault();
+ _impl_.json_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- json_name_.Set("", GetArenaForAllocation());
+ _impl_.json_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_json_name()) {
- json_name_.Set(from._internal_json_name(),
- GetArenaForAllocation());
+ _this->_impl_.json_name_.Set(from._internal_json_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::FieldOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::FieldOptions(*from._impl_.options_);
}
- ::memcpy(&number_, &from.number_,
- static_cast<size_t>(reinterpret_cast<char*>(&type_) -
- reinterpret_cast<char*>(&number_)) + sizeof(type_));
+ ::memcpy(&_impl_.number_, &from._impl_.number_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
+ reinterpret_cast<char*>(&_impl_.number_)) + sizeof(_impl_.type_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto)
}
-inline void FieldDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-extendee_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- extendee_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-type_name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-default_value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- default_value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-json_name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- json_name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&proto3_optional_) -
- reinterpret_cast<char*>(&options_)) + sizeof(proto3_optional_));
-label_ = 1;
-type_ = 1;
+inline void FieldDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.extendee_){}
+ , decltype(_impl_.type_name_){}
+ , decltype(_impl_.default_value_){}
+ , decltype(_impl_.json_name_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.number_){0}
+ , decltype(_impl_.oneof_index_){0}
+ , decltype(_impl_.proto3_optional_){false}
+ , decltype(_impl_.label_){1}
+ , decltype(_impl_.type_){1}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.extendee_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.extendee_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.type_name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.type_name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.default_value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.default_value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.json_name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.json_name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
FieldDescriptorProto::~FieldDescriptorProto() {
@@ -3528,16 +3671,16 @@ FieldDescriptorProto::~FieldDescriptorProto() {
inline void FieldDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- extendee_.Destroy();
- type_name_.Destroy();
- default_value_.Destroy();
- json_name_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.name_.Destroy();
+ _impl_.extendee_.Destroy();
+ _impl_.type_name_.Destroy();
+ _impl_.default_value_.Destroy();
+ _impl_.json_name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void FieldDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FieldDescriptorProto::Clear() {
@@ -3546,39 +3689,39 @@ void FieldDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- extendee_.ClearNonDefaultToEmpty();
+ _impl_.extendee_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
- type_name_.ClearNonDefaultToEmpty();
+ _impl_.type_name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
- default_value_.ClearNonDefaultToEmpty();
+ _impl_.default_value_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
- json_name_.ClearNonDefaultToEmpty();
+ _impl_.json_name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000020u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
if (cached_has_bits & 0x000000c0u) {
- ::memset(&number_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&oneof_index_) -
- reinterpret_cast<char*>(&number_)) + sizeof(oneof_index_));
+ ::memset(&_impl_.number_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.oneof_index_) -
+ reinterpret_cast<char*>(&_impl_.number_)) + sizeof(_impl_.oneof_index_));
}
if (cached_has_bits & 0x00000700u) {
- proto3_optional_ = false;
- label_ = 1;
- type_ = 1;
+ _impl_.proto3_optional_ = false;
+ _impl_.label_ = 1;
+ _impl_.type_ = 1;
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -3617,7 +3760,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseC
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_number(&has_bits);
- number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -3684,7 +3827,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseC
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_oneof_index(&has_bits);
- oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -3705,7 +3848,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseC
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
_Internal::set_has_proto3_optional(&has_bits);
- proto3_optional_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.proto3_optional_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -3726,7 +3869,7 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseC
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -3740,7 +3883,7 @@ uint8_t* FieldDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -3846,7 +3989,7 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -3887,7 +4030,7 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000020u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
// optional int32 number = 3;
@@ -3920,69 +4063,66 @@ size_t FieldDescriptorProto::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FieldDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FieldDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FieldDescriptorProto::GetClassData() const { return &_class_data_; }
-void FieldDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FieldDescriptorProto *>(to)->MergeFrom(
- static_cast<const FieldDescriptorProto &>(from));
-}
-
-void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void FieldDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FieldDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const FieldDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_extendee(from._internal_extendee());
+ _this->_internal_set_extendee(from._internal_extendee());
}
if (cached_has_bits & 0x00000004u) {
- _internal_set_type_name(from._internal_type_name());
+ _this->_internal_set_type_name(from._internal_type_name());
}
if (cached_has_bits & 0x00000008u) {
- _internal_set_default_value(from._internal_default_value());
+ _this->_internal_set_default_value(from._internal_default_value());
}
if (cached_has_bits & 0x00000010u) {
- _internal_set_json_name(from._internal_json_name());
+ _this->_internal_set_json_name(from._internal_json_name());
}
if (cached_has_bits & 0x00000020u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::FieldOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::FieldOptions::MergeFrom(
+ from._internal_options());
}
if (cached_has_bits & 0x00000040u) {
- number_ = from.number_;
+ _this->_impl_.number_ = from._impl_.number_;
}
if (cached_has_bits & 0x00000080u) {
- oneof_index_ = from.oneof_index_;
+ _this->_impl_.oneof_index_ = from._impl_.oneof_index_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000700u) {
if (cached_has_bits & 0x00000100u) {
- proto3_optional_ = from.proto3_optional_;
+ _this->_impl_.proto3_optional_ = from._impl_.proto3_optional_;
}
if (cached_has_bits & 0x00000200u) {
- label_ = from.label_;
+ _this->_impl_.label_ = from._impl_.label_;
}
if (cached_has_bits & 0x00000400u) {
- type_ = from.type_;
+ _this->_impl_.type_ = from._impl_.type_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
@@ -3994,7 +4134,7 @@ void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
bool FieldDescriptorProto::IsInitialized() const {
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -4004,35 +4144,35 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &extendee_, lhs_arena,
- &other->extendee_, rhs_arena
+ &_impl_.extendee_, lhs_arena,
+ &other->_impl_.extendee_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &type_name_, lhs_arena,
- &other->type_name_, rhs_arena
+ &_impl_.type_name_, lhs_arena,
+ &other->_impl_.type_name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &default_value_, lhs_arena,
- &other->default_value_, rhs_arena
+ &_impl_.default_value_, lhs_arena,
+ &other->_impl_.default_value_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &json_name_, lhs_arena,
- &other->json_name_, rhs_arena
+ &_impl_.json_name_, lhs_arena,
+ &other->_impl_.json_name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, proto3_optional_)
- + sizeof(FieldDescriptorProto::proto3_optional_)
- - PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, options_)>(
- reinterpret_cast<char*>(&options_),
- reinterpret_cast<char*>(&other->options_));
- swap(label_, other->label_);
- swap(type_, other->type_);
+ PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_.proto3_optional_)
+ + sizeof(FieldDescriptorProto::_impl_.proto3_optional_)
+ - PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_.options_)>(
+ reinterpret_cast<char*>(&_impl_.options_),
+ reinterpret_cast<char*>(&other->_impl_.options_));
+ swap(_impl_.label_, other->_impl_.label_);
+ swap(_impl_.type_, other->_impl_.type_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldDescriptorProto::GetMetadata() const {
@@ -4045,7 +4185,7 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
class OneofDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<OneofDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<OneofDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -4057,40 +4197,52 @@ class OneofDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::OneofOptions&
OneofDescriptorProto::_Internal::options(const OneofDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.OneofDescriptorProto)
}
OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ OneofDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::OneofOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::OneofOptions(*from._impl_.options_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto)
}
-inline void OneofDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-options_ = nullptr;
+inline void OneofDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
OneofDescriptorProto::~OneofDescriptorProto() {
@@ -4104,12 +4256,12 @@ OneofDescriptorProto::~OneofDescriptorProto() {
inline void OneofDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void OneofDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void OneofDescriptorProto::Clear() {
@@ -4118,17 +4270,17 @@ void OneofDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -4175,7 +4327,7 @@ const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseC
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -4189,7 +4341,7 @@ uint8_t* OneofDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -4223,7 +4375,7 @@ size_t OneofDescriptorProto::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -4236,42 +4388,39 @@ size_t OneofDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OneofDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
OneofDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OneofDescriptorProto::GetClassData() const { return &_class_data_; }
-void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<OneofDescriptorProto *>(to)->MergeFrom(
- static_cast<const OneofDescriptorProto &>(from));
-}
-
-void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<OneofDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const OneofDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom(
+ from._internal_options());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
@@ -4283,7 +4432,7 @@ void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
bool OneofDescriptorProto::IsInitialized() const {
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -4293,12 +4442,12 @@ void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
- swap(options_, other->options_);
+ swap(_impl_.options_, other->_impl_.options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata OneofDescriptorProto::GetMetadata() const {
@@ -4311,7 +4460,7 @@ void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
class EnumDescriptorProto_EnumReservedRange::_Internal {
public:
- using HasBits = decltype(std::declval<EnumDescriptorProto_EnumReservedRange>()._has_bits_);
+ using HasBits = decltype(std::declval<EnumDescriptorProto_EnumReservedRange>()._impl_._has_bits_);
static void set_has_start(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -4323,24 +4472,35 @@ class EnumDescriptorProto_EnumReservedRange::_Internal {
EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange)
}
EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ EnumDescriptorProto_EnumReservedRange* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.start_){}
+ , decltype(_impl_.end_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&start_, &from.start_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memcpy(&_impl_.start_, &from._impl_.start_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange)
}
-inline void EnumDescriptorProto_EnumReservedRange::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&start_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+inline void EnumDescriptorProto_EnumReservedRange::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.start_){0}
+ , decltype(_impl_.end_){0}
+ };
}
EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange() {
@@ -4357,7 +4517,7 @@ inline void EnumDescriptorProto_EnumReservedRange::SharedDtor() {
}
void EnumDescriptorProto_EnumReservedRange::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void EnumDescriptorProto_EnumReservedRange::Clear() {
@@ -4366,13 +4526,13 @@ void EnumDescriptorProto_EnumReservedRange::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- ::memset(&start_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
+ ::memset(&_impl_.start_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -4387,7 +4547,7 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_start(&has_bits);
- start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -4396,7 +4556,7 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end(&has_bits);
- end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -4417,7 +4577,7 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -4431,7 +4591,7 @@ uint8_t* EnumDescriptorProto_EnumReservedRange::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional int32 start = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -4460,7 +4620,7 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional int32 start = 1;
if (cached_has_bits & 0x00000001u) {
@@ -4473,39 +4633,35 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumDescriptorProto_EnumReservedRange::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumDescriptorProto_EnumReservedRange::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumDescriptorProto_EnumReservedRange::GetClassData() const { return &_class_data_; }
-void EnumDescriptorProto_EnumReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<EnumDescriptorProto_EnumReservedRange *>(to)->MergeFrom(
- static_cast<const EnumDescriptorProto_EnumReservedRange &>(from));
-}
-
-void EnumDescriptorProto_EnumReservedRange::MergeFrom(const EnumDescriptorProto_EnumReservedRange& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
- GOOGLE_DCHECK_NE(&from, this);
+void EnumDescriptorProto_EnumReservedRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<EnumDescriptorProto_EnumReservedRange*>(&to_msg);
+ auto& from = static_cast<const EnumDescriptorProto_EnumReservedRange&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- start_ = from.start_;
+ _this->_impl_.start_ = from._impl_.start_;
}
if (cached_has_bits & 0x00000002u) {
- end_ = from.end_;
+ _this->_impl_.end_ = from._impl_.end_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumDescriptorProto_EnumReservedRange::CopyFrom(const EnumDescriptorProto_EnumReservedRange& from) {
@@ -4522,13 +4678,13 @@ bool EnumDescriptorProto_EnumReservedRange::IsInitialized() const {
void EnumDescriptorProto_EnumReservedRange::InternalSwap(EnumDescriptorProto_EnumReservedRange* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, end_)
- + sizeof(EnumDescriptorProto_EnumReservedRange::end_)
- - PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, start_)>(
- reinterpret_cast<char*>(&start_),
- reinterpret_cast<char*>(&other->start_));
+ PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, _impl_.end_)
+ + sizeof(EnumDescriptorProto_EnumReservedRange::_impl_.end_)
+ - PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, _impl_.start_)>(
+ reinterpret_cast<char*>(&_impl_.start_),
+ reinterpret_cast<char*>(&other->_impl_.start_));
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto_EnumReservedRange::GetMetadata() const {
@@ -4541,7 +4697,7 @@ void EnumDescriptorProto_EnumReservedRange::InternalSwap(EnumDescriptorProto_Enu
class EnumDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<EnumDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<EnumDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -4553,46 +4709,58 @@ class EnumDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::EnumOptions&
EnumDescriptorProto::_Internal::options(const EnumDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- value_(arena),
- reserved_range_(arena),
- reserved_name_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto)
}
EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- value_(from.value_),
- reserved_range_(from.reserved_range_),
- reserved_name_(from.reserved_name_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ EnumDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.value_){from._impl_.value_}
+ , decltype(_impl_.reserved_range_){from._impl_.reserved_range_}
+ , decltype(_impl_.reserved_name_){from._impl_.reserved_name_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::EnumOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::EnumOptions(*from._impl_.options_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto)
}
-inline void EnumDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-options_ = nullptr;
+inline void EnumDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.value_){arena}
+ , decltype(_impl_.reserved_range_){arena}
+ , decltype(_impl_.reserved_name_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
EnumDescriptorProto::~EnumDescriptorProto() {
@@ -4606,12 +4774,15 @@ EnumDescriptorProto::~EnumDescriptorProto() {
inline void EnumDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.value_.~RepeatedPtrField();
+ _impl_.reserved_range_.~RepeatedPtrField();
+ _impl_.reserved_name_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void EnumDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void EnumDescriptorProto::Clear() {
@@ -4620,20 +4791,20 @@ void EnumDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_.Clear();
- reserved_range_.Clear();
- reserved_name_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.value_.Clear();
+ _impl_.reserved_range_.Clear();
+ _impl_.reserved_name_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -4723,7 +4894,7 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseCo
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -4737,7 +4908,7 @@ uint8_t* EnumDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -4799,27 +4970,27 @@ size_t EnumDescriptorProto::ByteSizeLong() const {
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
total_size += 1UL * this->_internal_value_size();
- for (const auto& msg : this->value_) {
+ for (const auto& msg : this->_impl_.value_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
total_size += 1UL * this->_internal_reserved_range_size();
- for (const auto& msg : this->reserved_range_) {
+ for (const auto& msg : this->_impl_.reserved_range_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated string reserved_name = 5;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(reserved_name_.size());
- for (int i = 0, n = reserved_name_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.reserved_name_.size());
+ for (int i = 0, n = _impl_.reserved_name_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- reserved_name_.Get(i));
+ _impl_.reserved_name_.Get(i));
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -4832,45 +5003,42 @@ size_t EnumDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumDescriptorProto::GetClassData() const { return &_class_data_; }
-void EnumDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<EnumDescriptorProto *>(to)->MergeFrom(
- static_cast<const EnumDescriptorProto &>(from));
-}
-
-void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void EnumDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<EnumDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const EnumDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- value_.MergeFrom(from.value_);
- reserved_range_.MergeFrom(from.reserved_range_);
- reserved_name_.MergeFrom(from.reserved_name_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.value_.MergeFrom(from._impl_.value_);
+ _this->_impl_.reserved_range_.MergeFrom(from._impl_.reserved_range_);
+ _this->_impl_.reserved_name_.MergeFrom(from._impl_.reserved_name_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::EnumOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::EnumOptions::MergeFrom(
+ from._internal_options());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
@@ -4881,10 +5049,10 @@ void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
}
bool EnumDescriptorProto::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(value_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.value_))
return false;
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -4894,15 +5062,15 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- value_.InternalSwap(&other->value_);
- reserved_range_.InternalSwap(&other->reserved_range_);
- reserved_name_.InternalSwap(&other->reserved_name_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.value_.InternalSwap(&other->_impl_.value_);
+ _impl_.reserved_range_.InternalSwap(&other->_impl_.reserved_range_);
+ _impl_.reserved_name_.InternalSwap(&other->_impl_.reserved_name_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
- swap(options_, other->options_);
+ swap(_impl_.options_, other->_impl_.options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto::GetMetadata() const {
@@ -4915,7 +5083,7 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
class EnumValueDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<EnumValueDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<EnumValueDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -4930,44 +5098,55 @@ class EnumValueDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions&
EnumValueDescriptorProto::_Internal::options(const EnumValueDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueDescriptorProto)
}
EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ EnumValueDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.number_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::EnumValueOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::EnumValueOptions(*from._impl_.options_);
}
- number_ = from.number_;
+ _this->_impl_.number_ = from._impl_.number_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto)
}
-inline void EnumValueDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&number_) -
- reinterpret_cast<char*>(&options_)) + sizeof(number_));
+inline void EnumValueDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.number_){0}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
EnumValueDescriptorProto::~EnumValueDescriptorProto() {
@@ -4981,12 +5160,12 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() {
inline void EnumValueDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void EnumValueDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void EnumValueDescriptorProto::Clear() {
@@ -4995,18 +5174,18 @@ void EnumValueDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
- number_ = 0;
- _has_bits_.Clear();
+ _impl_.number_ = 0;
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -5033,7 +5212,7 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::_pbi::Pa
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_number(&has_bits);
- number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -5062,7 +5241,7 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::_pbi::Pa
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -5076,7 +5255,7 @@ uint8_t* EnumValueDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -5116,7 +5295,7 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -5129,7 +5308,7 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
// optional int32 number = 2;
@@ -5138,42 +5317,39 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumValueDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumValueDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumValueDescriptorProto::GetClassData() const { return &_class_data_; }
-void EnumValueDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<EnumValueDescriptorProto *>(to)->MergeFrom(
- static_cast<const EnumValueDescriptorProto &>(from));
-}
-
-void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void EnumValueDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<EnumValueDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const EnumValueDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::EnumValueOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::EnumValueOptions::MergeFrom(
+ from._internal_options());
}
if (cached_has_bits & 0x00000004u) {
- number_ = from.number_;
+ _this->_impl_.number_ = from._impl_.number_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
@@ -5185,7 +5361,7 @@ void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
bool EnumValueDescriptorProto::IsInitialized() const {
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -5195,17 +5371,17 @@ void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, number_)
- + sizeof(EnumValueDescriptorProto::number_)
- - PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, options_)>(
- reinterpret_cast<char*>(&options_),
- reinterpret_cast<char*>(&other->options_));
+ PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, _impl_.number_)
+ + sizeof(EnumValueDescriptorProto::_impl_.number_)
+ - PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, _impl_.options_)>(
+ reinterpret_cast<char*>(&_impl_.options_),
+ reinterpret_cast<char*>(&other->_impl_.options_));
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValueDescriptorProto::GetMetadata() const {
@@ -5218,7 +5394,7 @@ void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
class ServiceDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<ServiceDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<ServiceDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -5230,42 +5406,54 @@ class ServiceDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::ServiceOptions&
ServiceDescriptorProto::_Internal::options(const ServiceDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- method_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceDescriptorProto)
}
ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- method_(from.method_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ ServiceDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.method_){from._impl_.method_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::ServiceOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::ServiceOptions(*from._impl_.options_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto)
}
-inline void ServiceDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-options_ = nullptr;
+inline void ServiceDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.method_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.options_){nullptr}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ServiceDescriptorProto::~ServiceDescriptorProto() {
@@ -5279,12 +5467,13 @@ ServiceDescriptorProto::~ServiceDescriptorProto() {
inline void ServiceDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.method_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void ServiceDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void ServiceDescriptorProto::Clear() {
@@ -5293,18 +5482,18 @@ void ServiceDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- method_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.method_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -5364,7 +5553,7 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::_pbi::Pars
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -5378,7 +5567,7 @@ uint8_t* ServiceDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -5422,12 +5611,12 @@ size_t ServiceDescriptorProto::ByteSizeLong() const {
// repeated .google.protobuf.MethodDescriptorProto method = 2;
total_size += 1UL * this->_internal_method_size();
- for (const auto& msg : this->method_) {
+ for (const auto& msg : this->_impl_.method_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -5440,43 +5629,40 @@ size_t ServiceDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ServiceDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
ServiceDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ServiceDescriptorProto::GetClassData() const { return &_class_data_; }
-void ServiceDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<ServiceDescriptorProto *>(to)->MergeFrom(
- static_cast<const ServiceDescriptorProto &>(from));
-}
-
-void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void ServiceDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<ServiceDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const ServiceDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- method_.MergeFrom(from.method_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.method_.MergeFrom(from._impl_.method_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::ServiceOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::ServiceOptions::MergeFrom(
+ from._internal_options());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
@@ -5487,10 +5673,10 @@ void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
}
bool ServiceDescriptorProto::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(method_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.method_))
return false;
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -5500,13 +5686,13 @@ void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- method_.InternalSwap(&other->method_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.method_.InternalSwap(&other->_impl_.method_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
- swap(options_, other->options_);
+ swap(_impl_.options_, other->_impl_.options_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ServiceDescriptorProto::GetMetadata() const {
@@ -5519,7 +5705,7 @@ void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) {
class MethodDescriptorProto::_Internal {
public:
- using HasBits = decltype(std::declval<MethodDescriptorProto>()._has_bits_);
+ using HasBits = decltype(std::declval<MethodDescriptorProto>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -5543,70 +5729,87 @@ class MethodDescriptorProto::_Internal {
const ::PROTOBUF_NAMESPACE_ID::MethodOptions&
MethodDescriptorProto::_Internal::options(const MethodDescriptorProto* msg) {
- return *msg->options_;
+ return *msg->_impl_.options_;
}
MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.MethodDescriptorProto)
}
MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ MethodDescriptorProto* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.input_type_){}
+ , decltype(_impl_.output_type_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.client_streaming_){}
+ , decltype(_impl_.server_streaming_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- input_type_.InitDefault();
+ _impl_.input_type_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- input_type_.Set("", GetArenaForAllocation());
+ _impl_.input_type_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_input_type()) {
- input_type_.Set(from._internal_input_type(),
- GetArenaForAllocation());
+ _this->_impl_.input_type_.Set(from._internal_input_type(),
+ _this->GetArenaForAllocation());
}
- output_type_.InitDefault();
+ _impl_.output_type_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- output_type_.Set("", GetArenaForAllocation());
+ _impl_.output_type_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_output_type()) {
- output_type_.Set(from._internal_output_type(),
- GetArenaForAllocation());
+ _this->_impl_.output_type_.Set(from._internal_output_type(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_options()) {
- options_ = new ::PROTOBUF_NAMESPACE_ID::MethodOptions(*from.options_);
- } else {
- options_ = nullptr;
+ _this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::MethodOptions(*from._impl_.options_);
}
- ::memcpy(&client_streaming_, &from.client_streaming_,
- static_cast<size_t>(reinterpret_cast<char*>(&server_streaming_) -
- reinterpret_cast<char*>(&client_streaming_)) + sizeof(server_streaming_));
+ ::memcpy(&_impl_.client_streaming_, &from._impl_.client_streaming_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.server_streaming_) -
+ reinterpret_cast<char*>(&_impl_.client_streaming_)) + sizeof(_impl_.server_streaming_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto)
}
-inline void MethodDescriptorProto::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-input_type_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- input_type_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-output_type_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- output_type_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&options_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&server_streaming_) -
- reinterpret_cast<char*>(&options_)) + sizeof(server_streaming_));
+inline void MethodDescriptorProto::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.input_type_){}
+ , decltype(_impl_.output_type_){}
+ , decltype(_impl_.options_){nullptr}
+ , decltype(_impl_.client_streaming_){false}
+ , decltype(_impl_.server_streaming_){false}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.input_type_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.input_type_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.output_type_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.output_type_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
MethodDescriptorProto::~MethodDescriptorProto() {
@@ -5620,14 +5823,14 @@ MethodDescriptorProto::~MethodDescriptorProto() {
inline void MethodDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- input_type_.Destroy();
- output_type_.Destroy();
- if (this != internal_default_instance()) delete options_;
+ _impl_.name_.Destroy();
+ _impl_.input_type_.Destroy();
+ _impl_.output_type_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.options_;
}
void MethodDescriptorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void MethodDescriptorProto::Clear() {
@@ -5636,26 +5839,26 @@ void MethodDescriptorProto::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- input_type_.ClearNonDefaultToEmpty();
+ _impl_.input_type_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
- output_type_.ClearNonDefaultToEmpty();
+ _impl_.output_type_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
- GOOGLE_DCHECK(options_ != nullptr);
- options_->Clear();
+ GOOGLE_DCHECK(_impl_.options_ != nullptr);
+ _impl_.options_->Clear();
}
}
- ::memset(&client_streaming_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&server_streaming_) -
- reinterpret_cast<char*>(&client_streaming_)) + sizeof(server_streaming_));
- _has_bits_.Clear();
+ ::memset(&_impl_.client_streaming_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.server_streaming_) -
+ reinterpret_cast<char*>(&_impl_.client_streaming_)) + sizeof(_impl_.server_streaming_));
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -5714,7 +5917,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::_pbi::Parse
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_client_streaming(&has_bits);
- client_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.client_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -5723,7 +5926,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::_pbi::Parse
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_server_streaming(&has_bits);
- server_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.server_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -5744,7 +5947,7 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::_pbi::Parse
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -5758,7 +5961,7 @@ uint8_t* MethodDescriptorProto::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -5824,7 +6027,7 @@ size_t MethodDescriptorProto::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -5851,7 +6054,7 @@ size_t MethodDescriptorProto::ByteSizeLong() const {
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *options_);
+ *_impl_.options_);
}
// optional bool client_streaming = 5 [default = false];
@@ -5865,51 +6068,48 @@ size_t MethodDescriptorProto::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MethodDescriptorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
MethodDescriptorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MethodDescriptorProto::GetClassData() const { return &_class_data_; }
-void MethodDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<MethodDescriptorProto *>(to)->MergeFrom(
- static_cast<const MethodDescriptorProto &>(from));
-}
-
-void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto)
- GOOGLE_DCHECK_NE(&from, this);
+void MethodDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<MethodDescriptorProto*>(&to_msg);
+ auto& from = static_cast<const MethodDescriptorProto&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_input_type(from._internal_input_type());
+ _this->_internal_set_input_type(from._internal_input_type());
}
if (cached_has_bits & 0x00000004u) {
- _internal_set_output_type(from._internal_output_type());
+ _this->_internal_set_output_type(from._internal_output_type());
}
if (cached_has_bits & 0x00000008u) {
- _internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::MethodOptions::MergeFrom(from._internal_options());
+ _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::MethodOptions::MergeFrom(
+ from._internal_options());
}
if (cached_has_bits & 0x00000010u) {
- client_streaming_ = from.client_streaming_;
+ _this->_impl_.client_streaming_ = from._impl_.client_streaming_;
}
if (cached_has_bits & 0x00000020u) {
- server_streaming_ = from.server_streaming_;
+ _this->_impl_.server_streaming_ = from._impl_.server_streaming_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
@@ -5921,7 +6121,7 @@ void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
bool MethodDescriptorProto::IsInitialized() const {
if (_internal_has_options()) {
- if (!options_->IsInitialized()) return false;
+ if (!_impl_.options_->IsInitialized()) return false;
}
return true;
}
@@ -5931,25 +6131,25 @@ void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &input_type_, lhs_arena,
- &other->input_type_, rhs_arena
+ &_impl_.input_type_, lhs_arena,
+ &other->_impl_.input_type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &output_type_, lhs_arena,
- &other->output_type_, rhs_arena
+ &_impl_.output_type_, lhs_arena,
+ &other->_impl_.output_type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, server_streaming_)
- + sizeof(MethodDescriptorProto::server_streaming_)
- - PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, options_)>(
- reinterpret_cast<char*>(&options_),
- reinterpret_cast<char*>(&other->options_));
+ PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, _impl_.server_streaming_)
+ + sizeof(MethodDescriptorProto::_impl_.server_streaming_)
+ - PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, _impl_.options_)>(
+ reinterpret_cast<char*>(&_impl_.options_),
+ reinterpret_cast<char*>(&other->_impl_.options_));
}
::PROTOBUF_NAMESPACE_ID::Metadata MethodDescriptorProto::GetMetadata() const {
@@ -5962,7 +6162,7 @@ void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) {
class FileOptions::_Internal {
public:
- using HasBits = decltype(std::declval<FileOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<FileOptions>()._impl_._has_bits_);
static void set_has_java_package(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -6027,151 +6227,197 @@ class FileOptions::_Internal {
FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FileOptions)
}
FileOptions::FileOptions(const FileOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ FileOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.java_package_){}
+ , decltype(_impl_.java_outer_classname_){}
+ , decltype(_impl_.go_package_){}
+ , decltype(_impl_.objc_class_prefix_){}
+ , decltype(_impl_.csharp_namespace_){}
+ , decltype(_impl_.swift_prefix_){}
+ , decltype(_impl_.php_class_prefix_){}
+ , decltype(_impl_.php_namespace_){}
+ , decltype(_impl_.php_metadata_namespace_){}
+ , decltype(_impl_.ruby_package_){}
+ , decltype(_impl_.java_multiple_files_){}
+ , decltype(_impl_.java_generate_equals_and_hash_){}
+ , decltype(_impl_.java_string_check_utf8_){}
+ , decltype(_impl_.cc_generic_services_){}
+ , decltype(_impl_.java_generic_services_){}
+ , decltype(_impl_.py_generic_services_){}
+ , decltype(_impl_.php_generic_services_){}
+ , decltype(_impl_.deprecated_){}
+ , decltype(_impl_.optimize_for_){}
+ , decltype(_impl_.cc_enable_arenas_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- java_package_.InitDefault();
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _impl_.java_package_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- java_package_.Set("", GetArenaForAllocation());
+ _impl_.java_package_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_java_package()) {
- java_package_.Set(from._internal_java_package(),
- GetArenaForAllocation());
+ _this->_impl_.java_package_.Set(from._internal_java_package(),
+ _this->GetArenaForAllocation());
}
- java_outer_classname_.InitDefault();
+ _impl_.java_outer_classname_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- java_outer_classname_.Set("", GetArenaForAllocation());
+ _impl_.java_outer_classname_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_java_outer_classname()) {
- java_outer_classname_.Set(from._internal_java_outer_classname(),
- GetArenaForAllocation());
+ _this->_impl_.java_outer_classname_.Set(from._internal_java_outer_classname(),
+ _this->GetArenaForAllocation());
}
- go_package_.InitDefault();
+ _impl_.go_package_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- go_package_.Set("", GetArenaForAllocation());
+ _impl_.go_package_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_go_package()) {
- go_package_.Set(from._internal_go_package(),
- GetArenaForAllocation());
+ _this->_impl_.go_package_.Set(from._internal_go_package(),
+ _this->GetArenaForAllocation());
}
- objc_class_prefix_.InitDefault();
+ _impl_.objc_class_prefix_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- objc_class_prefix_.Set("", GetArenaForAllocation());
+ _impl_.objc_class_prefix_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_objc_class_prefix()) {
- objc_class_prefix_.Set(from._internal_objc_class_prefix(),
- GetArenaForAllocation());
+ _this->_impl_.objc_class_prefix_.Set(from._internal_objc_class_prefix(),
+ _this->GetArenaForAllocation());
}
- csharp_namespace_.InitDefault();
+ _impl_.csharp_namespace_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- csharp_namespace_.Set("", GetArenaForAllocation());
+ _impl_.csharp_namespace_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_csharp_namespace()) {
- csharp_namespace_.Set(from._internal_csharp_namespace(),
- GetArenaForAllocation());
+ _this->_impl_.csharp_namespace_.Set(from._internal_csharp_namespace(),
+ _this->GetArenaForAllocation());
}
- swift_prefix_.InitDefault();
+ _impl_.swift_prefix_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- swift_prefix_.Set("", GetArenaForAllocation());
+ _impl_.swift_prefix_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_swift_prefix()) {
- swift_prefix_.Set(from._internal_swift_prefix(),
- GetArenaForAllocation());
+ _this->_impl_.swift_prefix_.Set(from._internal_swift_prefix(),
+ _this->GetArenaForAllocation());
}
- php_class_prefix_.InitDefault();
+ _impl_.php_class_prefix_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- php_class_prefix_.Set("", GetArenaForAllocation());
+ _impl_.php_class_prefix_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_php_class_prefix()) {
- php_class_prefix_.Set(from._internal_php_class_prefix(),
- GetArenaForAllocation());
+ _this->_impl_.php_class_prefix_.Set(from._internal_php_class_prefix(),
+ _this->GetArenaForAllocation());
}
- php_namespace_.InitDefault();
+ _impl_.php_namespace_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- php_namespace_.Set("", GetArenaForAllocation());
+ _impl_.php_namespace_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_php_namespace()) {
- php_namespace_.Set(from._internal_php_namespace(),
- GetArenaForAllocation());
+ _this->_impl_.php_namespace_.Set(from._internal_php_namespace(),
+ _this->GetArenaForAllocation());
}
- php_metadata_namespace_.InitDefault();
+ _impl_.php_metadata_namespace_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- php_metadata_namespace_.Set("", GetArenaForAllocation());
+ _impl_.php_metadata_namespace_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_php_metadata_namespace()) {
- php_metadata_namespace_.Set(from._internal_php_metadata_namespace(),
- GetArenaForAllocation());
+ _this->_impl_.php_metadata_namespace_.Set(from._internal_php_metadata_namespace(),
+ _this->GetArenaForAllocation());
}
- ruby_package_.InitDefault();
+ _impl_.ruby_package_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ruby_package_.Set("", GetArenaForAllocation());
+ _impl_.ruby_package_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_ruby_package()) {
- ruby_package_.Set(from._internal_ruby_package(),
- GetArenaForAllocation());
+ _this->_impl_.ruby_package_.Set(from._internal_ruby_package(),
+ _this->GetArenaForAllocation());
}
- ::memcpy(&java_multiple_files_, &from.java_multiple_files_,
- static_cast<size_t>(reinterpret_cast<char*>(&cc_enable_arenas_) -
- reinterpret_cast<char*>(&java_multiple_files_)) + sizeof(cc_enable_arenas_));
+ ::memcpy(&_impl_.java_multiple_files_, &from._impl_.java_multiple_files_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.cc_enable_arenas_) -
+ reinterpret_cast<char*>(&_impl_.java_multiple_files_)) + sizeof(_impl_.cc_enable_arenas_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions)
}
-inline void FileOptions::SharedCtor() {
-java_package_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- java_package_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-java_outer_classname_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- java_outer_classname_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-go_package_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- go_package_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-objc_class_prefix_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- objc_class_prefix_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-csharp_namespace_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- csharp_namespace_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-swift_prefix_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- swift_prefix_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-php_class_prefix_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- php_class_prefix_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-php_namespace_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- php_namespace_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-php_metadata_namespace_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- php_metadata_namespace_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-ruby_package_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ruby_package_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&java_multiple_files_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
- reinterpret_cast<char*>(&java_multiple_files_)) + sizeof(deprecated_));
-optimize_for_ = 1;
-cc_enable_arenas_ = true;
+inline void FileOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.java_package_){}
+ , decltype(_impl_.java_outer_classname_){}
+ , decltype(_impl_.go_package_){}
+ , decltype(_impl_.objc_class_prefix_){}
+ , decltype(_impl_.csharp_namespace_){}
+ , decltype(_impl_.swift_prefix_){}
+ , decltype(_impl_.php_class_prefix_){}
+ , decltype(_impl_.php_namespace_){}
+ , decltype(_impl_.php_metadata_namespace_){}
+ , decltype(_impl_.ruby_package_){}
+ , decltype(_impl_.java_multiple_files_){false}
+ , decltype(_impl_.java_generate_equals_and_hash_){false}
+ , decltype(_impl_.java_string_check_utf8_){false}
+ , decltype(_impl_.cc_generic_services_){false}
+ , decltype(_impl_.java_generic_services_){false}
+ , decltype(_impl_.py_generic_services_){false}
+ , decltype(_impl_.php_generic_services_){false}
+ , decltype(_impl_.deprecated_){false}
+ , decltype(_impl_.optimize_for_){1}
+ , decltype(_impl_.cc_enable_arenas_){true}
+ };
+ _impl_.java_package_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.java_package_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.java_outer_classname_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.java_outer_classname_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.go_package_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.go_package_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.objc_class_prefix_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.objc_class_prefix_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.csharp_namespace_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.csharp_namespace_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.swift_prefix_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.swift_prefix_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.php_class_prefix_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.php_class_prefix_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.php_namespace_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.php_namespace_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.php_metadata_namespace_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.php_metadata_namespace_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.ruby_package_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.ruby_package_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
FileOptions::~FileOptions() {
@@ -6185,20 +6431,22 @@ FileOptions::~FileOptions() {
inline void FileOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- java_package_.Destroy();
- java_outer_classname_.Destroy();
- go_package_.Destroy();
- objc_class_prefix_.Destroy();
- csharp_namespace_.Destroy();
- swift_prefix_.Destroy();
- php_class_prefix_.Destroy();
- php_namespace_.Destroy();
- php_metadata_namespace_.Destroy();
- ruby_package_.Destroy();
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
+ _impl_.java_package_.Destroy();
+ _impl_.java_outer_classname_.Destroy();
+ _impl_.go_package_.Destroy();
+ _impl_.objc_class_prefix_.Destroy();
+ _impl_.csharp_namespace_.Destroy();
+ _impl_.swift_prefix_.Destroy();
+ _impl_.php_class_prefix_.Destroy();
+ _impl_.php_namespace_.Destroy();
+ _impl_.php_metadata_namespace_.Destroy();
+ _impl_.ruby_package_.Destroy();
}
void FileOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FileOptions::Clear() {
@@ -6207,56 +6455,56 @@ void FileOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
- java_package_.ClearNonDefaultToEmpty();
+ _impl_.java_package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- java_outer_classname_.ClearNonDefaultToEmpty();
+ _impl_.java_outer_classname_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
- go_package_.ClearNonDefaultToEmpty();
+ _impl_.go_package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
- objc_class_prefix_.ClearNonDefaultToEmpty();
+ _impl_.objc_class_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
- csharp_namespace_.ClearNonDefaultToEmpty();
+ _impl_.csharp_namespace_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000020u) {
- swift_prefix_.ClearNonDefaultToEmpty();
+ _impl_.swift_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000040u) {
- php_class_prefix_.ClearNonDefaultToEmpty();
+ _impl_.php_class_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000080u) {
- php_namespace_.ClearNonDefaultToEmpty();
+ _impl_.php_namespace_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x00000300u) {
if (cached_has_bits & 0x00000100u) {
- php_metadata_namespace_.ClearNonDefaultToEmpty();
+ _impl_.php_metadata_namespace_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000200u) {
- ruby_package_.ClearNonDefaultToEmpty();
+ _impl_.ruby_package_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x0000fc00u) {
- ::memset(&java_multiple_files_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&py_generic_services_) -
- reinterpret_cast<char*>(&java_multiple_files_)) + sizeof(py_generic_services_));
+ ::memset(&_impl_.java_multiple_files_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.py_generic_services_) -
+ reinterpret_cast<char*>(&_impl_.java_multiple_files_)) + sizeof(_impl_.py_generic_services_));
}
if (cached_has_bits & 0x000f0000u) {
- ::memset(&php_generic_services_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&deprecated_) -
- reinterpret_cast<char*>(&php_generic_services_)) + sizeof(deprecated_));
- optimize_for_ = 1;
- cc_enable_arenas_ = true;
+ ::memset(&_impl_.php_generic_services_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.deprecated_) -
+ reinterpret_cast<char*>(&_impl_.php_generic_services_)) + sizeof(_impl_.deprecated_));
+ _impl_.optimize_for_ = 1;
+ _impl_.cc_enable_arenas_ = true;
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -6308,7 +6556,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_java_multiple_files(&has_bits);
- java_multiple_files_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.java_multiple_files_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6329,7 +6577,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
_Internal::set_has_cc_generic_services(&has_bits);
- cc_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.cc_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6338,7 +6586,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
_Internal::set_has_java_generic_services(&has_bits);
- java_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.java_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6347,7 +6595,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 18:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
_Internal::set_has_py_generic_services(&has_bits);
- py_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.py_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6356,7 +6604,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 20:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
_Internal::set_has_java_generate_equals_and_hash(&has_bits);
- java_generate_equals_and_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.java_generate_equals_and_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6365,7 +6613,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 23:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6374,7 +6622,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 27:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 216)) {
_Internal::set_has_java_string_check_utf8(&has_bits);
- java_string_check_utf8_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.java_string_check_utf8_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6383,7 +6631,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 31:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 248)) {
_Internal::set_has_cc_enable_arenas(&has_bits);
- cc_enable_arenas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.cc_enable_arenas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6452,7 +6700,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 42:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_php_generic_services(&has_bits);
- php_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.php_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -6504,7 +6752,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -6515,7 +6763,7 @@ const char* FileOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -6529,7 +6777,7 @@ uint8_t* FileOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string java_package = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -6700,7 +6948,7 @@ uint8_t* FileOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -6715,7 +6963,7 @@ size_t FileOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -6723,12 +6971,12 @@ size_t FileOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string java_package = 1;
if (cached_has_bits & 0x00000001u) {
@@ -6856,100 +7104,96 @@ size_t FileOptions::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FileOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FileOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FileOptions::GetClassData() const { return &_class_data_; }
-void FileOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FileOptions *>(to)->MergeFrom(
- static_cast<const FileOptions &>(from));
-}
-
-void FileOptions::MergeFrom(const FileOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void FileOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FileOptions*>(&to_msg);
+ auto& from = static_cast<const FileOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_java_package(from._internal_java_package());
+ _this->_internal_set_java_package(from._internal_java_package());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_java_outer_classname(from._internal_java_outer_classname());
+ _this->_internal_set_java_outer_classname(from._internal_java_outer_classname());
}
if (cached_has_bits & 0x00000004u) {
- _internal_set_go_package(from._internal_go_package());
+ _this->_internal_set_go_package(from._internal_go_package());
}
if (cached_has_bits & 0x00000008u) {
- _internal_set_objc_class_prefix(from._internal_objc_class_prefix());
+ _this->_internal_set_objc_class_prefix(from._internal_objc_class_prefix());
}
if (cached_has_bits & 0x00000010u) {
- _internal_set_csharp_namespace(from._internal_csharp_namespace());
+ _this->_internal_set_csharp_namespace(from._internal_csharp_namespace());
}
if (cached_has_bits & 0x00000020u) {
- _internal_set_swift_prefix(from._internal_swift_prefix());
+ _this->_internal_set_swift_prefix(from._internal_swift_prefix());
}
if (cached_has_bits & 0x00000040u) {
- _internal_set_php_class_prefix(from._internal_php_class_prefix());
+ _this->_internal_set_php_class_prefix(from._internal_php_class_prefix());
}
if (cached_has_bits & 0x00000080u) {
- _internal_set_php_namespace(from._internal_php_namespace());
+ _this->_internal_set_php_namespace(from._internal_php_namespace());
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
- _internal_set_php_metadata_namespace(from._internal_php_metadata_namespace());
+ _this->_internal_set_php_metadata_namespace(from._internal_php_metadata_namespace());
}
if (cached_has_bits & 0x00000200u) {
- _internal_set_ruby_package(from._internal_ruby_package());
+ _this->_internal_set_ruby_package(from._internal_ruby_package());
}
if (cached_has_bits & 0x00000400u) {
- java_multiple_files_ = from.java_multiple_files_;
+ _this->_impl_.java_multiple_files_ = from._impl_.java_multiple_files_;
}
if (cached_has_bits & 0x00000800u) {
- java_generate_equals_and_hash_ = from.java_generate_equals_and_hash_;
+ _this->_impl_.java_generate_equals_and_hash_ = from._impl_.java_generate_equals_and_hash_;
}
if (cached_has_bits & 0x00001000u) {
- java_string_check_utf8_ = from.java_string_check_utf8_;
+ _this->_impl_.java_string_check_utf8_ = from._impl_.java_string_check_utf8_;
}
if (cached_has_bits & 0x00002000u) {
- cc_generic_services_ = from.cc_generic_services_;
+ _this->_impl_.cc_generic_services_ = from._impl_.cc_generic_services_;
}
if (cached_has_bits & 0x00004000u) {
- java_generic_services_ = from.java_generic_services_;
+ _this->_impl_.java_generic_services_ = from._impl_.java_generic_services_;
}
if (cached_has_bits & 0x00008000u) {
- py_generic_services_ = from.py_generic_services_;
+ _this->_impl_.py_generic_services_ = from._impl_.py_generic_services_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x000f0000u) {
if (cached_has_bits & 0x00010000u) {
- php_generic_services_ = from.php_generic_services_;
+ _this->_impl_.php_generic_services_ = from._impl_.php_generic_services_;
}
if (cached_has_bits & 0x00020000u) {
- deprecated_ = from.deprecated_;
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
}
if (cached_has_bits & 0x00040000u) {
- optimize_for_ = from.optimize_for_;
+ _this->_impl_.optimize_for_ = from._impl_.optimize_for_;
}
if (cached_has_bits & 0x00080000u) {
- cc_enable_arenas_ = from.cc_enable_arenas_;
+ _this->_impl_.cc_enable_arenas_ = from._impl_.cc_enable_arenas_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FileOptions::CopyFrom(const FileOptions& from) {
@@ -6960,71 +7204,71 @@ void FileOptions::CopyFrom(const FileOptions& from) {
}
bool FileOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void FileOptions::InternalSwap(FileOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &java_package_, lhs_arena,
- &other->java_package_, rhs_arena
+ &_impl_.java_package_, lhs_arena,
+ &other->_impl_.java_package_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &java_outer_classname_, lhs_arena,
- &other->java_outer_classname_, rhs_arena
+ &_impl_.java_outer_classname_, lhs_arena,
+ &other->_impl_.java_outer_classname_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &go_package_, lhs_arena,
- &other->go_package_, rhs_arena
+ &_impl_.go_package_, lhs_arena,
+ &other->_impl_.go_package_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &objc_class_prefix_, lhs_arena,
- &other->objc_class_prefix_, rhs_arena
+ &_impl_.objc_class_prefix_, lhs_arena,
+ &other->_impl_.objc_class_prefix_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &csharp_namespace_, lhs_arena,
- &other->csharp_namespace_, rhs_arena
+ &_impl_.csharp_namespace_, lhs_arena,
+ &other->_impl_.csharp_namespace_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &swift_prefix_, lhs_arena,
- &other->swift_prefix_, rhs_arena
+ &_impl_.swift_prefix_, lhs_arena,
+ &other->_impl_.swift_prefix_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &php_class_prefix_, lhs_arena,
- &other->php_class_prefix_, rhs_arena
+ &_impl_.php_class_prefix_, lhs_arena,
+ &other->_impl_.php_class_prefix_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &php_namespace_, lhs_arena,
- &other->php_namespace_, rhs_arena
+ &_impl_.php_namespace_, lhs_arena,
+ &other->_impl_.php_namespace_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &php_metadata_namespace_, lhs_arena,
- &other->php_metadata_namespace_, rhs_arena
+ &_impl_.php_metadata_namespace_, lhs_arena,
+ &other->_impl_.php_metadata_namespace_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &ruby_package_, lhs_arena,
- &other->ruby_package_, rhs_arena
+ &_impl_.ruby_package_, lhs_arena,
+ &other->_impl_.ruby_package_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(FileOptions, deprecated_)
- + sizeof(FileOptions::deprecated_)
- - PROTOBUF_FIELD_OFFSET(FileOptions, java_multiple_files_)>(
- reinterpret_cast<char*>(&java_multiple_files_),
- reinterpret_cast<char*>(&other->java_multiple_files_));
- swap(optimize_for_, other->optimize_for_);
- swap(cc_enable_arenas_, other->cc_enable_arenas_);
+ PROTOBUF_FIELD_OFFSET(FileOptions, _impl_.deprecated_)
+ + sizeof(FileOptions::_impl_.deprecated_)
+ - PROTOBUF_FIELD_OFFSET(FileOptions, _impl_.java_multiple_files_)>(
+ reinterpret_cast<char*>(&_impl_.java_multiple_files_),
+ reinterpret_cast<char*>(&other->_impl_.java_multiple_files_));
+ swap(_impl_.optimize_for_, other->_impl_.optimize_for_);
+ swap(_impl_.cc_enable_arenas_, other->_impl_.cc_enable_arenas_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FileOptions::GetMetadata() const {
@@ -7037,7 +7281,7 @@ void FileOptions::InternalSwap(FileOptions* other) {
class MessageOptions::_Internal {
public:
- using HasBits = decltype(std::declval<MessageOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<MessageOptions>()._impl_._has_bits_);
static void set_has_message_set_wire_format(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -7054,29 +7298,45 @@ class MessageOptions::_Internal {
MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.MessageOptions)
}
MessageOptions::MessageOptions(const MessageOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ MessageOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.message_set_wire_format_){}
+ , decltype(_impl_.no_standard_descriptor_accessor_){}
+ , decltype(_impl_.deprecated_){}
+ , decltype(_impl_.map_entry_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- ::memcpy(&message_set_wire_format_, &from.message_set_wire_format_,
- static_cast<size_t>(reinterpret_cast<char*>(&map_entry_) -
- reinterpret_cast<char*>(&message_set_wire_format_)) + sizeof(map_entry_));
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ ::memcpy(&_impl_.message_set_wire_format_, &from._impl_.message_set_wire_format_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.map_entry_) -
+ reinterpret_cast<char*>(&_impl_.message_set_wire_format_)) + sizeof(_impl_.map_entry_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
}
-inline void MessageOptions::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&message_set_wire_format_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&map_entry_) -
- reinterpret_cast<char*>(&message_set_wire_format_)) + sizeof(map_entry_));
+inline void MessageOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.message_set_wire_format_){false}
+ , decltype(_impl_.no_standard_descriptor_accessor_){false}
+ , decltype(_impl_.deprecated_){false}
+ , decltype(_impl_.map_entry_){false}
+ };
}
MessageOptions::~MessageOptions() {
@@ -7090,10 +7350,12 @@ MessageOptions::~MessageOptions() {
inline void MessageOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void MessageOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void MessageOptions::Clear() {
@@ -7102,12 +7364,12 @@ void MessageOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- ::memset(&message_set_wire_format_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&map_entry_) -
- reinterpret_cast<char*>(&message_set_wire_format_)) + sizeof(map_entry_));
- _has_bits_.Clear();
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ ::memset(&_impl_.message_set_wire_format_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.map_entry_) -
+ reinterpret_cast<char*>(&_impl_.message_set_wire_format_)) + sizeof(_impl_.map_entry_));
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -7122,7 +7384,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_message_set_wire_format(&has_bits);
- message_set_wire_format_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.message_set_wire_format_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7131,7 +7393,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_no_standard_descriptor_accessor(&has_bits);
- no_standard_descriptor_accessor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.no_standard_descriptor_accessor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7140,7 +7402,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7149,7 +7411,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_map_entry(&has_bits);
- map_entry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.map_entry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7177,7 +7439,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -7188,7 +7450,7 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -7202,7 +7464,7 @@ uint8_t* MessageOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional bool message_set_wire_format = 1 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -7236,7 +7498,7 @@ uint8_t* MessageOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -7251,7 +7513,7 @@ size_t MessageOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.MessageOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -7259,12 +7521,12 @@ size_t MessageOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional bool message_set_wire_format = 1 [default = false];
if (cached_has_bits & 0x00000001u) {
@@ -7287,47 +7549,43 @@ size_t MessageOptions::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MessageOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
MessageOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MessageOptions::GetClassData() const { return &_class_data_; }
-void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<MessageOptions *>(to)->MergeFrom(
- static_cast<const MessageOptions &>(from));
-}
-
-void MessageOptions::MergeFrom(const MessageOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void MessageOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<MessageOptions*>(&to_msg);
+ auto& from = static_cast<const MessageOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
- message_set_wire_format_ = from.message_set_wire_format_;
+ _this->_impl_.message_set_wire_format_ = from._impl_.message_set_wire_format_;
}
if (cached_has_bits & 0x00000002u) {
- no_standard_descriptor_accessor_ = from.no_standard_descriptor_accessor_;
+ _this->_impl_.no_standard_descriptor_accessor_ = from._impl_.no_standard_descriptor_accessor_;
}
if (cached_has_bits & 0x00000004u) {
- deprecated_ = from.deprecated_;
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
}
if (cached_has_bits & 0x00000008u) {
- map_entry_ = from.map_entry_;
+ _this->_impl_.map_entry_ = from._impl_.map_entry_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void MessageOptions::CopyFrom(const MessageOptions& from) {
@@ -7338,27 +7596,27 @@ void MessageOptions::CopyFrom(const MessageOptions& from) {
}
bool MessageOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void MessageOptions::InternalSwap(MessageOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(MessageOptions, map_entry_)
- + sizeof(MessageOptions::map_entry_)
- - PROTOBUF_FIELD_OFFSET(MessageOptions, message_set_wire_format_)>(
- reinterpret_cast<char*>(&message_set_wire_format_),
- reinterpret_cast<char*>(&other->message_set_wire_format_));
+ PROTOBUF_FIELD_OFFSET(MessageOptions, _impl_.map_entry_)
+ + sizeof(MessageOptions::_impl_.map_entry_)
+ - PROTOBUF_FIELD_OFFSET(MessageOptions, _impl_.message_set_wire_format_)>(
+ reinterpret_cast<char*>(&_impl_.message_set_wire_format_),
+ reinterpret_cast<char*>(&other->_impl_.message_set_wire_format_));
}
::PROTOBUF_NAMESPACE_ID::Metadata MessageOptions::GetMetadata() const {
@@ -7371,7 +7629,7 @@ void MessageOptions::InternalSwap(MessageOptions* other) {
class FieldOptions::_Internal {
public:
- using HasBits = decltype(std::declval<FieldOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<FieldOptions>()._impl_._has_bits_);
static void set_has_ctype(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -7397,29 +7655,51 @@ class FieldOptions::_Internal {
FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FieldOptions)
}
FieldOptions::FieldOptions(const FieldOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ FieldOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.ctype_){}
+ , decltype(_impl_.jstype_){}
+ , decltype(_impl_.packed_){}
+ , decltype(_impl_.lazy_){}
+ , decltype(_impl_.unverified_lazy_){}
+ , decltype(_impl_.deprecated_){}
+ , decltype(_impl_.weak_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- ::memcpy(&ctype_, &from.ctype_,
- static_cast<size_t>(reinterpret_cast<char*>(&weak_) -
- reinterpret_cast<char*>(&ctype_)) + sizeof(weak_));
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ ::memcpy(&_impl_.ctype_, &from._impl_.ctype_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.weak_) -
+ reinterpret_cast<char*>(&_impl_.ctype_)) + sizeof(_impl_.weak_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions)
}
-inline void FieldOptions::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&ctype_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&weak_) -
- reinterpret_cast<char*>(&ctype_)) + sizeof(weak_));
+inline void FieldOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.ctype_){0}
+ , decltype(_impl_.jstype_){0}
+ , decltype(_impl_.packed_){false}
+ , decltype(_impl_.lazy_){false}
+ , decltype(_impl_.unverified_lazy_){false}
+ , decltype(_impl_.deprecated_){false}
+ , decltype(_impl_.weak_){false}
+ };
}
FieldOptions::~FieldOptions() {
@@ -7433,10 +7713,12 @@ FieldOptions::~FieldOptions() {
inline void FieldOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void FieldOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FieldOptions::Clear() {
@@ -7445,15 +7727,15 @@ void FieldOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
- ::memset(&ctype_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&weak_) -
- reinterpret_cast<char*>(&ctype_)) + sizeof(weak_));
+ ::memset(&_impl_.ctype_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.weak_) -
+ reinterpret_cast<char*>(&_impl_.ctype_)) + sizeof(_impl_.weak_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -7481,7 +7763,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_packed(&has_bits);
- packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7490,7 +7772,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7499,7 +7781,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_lazy(&has_bits);
- lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7521,7 +7803,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_weak(&has_bits);
- weak_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.weak_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7530,7 +7812,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
_Internal::set_has_unverified_lazy(&has_bits);
- unverified_lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.unverified_lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -7558,7 +7840,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -7569,7 +7851,7 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -7583,7 +7865,7 @@ uint8_t* FieldOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -7637,7 +7919,7 @@ uint8_t* FieldOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -7652,7 +7934,7 @@ size_t FieldOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -7660,12 +7942,12 @@ size_t FieldOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
if (cached_has_bits & 0x00000001u) {
@@ -7705,56 +7987,52 @@ size_t FieldOptions::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FieldOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FieldOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FieldOptions::GetClassData() const { return &_class_data_; }
-void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FieldOptions *>(to)->MergeFrom(
- static_cast<const FieldOptions &>(from));
-}
-
-void FieldOptions::MergeFrom(const FieldOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void FieldOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FieldOptions*>(&to_msg);
+ auto& from = static_cast<const FieldOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
if (cached_has_bits & 0x00000001u) {
- ctype_ = from.ctype_;
+ _this->_impl_.ctype_ = from._impl_.ctype_;
}
if (cached_has_bits & 0x00000002u) {
- jstype_ = from.jstype_;
+ _this->_impl_.jstype_ = from._impl_.jstype_;
}
if (cached_has_bits & 0x00000004u) {
- packed_ = from.packed_;
+ _this->_impl_.packed_ = from._impl_.packed_;
}
if (cached_has_bits & 0x00000008u) {
- lazy_ = from.lazy_;
+ _this->_impl_.lazy_ = from._impl_.lazy_;
}
if (cached_has_bits & 0x00000010u) {
- unverified_lazy_ = from.unverified_lazy_;
+ _this->_impl_.unverified_lazy_ = from._impl_.unverified_lazy_;
}
if (cached_has_bits & 0x00000020u) {
- deprecated_ = from.deprecated_;
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
}
if (cached_has_bits & 0x00000040u) {
- weak_ = from.weak_;
+ _this->_impl_.weak_ = from._impl_.weak_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FieldOptions::CopyFrom(const FieldOptions& from) {
@@ -7765,27 +8043,27 @@ void FieldOptions::CopyFrom(const FieldOptions& from) {
}
bool FieldOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void FieldOptions::InternalSwap(FieldOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(FieldOptions, weak_)
- + sizeof(FieldOptions::weak_)
- - PROTOBUF_FIELD_OFFSET(FieldOptions, ctype_)>(
- reinterpret_cast<char*>(&ctype_),
- reinterpret_cast<char*>(&other->ctype_));
+ PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.weak_)
+ + sizeof(FieldOptions::_impl_.weak_)
+ - PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.ctype_)>(
+ reinterpret_cast<char*>(&_impl_.ctype_),
+ reinterpret_cast<char*>(&other->_impl_.ctype_));
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldOptions::GetMetadata() const {
@@ -7802,21 +8080,32 @@ class OneofOptions::_Internal {
OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.OneofOptions)
}
OneofOptions::OneofOptions(const OneofOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ OneofOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions)
}
-inline void OneofOptions::SharedCtor() {
+inline void OneofOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
OneofOptions::~OneofOptions() {
@@ -7830,10 +8119,12 @@ OneofOptions::~OneofOptions() {
inline void OneofOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void OneofOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void OneofOptions::Clear() {
@@ -7842,8 +8133,8 @@ void OneofOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -7876,7 +8167,7 @@ const char* OneofOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -7909,7 +8200,7 @@ uint8_t* OneofOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -7924,7 +8215,7 @@ size_t OneofOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -7932,36 +8223,32 @@ size_t OneofOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OneofOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
OneofOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OneofOptions::GetClassData() const { return &_class_data_; }
-void OneofOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<OneofOptions *>(to)->MergeFrom(
- static_cast<const OneofOptions &>(from));
-}
-
-void OneofOptions::MergeFrom(const OneofOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void OneofOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<OneofOptions*>(&to_msg);
+ auto& from = static_cast<const OneofOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void OneofOptions::CopyFrom(const OneofOptions& from) {
@@ -7972,20 +8259,20 @@ void OneofOptions::CopyFrom(const OneofOptions& from) {
}
bool OneofOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void OneofOptions::InternalSwap(OneofOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
}
::PROTOBUF_NAMESPACE_ID::Metadata OneofOptions::GetMetadata() const {
@@ -7998,7 +8285,7 @@ void OneofOptions::InternalSwap(OneofOptions* other) {
class EnumOptions::_Internal {
public:
- using HasBits = decltype(std::declval<EnumOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<EnumOptions>()._impl_._has_bits_);
static void set_has_allow_alias(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -8009,29 +8296,41 @@ class EnumOptions::_Internal {
EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumOptions)
}
EnumOptions::EnumOptions(const EnumOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ EnumOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.allow_alias_){}
+ , decltype(_impl_.deprecated_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- ::memcpy(&allow_alias_, &from.allow_alias_,
- static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
- reinterpret_cast<char*>(&allow_alias_)) + sizeof(deprecated_));
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ ::memcpy(&_impl_.allow_alias_, &from._impl_.allow_alias_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.deprecated_) -
+ reinterpret_cast<char*>(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions)
}
-inline void EnumOptions::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&allow_alias_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&deprecated_) -
- reinterpret_cast<char*>(&allow_alias_)) + sizeof(deprecated_));
+inline void EnumOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.allow_alias_){false}
+ , decltype(_impl_.deprecated_){false}
+ };
}
EnumOptions::~EnumOptions() {
@@ -8045,10 +8344,12 @@ EnumOptions::~EnumOptions() {
inline void EnumOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void EnumOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void EnumOptions::Clear() {
@@ -8057,12 +8358,12 @@ void EnumOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- ::memset(&allow_alias_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&deprecated_) -
- reinterpret_cast<char*>(&allow_alias_)) + sizeof(deprecated_));
- _has_bits_.Clear();
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ ::memset(&_impl_.allow_alias_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.deprecated_) -
+ reinterpret_cast<char*>(&_impl_.allow_alias_)) + sizeof(_impl_.deprecated_));
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8077,7 +8378,7 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_allow_alias(&has_bits);
- allow_alias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.allow_alias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -8086,7 +8387,7 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -8114,7 +8415,7 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -8125,7 +8426,7 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -8139,7 +8440,7 @@ uint8_t* EnumOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional bool allow_alias = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -8161,7 +8462,7 @@ uint8_t* EnumOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -8176,7 +8477,7 @@ size_t EnumOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -8184,12 +8485,12 @@ size_t EnumOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional bool allow_alias = 2;
if (cached_has_bits & 0x00000001u) {
@@ -8202,41 +8503,37 @@ size_t EnumOptions::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumOptions::GetClassData() const { return &_class_data_; }
-void EnumOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<EnumOptions *>(to)->MergeFrom(
- static_cast<const EnumOptions &>(from));
-}
-
-void EnumOptions::MergeFrom(const EnumOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void EnumOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<EnumOptions*>(&to_msg);
+ auto& from = static_cast<const EnumOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- allow_alias_ = from.allow_alias_;
+ _this->_impl_.allow_alias_ = from._impl_.allow_alias_;
}
if (cached_has_bits & 0x00000002u) {
- deprecated_ = from.deprecated_;
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumOptions::CopyFrom(const EnumOptions& from) {
@@ -8247,27 +8544,27 @@ void EnumOptions::CopyFrom(const EnumOptions& from) {
}
bool EnumOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void EnumOptions::InternalSwap(EnumOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(EnumOptions, deprecated_)
- + sizeof(EnumOptions::deprecated_)
- - PROTOBUF_FIELD_OFFSET(EnumOptions, allow_alias_)>(
- reinterpret_cast<char*>(&allow_alias_),
- reinterpret_cast<char*>(&other->allow_alias_));
+ PROTOBUF_FIELD_OFFSET(EnumOptions, _impl_.deprecated_)
+ + sizeof(EnumOptions::_impl_.deprecated_)
+ - PROTOBUF_FIELD_OFFSET(EnumOptions, _impl_.allow_alias_)>(
+ reinterpret_cast<char*>(&_impl_.allow_alias_),
+ reinterpret_cast<char*>(&other->_impl_.allow_alias_));
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumOptions::GetMetadata() const {
@@ -8280,7 +8577,7 @@ void EnumOptions::InternalSwap(EnumOptions* other) {
class EnumValueOptions::_Internal {
public:
- using HasBits = decltype(std::declval<EnumValueOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<EnumValueOptions>()._impl_._has_bits_);
static void set_has_deprecated(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -8288,24 +8585,37 @@ class EnumValueOptions::_Internal {
EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueOptions)
}
EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ EnumValueOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.deprecated_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- deprecated_ = from.deprecated_;
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
}
-inline void EnumValueOptions::SharedCtor() {
-deprecated_ = false;
+inline void EnumValueOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.deprecated_){false}
+ };
}
EnumValueOptions::~EnumValueOptions() {
@@ -8319,10 +8629,12 @@ EnumValueOptions::~EnumValueOptions() {
inline void EnumValueOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void EnumValueOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void EnumValueOptions::Clear() {
@@ -8331,10 +8643,10 @@ void EnumValueOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- deprecated_ = false;
- _has_bits_.Clear();
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8349,7 +8661,7 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::_pbi::ParseConte
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -8377,7 +8689,7 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::_pbi::ParseConte
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -8388,7 +8700,7 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::_pbi::ParseConte
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -8402,7 +8714,7 @@ uint8_t* EnumValueOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional bool deprecated = 1 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -8418,7 +8730,7 @@ uint8_t* EnumValueOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -8433,7 +8745,7 @@ size_t EnumValueOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -8441,45 +8753,41 @@ size_t EnumValueOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// optional bool deprecated = 1 [default = false];
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 1;
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumValueOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumValueOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumValueOptions::GetClassData() const { return &_class_data_; }
-void EnumValueOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<EnumValueOptions *>(to)->MergeFrom(
- static_cast<const EnumValueOptions &>(from));
-}
-
-void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void EnumValueOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<EnumValueOptions*>(&to_msg);
+ auto& from = static_cast<const EnumValueOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
if (from._internal_has_deprecated()) {
- _internal_set_deprecated(from._internal_deprecated());
+ _this->_internal_set_deprecated(from._internal_deprecated());
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
@@ -8490,22 +8798,22 @@ void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
}
bool EnumValueOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
- swap(deprecated_, other->deprecated_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
+ swap(_impl_.deprecated_, other->_impl_.deprecated_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValueOptions::GetMetadata() const {
@@ -8518,7 +8826,7 @@ void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
class ServiceOptions::_Internal {
public:
- using HasBits = decltype(std::declval<ServiceOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<ServiceOptions>()._impl_._has_bits_);
static void set_has_deprecated(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -8526,24 +8834,37 @@ class ServiceOptions::_Internal {
ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceOptions)
}
ServiceOptions::ServiceOptions(const ServiceOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ ServiceOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.deprecated_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- deprecated_ = from.deprecated_;
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions)
}
-inline void ServiceOptions::SharedCtor() {
-deprecated_ = false;
+inline void ServiceOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.deprecated_){false}
+ };
}
ServiceOptions::~ServiceOptions() {
@@ -8557,10 +8878,12 @@ ServiceOptions::~ServiceOptions() {
inline void ServiceOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void ServiceOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void ServiceOptions::Clear() {
@@ -8569,10 +8892,10 @@ void ServiceOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- deprecated_ = false;
- _has_bits_.Clear();
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8587,7 +8910,7 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
case 33:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -8615,7 +8938,7 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -8626,7 +8949,7 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -8640,7 +8963,7 @@ uint8_t* ServiceOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional bool deprecated = 33 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -8656,7 +8979,7 @@ uint8_t* ServiceOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -8671,7 +8994,7 @@ size_t ServiceOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -8679,45 +9002,41 @@ size_t ServiceOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// optional bool deprecated = 33 [default = false];
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 2 + 1;
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ServiceOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
ServiceOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ServiceOptions::GetClassData() const { return &_class_data_; }
-void ServiceOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<ServiceOptions *>(to)->MergeFrom(
- static_cast<const ServiceOptions &>(from));
-}
-
-void ServiceOptions::MergeFrom(const ServiceOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void ServiceOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<ServiceOptions*>(&to_msg);
+ auto& from = static_cast<const ServiceOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
if (from._internal_has_deprecated()) {
- _internal_set_deprecated(from._internal_deprecated());
+ _this->_internal_set_deprecated(from._internal_deprecated());
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ServiceOptions::CopyFrom(const ServiceOptions& from) {
@@ -8728,22 +9047,22 @@ void ServiceOptions::CopyFrom(const ServiceOptions& from) {
}
bool ServiceOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void ServiceOptions::InternalSwap(ServiceOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
- swap(deprecated_, other->deprecated_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
+ swap(_impl_.deprecated_, other->_impl_.deprecated_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ServiceOptions::GetMetadata() const {
@@ -8756,7 +9075,7 @@ void ServiceOptions::InternalSwap(ServiceOptions* other) {
class MethodOptions::_Internal {
public:
- using HasBits = decltype(std::declval<MethodOptions>()._has_bits_);
+ using HasBits = decltype(std::declval<MethodOptions>()._impl_._has_bits_);
static void set_has_deprecated(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -8767,29 +9086,41 @@ class MethodOptions::_Internal {
MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- _extensions_(arena),
- uninterpreted_option_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.MethodOptions)
}
MethodOptions::MethodOptions(const MethodOptions& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- uninterpreted_option_(from.uninterpreted_option_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ MethodOptions* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{}
+ , decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
+ , decltype(_impl_.deprecated_){}
+ , decltype(_impl_.idempotency_level_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- ::memcpy(&deprecated_, &from.deprecated_,
- static_cast<size_t>(reinterpret_cast<char*>(&idempotency_level_) -
- reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
+ _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ ::memcpy(&_impl_.deprecated_, &from._impl_.deprecated_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.idempotency_level_) -
+ reinterpret_cast<char*>(&_impl_.deprecated_)) + sizeof(_impl_.idempotency_level_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions)
}
-inline void MethodOptions::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&deprecated_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&idempotency_level_) -
- reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
+inline void MethodOptions::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
+ , decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.uninterpreted_option_){arena}
+ , decltype(_impl_.deprecated_){false}
+ , decltype(_impl_.idempotency_level_){0}
+ };
}
MethodOptions::~MethodOptions() {
@@ -8803,10 +9134,12 @@ MethodOptions::~MethodOptions() {
inline void MethodOptions::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_._extensions_.~ExtensionSet();
+ _impl_.uninterpreted_option_.~RepeatedPtrField();
}
void MethodOptions::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void MethodOptions::Clear() {
@@ -8815,15 +9148,15 @@ void MethodOptions::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- _extensions_.Clear();
- uninterpreted_option_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_._extensions_.Clear();
+ _impl_.uninterpreted_option_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
- ::memset(&deprecated_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&idempotency_level_) -
- reinterpret_cast<char*>(&deprecated_)) + sizeof(idempotency_level_));
+ ::memset(&_impl_.deprecated_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.idempotency_level_) -
+ reinterpret_cast<char*>(&_impl_.deprecated_)) + sizeof(_impl_.idempotency_level_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -8838,7 +9171,7 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
case 33:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_deprecated(&has_bits);
- deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -8879,7 +9212,7 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
goto message_done;
}
if ((8000u <= tag)) {
- ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
+ ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
@@ -8890,7 +9223,7 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext*
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -8904,7 +9237,7 @@ uint8_t* MethodOptions::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional bool deprecated = 33 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
@@ -8927,7 +9260,7 @@ uint8_t* MethodOptions::_InternalSerialize(
}
// Extension range [1000, 536870912)
- target = _extensions_._InternalSerialize(
+ target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -8942,7 +9275,7 @@ size_t MethodOptions::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodOptions)
size_t total_size = 0;
- total_size += _extensions_.ByteSize();
+ total_size += _impl_._extensions_.ByteSize();
arc_ui32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
@@ -8950,12 +9283,12 @@ size_t MethodOptions::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size += 2UL * this->_internal_uninterpreted_option_size();
- for (const auto& msg : this->uninterpreted_option_) {
+ for (const auto& msg : this->_impl_.uninterpreted_option_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional bool deprecated = 33 [default = false];
if (cached_has_bits & 0x00000001u) {
@@ -8969,41 +9302,37 @@ size_t MethodOptions::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MethodOptions::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
MethodOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MethodOptions::GetClassData() const { return &_class_data_; }
-void MethodOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<MethodOptions *>(to)->MergeFrom(
- static_cast<const MethodOptions &>(from));
-}
-
-void MethodOptions::MergeFrom(const MethodOptions& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions)
- GOOGLE_DCHECK_NE(&from, this);
+void MethodOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<MethodOptions*>(&to_msg);
+ auto& from = static_cast<const MethodOptions&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.uninterpreted_option_.MergeFrom(from._impl_.uninterpreted_option_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- deprecated_ = from.deprecated_;
+ _this->_impl_.deprecated_ = from._impl_.deprecated_;
}
if (cached_has_bits & 0x00000002u) {
- idempotency_level_ = from.idempotency_level_;
+ _this->_impl_.idempotency_level_ = from._impl_.idempotency_level_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void MethodOptions::CopyFrom(const MethodOptions& from) {
@@ -9014,27 +9343,27 @@ void MethodOptions::CopyFrom(const MethodOptions& from) {
}
bool MethodOptions::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
+ if (!_impl_._extensions_.IsInitialized()) {
return false;
}
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.uninterpreted_option_))
return false;
return true;
}
void MethodOptions::InternalSwap(MethodOptions* other) {
using std::swap;
- _extensions_.InternalSwap(&other->_extensions_);
+ _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- uninterpreted_option_.InternalSwap(&other->uninterpreted_option_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(MethodOptions, idempotency_level_)
- + sizeof(MethodOptions::idempotency_level_)
- - PROTOBUF_FIELD_OFFSET(MethodOptions, deprecated_)>(
- reinterpret_cast<char*>(&deprecated_),
- reinterpret_cast<char*>(&other->deprecated_));
+ PROTOBUF_FIELD_OFFSET(MethodOptions, _impl_.idempotency_level_)
+ + sizeof(MethodOptions::_impl_.idempotency_level_)
+ - PROTOBUF_FIELD_OFFSET(MethodOptions, _impl_.deprecated_)>(
+ reinterpret_cast<char*>(&_impl_.deprecated_),
+ reinterpret_cast<char*>(&other->_impl_.deprecated_));
}
::PROTOBUF_NAMESPACE_ID::Metadata MethodOptions::GetMetadata() const {
@@ -9047,7 +9376,7 @@ void MethodOptions::InternalSwap(MethodOptions* other) {
class UninterpretedOption_NamePart::_Internal {
public:
- using HasBits = decltype(std::declval<UninterpretedOption_NamePart>()._has_bits_);
+ using HasBits = decltype(std::declval<UninterpretedOption_NamePart>()._impl_._has_bits_);
static void set_has_name_part(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -9062,31 +9391,45 @@ class UninterpretedOption_NamePart::_Internal {
UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption.NamePart)
}
UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ UninterpretedOption_NamePart* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_part_){}
+ , decltype(_impl_.is_extension_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_part_.InitDefault();
+ _impl_.name_part_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_part_.Set("", GetArenaForAllocation());
+ _impl_.name_part_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name_part()) {
- name_part_.Set(from._internal_name_part(),
- GetArenaForAllocation());
+ _this->_impl_.name_part_.Set(from._internal_name_part(),
+ _this->GetArenaForAllocation());
}
- is_extension_ = from.is_extension_;
+ _this->_impl_.is_extension_ = from._impl_.is_extension_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart)
}
-inline void UninterpretedOption_NamePart::SharedCtor() {
-name_part_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_part_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-is_extension_ = false;
+inline void UninterpretedOption_NamePart::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_part_){}
+ , decltype(_impl_.is_extension_){false}
+ };
+ _impl_.name_part_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_part_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
@@ -9100,11 +9443,11 @@ UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
inline void UninterpretedOption_NamePart::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_part_.Destroy();
+ _impl_.name_part_.Destroy();
}
void UninterpretedOption_NamePart::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void UninterpretedOption_NamePart::Clear() {
@@ -9113,12 +9456,12 @@ void UninterpretedOption_NamePart::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- name_part_.ClearNonDefaultToEmpty();
+ _impl_.name_part_.ClearNonDefaultToEmpty();
}
- is_extension_ = false;
- _has_bits_.Clear();
+ _impl_.is_extension_ = false;
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -9145,7 +9488,7 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::_pbi
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_is_extension(&has_bits);
- is_extension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.is_extension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -9166,7 +9509,7 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::_pbi
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -9180,7 +9523,7 @@ uint8_t* UninterpretedOption_NamePart::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// required string name_part = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -9227,7 +9570,7 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption.NamePart)
size_t total_size = 0;
- if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
+ if (((_impl_._has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
// required string name_part = 1;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
@@ -9243,39 +9586,35 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UninterpretedOption_NamePart::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
UninterpretedOption_NamePart::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UninterpretedOption_NamePart::GetClassData() const { return &_class_data_; }
-void UninterpretedOption_NamePart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<UninterpretedOption_NamePart *>(to)->MergeFrom(
- static_cast<const UninterpretedOption_NamePart &>(from));
-}
-
-void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart)
- GOOGLE_DCHECK_NE(&from, this);
+void UninterpretedOption_NamePart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<UninterpretedOption_NamePart*>(&to_msg);
+ auto& from = static_cast<const UninterpretedOption_NamePart&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name_part(from._internal_name_part());
+ _this->_internal_set_name_part(from._internal_name_part());
}
if (cached_has_bits & 0x00000002u) {
- is_extension_ = from.is_extension_;
+ _this->_impl_.is_extension_ = from._impl_.is_extension_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
@@ -9286,7 +9625,7 @@ void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart&
}
bool UninterpretedOption_NamePart::IsInitialized() const {
- if (_Internal::MissingRequiredFields(_has_bits_)) return false;
+ if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
return true;
}
@@ -9295,12 +9634,12 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_part_, lhs_arena,
- &other->name_part_, rhs_arena
+ &_impl_.name_part_, lhs_arena,
+ &other->_impl_.name_part_, rhs_arena
);
- swap(is_extension_, other->is_extension_);
+ swap(_impl_.is_extension_, other->_impl_.is_extension_);
}
::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption_NamePart::GetMetadata() const {
@@ -9313,7 +9652,7 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot
class UninterpretedOption::_Internal {
public:
- using HasBits = decltype(std::declval<UninterpretedOption>()._has_bits_);
+ using HasBits = decltype(std::declval<UninterpretedOption>()._impl_._has_bits_);
static void set_has_identifier_value(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -9336,63 +9675,82 @@ class UninterpretedOption::_Internal {
UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- name_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption)
}
UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- name_(from.name_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ UninterpretedOption* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){from._impl_.name_}
+ , decltype(_impl_.identifier_value_){}
+ , decltype(_impl_.string_value_){}
+ , decltype(_impl_.aggregate_value_){}
+ , decltype(_impl_.positive_int_value_){}
+ , decltype(_impl_.negative_int_value_){}
+ , decltype(_impl_.double_value_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- identifier_value_.InitDefault();
+ _impl_.identifier_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- identifier_value_.Set("", GetArenaForAllocation());
+ _impl_.identifier_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_identifier_value()) {
- identifier_value_.Set(from._internal_identifier_value(),
- GetArenaForAllocation());
+ _this->_impl_.identifier_value_.Set(from._internal_identifier_value(),
+ _this->GetArenaForAllocation());
}
- string_value_.InitDefault();
+ _impl_.string_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- string_value_.Set("", GetArenaForAllocation());
+ _impl_.string_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_string_value()) {
- string_value_.Set(from._internal_string_value(),
- GetArenaForAllocation());
+ _this->_impl_.string_value_.Set(from._internal_string_value(),
+ _this->GetArenaForAllocation());
}
- aggregate_value_.InitDefault();
+ _impl_.aggregate_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- aggregate_value_.Set("", GetArenaForAllocation());
+ _impl_.aggregate_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_aggregate_value()) {
- aggregate_value_.Set(from._internal_aggregate_value(),
- GetArenaForAllocation());
+ _this->_impl_.aggregate_value_.Set(from._internal_aggregate_value(),
+ _this->GetArenaForAllocation());
}
- ::memcpy(&positive_int_value_, &from.positive_int_value_,
- static_cast<size_t>(reinterpret_cast<char*>(&double_value_) -
- reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
+ ::memcpy(&_impl_.positive_int_value_, &from._impl_.positive_int_value_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.double_value_) -
+ reinterpret_cast<char*>(&_impl_.positive_int_value_)) + sizeof(_impl_.double_value_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption)
}
-inline void UninterpretedOption::SharedCtor() {
-identifier_value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- identifier_value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-string_value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- string_value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-aggregate_value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- aggregate_value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&positive_int_value_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&double_value_) -
- reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
+inline void UninterpretedOption::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){arena}
+ , decltype(_impl_.identifier_value_){}
+ , decltype(_impl_.string_value_){}
+ , decltype(_impl_.aggregate_value_){}
+ , decltype(_impl_.positive_int_value_){arc_ui64{0u}}
+ , decltype(_impl_.negative_int_value_){arc_i64{0}}
+ , decltype(_impl_.double_value_){0}
+ };
+ _impl_.identifier_value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.identifier_value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.string_value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.string_value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.aggregate_value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.aggregate_value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
UninterpretedOption::~UninterpretedOption() {
@@ -9406,13 +9764,14 @@ UninterpretedOption::~UninterpretedOption() {
inline void UninterpretedOption::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- identifier_value_.Destroy();
- string_value_.Destroy();
- aggregate_value_.Destroy();
+ _impl_.name_.~RepeatedPtrField();
+ _impl_.identifier_value_.Destroy();
+ _impl_.string_value_.Destroy();
+ _impl_.aggregate_value_.Destroy();
}
void UninterpretedOption::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void UninterpretedOption::Clear() {
@@ -9421,25 +9780,25 @@ void UninterpretedOption::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- name_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.name_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
- identifier_value_.ClearNonDefaultToEmpty();
+ _impl_.identifier_value_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- string_value_.ClearNonDefaultToEmpty();
+ _impl_.string_value_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
- aggregate_value_.ClearNonDefaultToEmpty();
+ _impl_.aggregate_value_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x00000038u) {
- ::memset(&positive_int_value_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&double_value_) -
- reinterpret_cast<char*>(&positive_int_value_)) + sizeof(double_value_));
+ ::memset(&_impl_.positive_int_value_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.double_value_) -
+ reinterpret_cast<char*>(&_impl_.positive_int_value_)) + sizeof(_impl_.double_value_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -9479,7 +9838,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::_pbi::ParseCo
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_positive_int_value(&has_bits);
- positive_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.positive_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -9488,7 +9847,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::_pbi::ParseCo
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_negative_int_value(&has_bits);
- negative_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.negative_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -9497,7 +9856,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::_pbi::ParseCo
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 49)) {
_Internal::set_has_double_value(&has_bits);
- double_value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
+ _impl_.double_value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
ptr += sizeof(double);
} else
goto handle_unusual;
@@ -9539,7 +9898,7 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::_pbi::ParseCo
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -9561,7 +9920,7 @@ uint8_t* UninterpretedOption::_InternalSerialize(
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string identifier_value = 3;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -9624,12 +9983,12 @@ size_t UninterpretedOption::ByteSizeLong() const {
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
total_size += 1UL * this->_internal_name_size();
- for (const auto& msg : this->name_) {
+ for (const auto& msg : this->_impl_.name_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string identifier_value = 3;
if (cached_has_bits & 0x00000001u) {
@@ -9668,52 +10027,48 @@ size_t UninterpretedOption::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UninterpretedOption::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
UninterpretedOption::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UninterpretedOption::GetClassData() const { return &_class_data_; }
-void UninterpretedOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<UninterpretedOption *>(to)->MergeFrom(
- static_cast<const UninterpretedOption &>(from));
-}
-
-void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption)
- GOOGLE_DCHECK_NE(&from, this);
+void UninterpretedOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<UninterpretedOption*>(&to_msg);
+ auto& from = static_cast<const UninterpretedOption&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- name_.MergeFrom(from.name_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.name_.MergeFrom(from._impl_.name_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_identifier_value(from._internal_identifier_value());
+ _this->_internal_set_identifier_value(from._internal_identifier_value());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_string_value(from._internal_string_value());
+ _this->_internal_set_string_value(from._internal_string_value());
}
if (cached_has_bits & 0x00000004u) {
- _internal_set_aggregate_value(from._internal_aggregate_value());
+ _this->_internal_set_aggregate_value(from._internal_aggregate_value());
}
if (cached_has_bits & 0x00000008u) {
- positive_int_value_ = from.positive_int_value_;
+ _this->_impl_.positive_int_value_ = from._impl_.positive_int_value_;
}
if (cached_has_bits & 0x00000010u) {
- negative_int_value_ = from.negative_int_value_;
+ _this->_impl_.negative_int_value_ = from._impl_.negative_int_value_;
}
if (cached_has_bits & 0x00000020u) {
- double_value_ = from.double_value_;
+ _this->_impl_.double_value_ = from._impl_.double_value_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
@@ -9724,7 +10079,7 @@ void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
}
bool UninterpretedOption::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(name_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.name_))
return false;
return true;
}
@@ -9734,26 +10089,26 @@ void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- name_.InternalSwap(&other->name_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.name_.InternalSwap(&other->_impl_.name_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &identifier_value_, lhs_arena,
- &other->identifier_value_, rhs_arena
+ &_impl_.identifier_value_, lhs_arena,
+ &other->_impl_.identifier_value_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &string_value_, lhs_arena,
- &other->string_value_, rhs_arena
+ &_impl_.string_value_, lhs_arena,
+ &other->_impl_.string_value_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &aggregate_value_, lhs_arena,
- &other->aggregate_value_, rhs_arena
+ &_impl_.aggregate_value_, lhs_arena,
+ &other->_impl_.aggregate_value_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(UninterpretedOption, double_value_)
- + sizeof(UninterpretedOption::double_value_)
- - PROTOBUF_FIELD_OFFSET(UninterpretedOption, positive_int_value_)>(
- reinterpret_cast<char*>(&positive_int_value_),
- reinterpret_cast<char*>(&other->positive_int_value_));
+ PROTOBUF_FIELD_OFFSET(UninterpretedOption, _impl_.double_value_)
+ + sizeof(UninterpretedOption::_impl_.double_value_)
+ - PROTOBUF_FIELD_OFFSET(UninterpretedOption, _impl_.positive_int_value_)>(
+ reinterpret_cast<char*>(&_impl_.positive_int_value_),
+ reinterpret_cast<char*>(&other->_impl_.positive_int_value_));
}
::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption::GetMetadata() const {
@@ -9766,7 +10121,7 @@ void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
class SourceCodeInfo_Location::_Internal {
public:
- using HasBits = decltype(std::declval<SourceCodeInfo_Location>()._has_bits_);
+ using HasBits = decltype(std::declval<SourceCodeInfo_Location>()._impl_._has_bits_);
static void set_has_leading_comments(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -9777,48 +10132,67 @@ class SourceCodeInfo_Location::_Internal {
SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- path_(arena),
- span_(arena),
- leading_detached_comments_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo.Location)
}
SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- path_(from.path_),
- span_(from.span_),
- leading_detached_comments_(from.leading_detached_comments_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ SourceCodeInfo_Location* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.path_){from._impl_.path_}
+ , /*decltype(_impl_._path_cached_byte_size_)*/{0}
+ , decltype(_impl_.span_){from._impl_.span_}
+ , /*decltype(_impl_._span_cached_byte_size_)*/{0}
+ , decltype(_impl_.leading_detached_comments_){from._impl_.leading_detached_comments_}
+ , decltype(_impl_.leading_comments_){}
+ , decltype(_impl_.trailing_comments_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- leading_comments_.InitDefault();
+ _impl_.leading_comments_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- leading_comments_.Set("", GetArenaForAllocation());
+ _impl_.leading_comments_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_leading_comments()) {
- leading_comments_.Set(from._internal_leading_comments(),
- GetArenaForAllocation());
+ _this->_impl_.leading_comments_.Set(from._internal_leading_comments(),
+ _this->GetArenaForAllocation());
}
- trailing_comments_.InitDefault();
+ _impl_.trailing_comments_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- trailing_comments_.Set("", GetArenaForAllocation());
+ _impl_.trailing_comments_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_trailing_comments()) {
- trailing_comments_.Set(from._internal_trailing_comments(),
- GetArenaForAllocation());
+ _this->_impl_.trailing_comments_.Set(from._internal_trailing_comments(),
+ _this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location)
}
-inline void SourceCodeInfo_Location::SharedCtor() {
-leading_comments_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- leading_comments_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-trailing_comments_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- trailing_comments_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+inline void SourceCodeInfo_Location::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.path_){arena}
+ , /*decltype(_impl_._path_cached_byte_size_)*/{0}
+ , decltype(_impl_.span_){arena}
+ , /*decltype(_impl_._span_cached_byte_size_)*/{0}
+ , decltype(_impl_.leading_detached_comments_){arena}
+ , decltype(_impl_.leading_comments_){}
+ , decltype(_impl_.trailing_comments_){}
+ };
+ _impl_.leading_comments_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.leading_comments_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.trailing_comments_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.trailing_comments_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
SourceCodeInfo_Location::~SourceCodeInfo_Location() {
@@ -9832,12 +10206,15 @@ SourceCodeInfo_Location::~SourceCodeInfo_Location() {
inline void SourceCodeInfo_Location::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- leading_comments_.Destroy();
- trailing_comments_.Destroy();
+ _impl_.path_.~RepeatedField();
+ _impl_.span_.~RepeatedField();
+ _impl_.leading_detached_comments_.~RepeatedPtrField();
+ _impl_.leading_comments_.Destroy();
+ _impl_.trailing_comments_.Destroy();
}
void SourceCodeInfo_Location::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void SourceCodeInfo_Location::Clear() {
@@ -9846,19 +10223,19 @@ void SourceCodeInfo_Location::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- path_.Clear();
- span_.Clear();
- leading_detached_comments_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.path_.Clear();
+ _impl_.span_.Clear();
+ _impl_.leading_detached_comments_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- leading_comments_.ClearNonDefaultToEmpty();
+ _impl_.leading_comments_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- trailing_comments_.ClearNonDefaultToEmpty();
+ _impl_.trailing_comments_.ClearNonDefaultToEmpty();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -9948,7 +10325,7 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::_pbi::Par
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -9964,7 +10341,7 @@ uint8_t* SourceCodeInfo_Location::_InternalSerialize(
// repeated int32 path = 1 [packed = true];
{
- int byte_size = _path_cached_byte_size_.load(std::memory_order_relaxed);
+ int byte_size = _impl_._path_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
1, _internal_path(), byte_size, target);
@@ -9973,14 +10350,14 @@ uint8_t* SourceCodeInfo_Location::_InternalSerialize(
// repeated int32 span = 2 [packed = true];
{
- int byte_size = _span_cached_byte_size_.load(std::memory_order_relaxed);
+ int byte_size = _impl_._span_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
2, _internal_span(), byte_size, target);
}
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string leading_comments = 3;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -10030,13 +10407,13 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
// repeated int32 path = 1 [packed = true];
{
size_t data_size = ::_pbi::WireFormatLite::
- Int32Size(this->path_);
+ Int32Size(this->_impl_.path_);
if (data_size > 0) {
total_size += 1 +
::_pbi::WireFormatLite::Int32Size(static_cast<arc_i32>(data_size));
}
int cached_size = ::_pbi::ToCachedSize(data_size);
- _path_cached_byte_size_.store(cached_size,
+ _impl_._path_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
@@ -10044,26 +10421,26 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
// repeated int32 span = 2 [packed = true];
{
size_t data_size = ::_pbi::WireFormatLite::
- Int32Size(this->span_);
+ Int32Size(this->_impl_.span_);
if (data_size > 0) {
total_size += 1 +
::_pbi::WireFormatLite::Int32Size(static_cast<arc_i32>(data_size));
}
int cached_size = ::_pbi::ToCachedSize(data_size);
- _span_cached_byte_size_.store(cached_size,
+ _impl_._span_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// repeated string leading_detached_comments = 6;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(leading_detached_comments_.size());
- for (int i = 0, n = leading_detached_comments_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.leading_detached_comments_.size());
+ for (int i = 0, n = _impl_.leading_detached_comments_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- leading_detached_comments_.Get(i));
+ _impl_.leading_detached_comments_.Get(i));
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string leading_comments = 3;
if (cached_has_bits & 0x00000001u) {
@@ -10080,41 +10457,37 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SourceCodeInfo_Location::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
SourceCodeInfo_Location::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SourceCodeInfo_Location::GetClassData() const { return &_class_data_; }
-void SourceCodeInfo_Location::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<SourceCodeInfo_Location *>(to)->MergeFrom(
- static_cast<const SourceCodeInfo_Location &>(from));
-}
-
-void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location)
- GOOGLE_DCHECK_NE(&from, this);
+void SourceCodeInfo_Location::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<SourceCodeInfo_Location*>(&to_msg);
+ auto& from = static_cast<const SourceCodeInfo_Location&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- path_.MergeFrom(from.path_);
- span_.MergeFrom(from.span_);
- leading_detached_comments_.MergeFrom(from.leading_detached_comments_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.path_.MergeFrom(from._impl_.path_);
+ _this->_impl_.span_.MergeFrom(from._impl_.span_);
+ _this->_impl_.leading_detached_comments_.MergeFrom(from._impl_.leading_detached_comments_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_leading_comments(from._internal_leading_comments());
+ _this->_internal_set_leading_comments(from._internal_leading_comments());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_trailing_comments(from._internal_trailing_comments());
+ _this->_internal_set_trailing_comments(from._internal_trailing_comments());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) {
@@ -10133,17 +10506,17 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- path_.InternalSwap(&other->path_);
- span_.InternalSwap(&other->span_);
- leading_detached_comments_.InternalSwap(&other->leading_detached_comments_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.path_.InternalSwap(&other->_impl_.path_);
+ _impl_.span_.InternalSwap(&other->_impl_.span_);
+ _impl_.leading_detached_comments_.InternalSwap(&other->_impl_.leading_detached_comments_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &leading_comments_, lhs_arena,
- &other->leading_comments_, rhs_arena
+ &_impl_.leading_comments_, lhs_arena,
+ &other->_impl_.leading_comments_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &trailing_comments_, lhs_arena,
- &other->trailing_comments_, rhs_arena
+ &_impl_.trailing_comments_, lhs_arena,
+ &other->_impl_.trailing_comments_, rhs_arena
);
}
@@ -10161,19 +10534,29 @@ class SourceCodeInfo::_Internal {
SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- location_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo)
}
SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- location_(from.location_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ SourceCodeInfo* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.location_){from._impl_.location_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
}
-inline void SourceCodeInfo::SharedCtor() {
+inline void SourceCodeInfo::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.location_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
SourceCodeInfo::~SourceCodeInfo() {
@@ -10187,10 +10570,11 @@ SourceCodeInfo::~SourceCodeInfo() {
inline void SourceCodeInfo::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_.location_.~RepeatedPtrField();
}
void SourceCodeInfo::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void SourceCodeInfo::Clear() {
@@ -10199,7 +10583,7 @@ void SourceCodeInfo::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- location_.Clear();
+ _impl_.location_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -10277,35 +10661,31 @@ size_t SourceCodeInfo::ByteSizeLong() const {
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
total_size += 1UL * this->_internal_location_size();
- for (const auto& msg : this->location_) {
+ for (const auto& msg : this->_impl_.location_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SourceCodeInfo::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
SourceCodeInfo::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SourceCodeInfo::GetClassData() const { return &_class_data_; }
-void SourceCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<SourceCodeInfo *>(to)->MergeFrom(
- static_cast<const SourceCodeInfo &>(from));
-}
-
-void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo)
- GOOGLE_DCHECK_NE(&from, this);
+void SourceCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<SourceCodeInfo*>(&to_msg);
+ auto& from = static_cast<const SourceCodeInfo&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- location_.MergeFrom(from.location_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.location_.MergeFrom(from._impl_.location_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
@@ -10322,7 +10702,7 @@ bool SourceCodeInfo::IsInitialized() const {
void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- location_.InternalSwap(&other->location_);
+ _impl_.location_.InternalSwap(&other->_impl_.location_);
}
::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo::GetMetadata() const {
@@ -10335,7 +10715,7 @@ void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
class GeneratedCodeInfo_Annotation::_Internal {
public:
- using HasBits = decltype(std::declval<GeneratedCodeInfo_Annotation>()._has_bits_);
+ using HasBits = decltype(std::declval<GeneratedCodeInfo_Annotation>()._impl_._has_bits_);
static void set_has_source_file(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -10349,39 +10729,54 @@ class GeneratedCodeInfo_Annotation::_Internal {
GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- path_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo.Annotation)
}
GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- path_(from.path_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ GeneratedCodeInfo_Annotation* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.path_){from._impl_.path_}
+ , /*decltype(_impl_._path_cached_byte_size_)*/{0}
+ , decltype(_impl_.source_file_){}
+ , decltype(_impl_.begin_){}
+ , decltype(_impl_.end_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- source_file_.InitDefault();
+ _impl_.source_file_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- source_file_.Set("", GetArenaForAllocation());
+ _impl_.source_file_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source_file()) {
- source_file_.Set(from._internal_source_file(),
- GetArenaForAllocation());
+ _this->_impl_.source_file_.Set(from._internal_source_file(),
+ _this->GetArenaForAllocation());
}
- ::memcpy(&begin_, &from.begin_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
+ ::memcpy(&_impl_.begin_, &from._impl_.begin_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.begin_)) + sizeof(_impl_.end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation)
}
-inline void GeneratedCodeInfo_Annotation::SharedCtor() {
-source_file_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- source_file_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&begin_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
+inline void GeneratedCodeInfo_Annotation::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.path_){arena}
+ , /*decltype(_impl_._path_cached_byte_size_)*/{0}
+ , decltype(_impl_.source_file_){}
+ , decltype(_impl_.begin_){0}
+ , decltype(_impl_.end_){0}
+ };
+ _impl_.source_file_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.source_file_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() {
@@ -10395,11 +10790,12 @@ GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() {
inline void GeneratedCodeInfo_Annotation::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- source_file_.Destroy();
+ _impl_.path_.~RepeatedField();
+ _impl_.source_file_.Destroy();
}
void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void GeneratedCodeInfo_Annotation::Clear() {
@@ -10408,17 +10804,17 @@ void GeneratedCodeInfo_Annotation::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- path_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.path_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- source_file_.ClearNonDefaultToEmpty();
+ _impl_.source_file_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000006u) {
- ::memset(&begin_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
+ ::memset(&_impl_.begin_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.end_) -
+ reinterpret_cast<char*>(&_impl_.begin_)) + sizeof(_impl_.end_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -10456,7 +10852,7 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::_pbi
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_begin(&has_bits);
- begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -10465,7 +10861,7 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::_pbi
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_end(&has_bits);
- end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -10486,7 +10882,7 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::_pbi
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -10502,14 +10898,14 @@ uint8_t* GeneratedCodeInfo_Annotation::_InternalSerialize(
// repeated int32 path = 1 [packed = true];
{
- int byte_size = _path_cached_byte_size_.load(std::memory_order_relaxed);
+ int byte_size = _impl_._path_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
1, _internal_path(), byte_size, target);
}
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string source_file = 2;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -10551,18 +10947,18 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
// repeated int32 path = 1 [packed = true];
{
size_t data_size = ::_pbi::WireFormatLite::
- Int32Size(this->path_);
+ Int32Size(this->_impl_.path_);
if (data_size > 0) {
total_size += 1 +
::_pbi::WireFormatLite::Int32Size(static_cast<arc_i32>(data_size));
}
int cached_size = ::_pbi::ToCachedSize(data_size);
- _path_cached_byte_size_.store(cached_size,
+ _impl_._path_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string source_file = 2;
if (cached_has_bits & 0x00000001u) {
@@ -10582,43 +10978,39 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GeneratedCodeInfo_Annotation::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
GeneratedCodeInfo_Annotation::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GeneratedCodeInfo_Annotation::GetClassData() const { return &_class_data_; }
-void GeneratedCodeInfo_Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<GeneratedCodeInfo_Annotation *>(to)->MergeFrom(
- static_cast<const GeneratedCodeInfo_Annotation &>(from));
-}
-
-void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation)
- GOOGLE_DCHECK_NE(&from, this);
+void GeneratedCodeInfo_Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<GeneratedCodeInfo_Annotation*>(&to_msg);
+ auto& from = static_cast<const GeneratedCodeInfo_Annotation&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- path_.MergeFrom(from.path_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.path_.MergeFrom(from._impl_.path_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_source_file(from._internal_source_file());
+ _this->_internal_set_source_file(from._internal_source_file());
}
if (cached_has_bits & 0x00000002u) {
- begin_ = from.begin_;
+ _this->_impl_.begin_ = from._impl_.begin_;
}
if (cached_has_bits & 0x00000004u) {
- end_ = from.end_;
+ _this->_impl_.end_ = from._impl_.end_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void GeneratedCodeInfo_Annotation::CopyFrom(const GeneratedCodeInfo_Annotation& from) {
@@ -10637,18 +11029,18 @@ void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* ot
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- path_.InternalSwap(&other->path_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.path_.InternalSwap(&other->_impl_.path_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &source_file_, lhs_arena,
- &other->source_file_, rhs_arena
+ &_impl_.source_file_, lhs_arena,
+ &other->_impl_.source_file_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, end_)
- + sizeof(GeneratedCodeInfo_Annotation::end_)
- - PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, begin_)>(
- reinterpret_cast<char*>(&begin_),
- reinterpret_cast<char*>(&other->begin_));
+ PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _impl_.end_)
+ + sizeof(GeneratedCodeInfo_Annotation::_impl_.end_)
+ - PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _impl_.begin_)>(
+ reinterpret_cast<char*>(&_impl_.begin_),
+ reinterpret_cast<char*>(&other->_impl_.begin_));
}
::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const {
@@ -10665,19 +11057,29 @@ class GeneratedCodeInfo::_Internal {
GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- annotation_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo)
}
GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- annotation_(from.annotation_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ GeneratedCodeInfo* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.annotation_){from._impl_.annotation_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo)
}
-inline void GeneratedCodeInfo::SharedCtor() {
+inline void GeneratedCodeInfo::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.annotation_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
GeneratedCodeInfo::~GeneratedCodeInfo() {
@@ -10691,10 +11093,11 @@ GeneratedCodeInfo::~GeneratedCodeInfo() {
inline void GeneratedCodeInfo::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_.annotation_.~RepeatedPtrField();
}
void GeneratedCodeInfo::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void GeneratedCodeInfo::Clear() {
@@ -10703,7 +11106,7 @@ void GeneratedCodeInfo::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- annotation_.Clear();
+ _impl_.annotation_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -10781,35 +11184,31 @@ size_t GeneratedCodeInfo::ByteSizeLong() const {
// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
total_size += 1UL * this->_internal_annotation_size();
- for (const auto& msg : this->annotation_) {
+ for (const auto& msg : this->_impl_.annotation_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GeneratedCodeInfo::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
GeneratedCodeInfo::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GeneratedCodeInfo::GetClassData() const { return &_class_data_; }
-void GeneratedCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<GeneratedCodeInfo *>(to)->MergeFrom(
- static_cast<const GeneratedCodeInfo &>(from));
-}
-
-void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo)
- GOOGLE_DCHECK_NE(&from, this);
+void GeneratedCodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<GeneratedCodeInfo*>(&to_msg);
+ auto& from = static_cast<const GeneratedCodeInfo&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- annotation_.MergeFrom(from.annotation_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.annotation_.MergeFrom(from._impl_.annotation_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void GeneratedCodeInfo::CopyFrom(const GeneratedCodeInfo& from) {
@@ -10826,7 +11225,7 @@ bool GeneratedCodeInfo::IsInitialized() const {
void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- annotation_.InternalSwap(&other->annotation_);
+ _impl_.annotation_.InternalSwap(&other->_impl_.annotation_);
}
::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h
index cf564479bb..d47cd32f80 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -407,9 +407,11 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FileDescriptorSet& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FileDescriptorSet& from);
+ void MergeFrom( const FileDescriptorSet& from) {
+ FileDescriptorSet::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -418,10 +420,10 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FileDescriptorSet* other);
@@ -473,8 +475,11 @@ class PROTOBUF_EXPORT FileDescriptorSet final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto > file_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto > file_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -566,9 +571,11 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FileDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FileDescriptorProto& from);
+ void MergeFrom( const FileDescriptorProto& from) {
+ FileDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -577,10 +584,10 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FileDescriptorProto* other);
@@ -855,20 +862,23 @@ class PROTOBUF_EXPORT FileDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> dependency_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto > message_type_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto > service_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > public_dependency_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > weak_dependency_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr package_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr syntax_;
- ::PROTOBUF_NAMESPACE_ID::FileOptions* options_;
- ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> dependency_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto > message_type_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto > service_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > public_dependency_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > weak_dependency_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr package_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr syntax_;
+ ::PROTOBUF_NAMESPACE_ID::FileOptions* options_;
+ ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -960,9 +970,11 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const DescriptorProto_ExtensionRange& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const DescriptorProto_ExtensionRange& from);
+ void MergeFrom( const DescriptorProto_ExtensionRange& from) {
+ DescriptorProto_ExtensionRange::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -971,10 +983,10 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(DescriptorProto_ExtensionRange* other);
@@ -1054,11 +1066,14 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options_;
- arc_i32 start_;
- arc_i32 end_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options_;
+ arc_i32 start_;
+ arc_i32 end_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -1150,9 +1165,11 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const DescriptorProto_ReservedRange& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const DescriptorProto_ReservedRange& from);
+ void MergeFrom( const DescriptorProto_ReservedRange& from) {
+ DescriptorProto_ReservedRange::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1161,10 +1178,10 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(DescriptorProto_ReservedRange* other);
@@ -1225,10 +1242,13 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- arc_i32 start_;
- arc_i32 end_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ arc_i32 start_;
+ arc_i32 end_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -1320,9 +1340,11 @@ class PROTOBUF_EXPORT DescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const DescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const DescriptorProto& from);
+ void MergeFrom( const DescriptorProto& from) {
+ DescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1331,10 +1353,10 @@ class PROTOBUF_EXPORT DescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(DescriptorProto* other);
@@ -1566,18 +1588,21 @@ class PROTOBUF_EXPORT DescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > field_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto > nested_type_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange > extension_range_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto > oneof_decl_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange > reserved_range_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> reserved_name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::MessageOptions* options_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > field_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto > nested_type_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange > extension_range_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto > oneof_decl_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange > reserved_range_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> reserved_name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::MessageOptions* options_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -1669,9 +1694,11 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const ExtensionRangeOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const ExtensionRangeOptions& from);
+ void MergeFrom( const ExtensionRangeOptions& from) {
+ ExtensionRangeOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1680,10 +1707,10 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(ExtensionRangeOptions* other);
@@ -1736,7 +1763,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -1745,7 +1772,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -1756,7 +1783,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -1766,7 +1793,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -1778,7 +1805,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -1788,7 +1815,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -1800,7 +1827,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -1811,7 +1838,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -1824,7 +1851,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -1835,7 +1862,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -1846,7 +1873,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -1857,7 +1884,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -1867,7 +1894,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -1878,7 +1905,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -1891,7 +1918,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -1903,7 +1930,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -1915,20 +1942,23 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final :
ExtensionRangeOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.ExtensionRangeOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -2020,9 +2050,11 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FieldDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FieldDescriptorProto& from);
+ void MergeFrom( const FieldDescriptorProto& from) {
+ FieldDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -2031,10 +2063,10 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FieldDescriptorProto* other);
@@ -2345,19 +2377,22 @@ class PROTOBUF_EXPORT FieldDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr extendee_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_;
- ::PROTOBUF_NAMESPACE_ID::FieldOptions* options_;
- arc_i32 number_;
- arc_i32 oneof_index_;
- bool proto3_optional_;
- int label_;
- int type_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr extendee_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_;
+ ::PROTOBUF_NAMESPACE_ID::FieldOptions* options_;
+ arc_i32 number_;
+ arc_i32 oneof_index_;
+ bool proto3_optional_;
+ int label_;
+ int type_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -2449,9 +2484,11 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const OneofDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const OneofDescriptorProto& from);
+ void MergeFrom( const OneofDescriptorProto& from) {
+ OneofDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -2460,10 +2497,10 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(OneofDescriptorProto* other);
@@ -2534,10 +2571,13 @@ class PROTOBUF_EXPORT OneofDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::OneofOptions* options_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::OneofOptions* options_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -2629,9 +2669,11 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const EnumDescriptorProto_EnumReservedRange& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const EnumDescriptorProto_EnumReservedRange& from);
+ void MergeFrom( const EnumDescriptorProto_EnumReservedRange& from) {
+ EnumDescriptorProto_EnumReservedRange::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -2640,10 +2682,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(EnumDescriptorProto_EnumReservedRange* other);
@@ -2704,10 +2746,13 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- arc_i32 start_;
- arc_i32 end_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ arc_i32 start_;
+ arc_i32 end_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -2799,9 +2844,11 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const EnumDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const EnumDescriptorProto& from);
+ void MergeFrom( const EnumDescriptorProto& from) {
+ EnumDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -2810,10 +2857,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(EnumDescriptorProto* other);
@@ -2949,13 +2996,16 @@ class PROTOBUF_EXPORT EnumDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto > value_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange > reserved_range_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> reserved_name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::EnumOptions* options_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto > value_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange > reserved_range_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> reserved_name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::EnumOptions* options_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -3047,9 +3097,11 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const EnumValueDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const EnumValueDescriptorProto& from);
+ void MergeFrom( const EnumValueDescriptorProto& from) {
+ EnumValueDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -3058,10 +3110,10 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(EnumValueDescriptorProto* other);
@@ -3146,11 +3198,14 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* options_;
- arc_i32 number_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* options_;
+ arc_i32 number_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -3242,9 +3297,11 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const ServiceDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const ServiceDescriptorProto& from);
+ void MergeFrom( const ServiceDescriptorProto& from) {
+ ServiceDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -3253,10 +3310,10 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(ServiceDescriptorProto* other);
@@ -3346,11 +3403,14 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto > method_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::ServiceOptions* options_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto > method_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::ServiceOptions* options_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -3442,9 +3502,11 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const MethodDescriptorProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const MethodDescriptorProto& from);
+ void MergeFrom( const MethodDescriptorProto& from) {
+ MethodDescriptorProto::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -3453,10 +3515,10 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(MethodDescriptorProto* other);
@@ -3593,14 +3655,17 @@ class PROTOBUF_EXPORT MethodDescriptorProto final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr input_type_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr output_type_;
- ::PROTOBUF_NAMESPACE_ID::MethodOptions* options_;
- bool client_streaming_;
- bool server_streaming_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr input_type_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr output_type_;
+ ::PROTOBUF_NAMESPACE_ID::MethodOptions* options_;
+ bool client_streaming_;
+ bool server_streaming_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -3692,9 +3757,11 @@ class PROTOBUF_EXPORT FileOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FileOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FileOptions& from);
+ void MergeFrom( const FileOptions& from) {
+ FileOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -3703,10 +3770,10 @@ class PROTOBUF_EXPORT FileOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FileOptions* other);
@@ -4121,7 +4188,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -4130,7 +4197,7 @@ class PROTOBUF_EXPORT FileOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -4141,7 +4208,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -4151,7 +4218,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -4163,7 +4230,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4173,7 +4240,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -4185,7 +4252,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4196,7 +4263,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4209,7 +4276,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -4220,7 +4287,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4231,7 +4298,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -4242,7 +4309,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4252,7 +4319,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -4263,7 +4330,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -4276,7 +4343,7 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -4288,7 +4355,7 @@ class PROTOBUF_EXPORT FileOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4300,41 +4367,44 @@ class PROTOBUF_EXPORT FileOptions final :
FileOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.FileOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr java_package_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr java_outer_classname_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr go_package_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr objc_class_prefix_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr csharp_namespace_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr swift_prefix_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_class_prefix_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_namespace_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_metadata_namespace_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ruby_package_;
- bool java_multiple_files_;
- bool java_generate_equals_and_hash_;
- bool java_string_check_utf8_;
- bool cc_generic_services_;
- bool java_generic_services_;
- bool py_generic_services_;
- bool php_generic_services_;
- bool deprecated_;
- int optimize_for_;
- bool cc_enable_arenas_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr java_package_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr java_outer_classname_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr go_package_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr objc_class_prefix_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr csharp_namespace_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr swift_prefix_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_class_prefix_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_namespace_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_metadata_namespace_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ruby_package_;
+ bool java_multiple_files_;
+ bool java_generate_equals_and_hash_;
+ bool java_string_check_utf8_;
+ bool cc_generic_services_;
+ bool java_generic_services_;
+ bool py_generic_services_;
+ bool php_generic_services_;
+ bool deprecated_;
+ int optimize_for_;
+ bool cc_enable_arenas_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -4426,9 +4496,11 @@ class PROTOBUF_EXPORT MessageOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const MessageOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const MessageOptions& from);
+ void MergeFrom( const MessageOptions& from) {
+ MessageOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -4437,10 +4509,10 @@ class PROTOBUF_EXPORT MessageOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(MessageOptions* other);
@@ -4549,7 +4621,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -4558,7 +4630,7 @@ class PROTOBUF_EXPORT MessageOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -4569,7 +4641,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -4579,7 +4651,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -4591,7 +4663,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4601,7 +4673,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -4613,7 +4685,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4624,7 +4696,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4637,7 +4709,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -4648,7 +4720,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4659,7 +4731,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -4670,7 +4742,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4680,7 +4752,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -4691,7 +4763,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -4704,7 +4776,7 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -4716,7 +4788,7 @@ class PROTOBUF_EXPORT MessageOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -4728,25 +4800,28 @@ class PROTOBUF_EXPORT MessageOptions final :
MessageOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.MessageOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- bool message_set_wire_format_;
- bool no_standard_descriptor_accessor_;
- bool deprecated_;
- bool map_entry_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ bool message_set_wire_format_;
+ bool no_standard_descriptor_accessor_;
+ bool deprecated_;
+ bool map_entry_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -4838,9 +4913,11 @@ class PROTOBUF_EXPORT FieldOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FieldOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FieldOptions& from);
+ void MergeFrom( const FieldOptions& from) {
+ FieldOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -4849,10 +4926,10 @@ class PROTOBUF_EXPORT FieldOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FieldOptions* other);
@@ -5067,7 +5144,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -5076,7 +5153,7 @@ class PROTOBUF_EXPORT FieldOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -5087,7 +5164,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -5097,7 +5174,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -5109,7 +5186,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5119,7 +5196,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -5131,7 +5208,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5142,7 +5219,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5155,7 +5232,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -5166,7 +5243,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5177,7 +5254,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -5188,7 +5265,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5198,7 +5275,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -5209,7 +5286,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -5222,7 +5299,7 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -5234,7 +5311,7 @@ class PROTOBUF_EXPORT FieldOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5246,28 +5323,31 @@ class PROTOBUF_EXPORT FieldOptions final :
FieldOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- int ctype_;
- int jstype_;
- bool packed_;
- bool lazy_;
- bool unverified_lazy_;
- bool deprecated_;
- bool weak_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ int ctype_;
+ int jstype_;
+ bool packed_;
+ bool lazy_;
+ bool unverified_lazy_;
+ bool deprecated_;
+ bool weak_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -5359,9 +5439,11 @@ class PROTOBUF_EXPORT OneofOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const OneofOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const OneofOptions& from);
+ void MergeFrom( const OneofOptions& from) {
+ OneofOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -5370,10 +5452,10 @@ class PROTOBUF_EXPORT OneofOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(OneofOptions* other);
@@ -5426,7 +5508,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -5435,7 +5517,7 @@ class PROTOBUF_EXPORT OneofOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -5446,7 +5528,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -5456,7 +5538,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -5468,7 +5550,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5478,7 +5560,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -5490,7 +5572,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5501,7 +5583,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5514,7 +5596,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -5525,7 +5607,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5536,7 +5618,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -5547,7 +5629,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5557,7 +5639,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -5568,7 +5650,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -5581,7 +5663,7 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -5593,7 +5675,7 @@ class PROTOBUF_EXPORT OneofOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5605,20 +5687,23 @@ class PROTOBUF_EXPORT OneofOptions final :
OneofOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.OneofOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -5710,9 +5795,11 @@ class PROTOBUF_EXPORT EnumOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const EnumOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const EnumOptions& from);
+ void MergeFrom( const EnumOptions& from) {
+ EnumOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -5721,10 +5808,10 @@ class PROTOBUF_EXPORT EnumOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(EnumOptions* other);
@@ -5805,7 +5892,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -5814,7 +5901,7 @@ class PROTOBUF_EXPORT EnumOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -5825,7 +5912,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -5835,7 +5922,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -5847,7 +5934,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5857,7 +5944,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -5869,7 +5956,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5880,7 +5967,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5893,7 +5980,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -5904,7 +5991,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5915,7 +6002,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -5926,7 +6013,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5936,7 +6023,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -5947,7 +6034,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -5960,7 +6047,7 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -5972,7 +6059,7 @@ class PROTOBUF_EXPORT EnumOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -5984,23 +6071,26 @@ class PROTOBUF_EXPORT EnumOptions final :
EnumOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.EnumOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- bool allow_alias_;
- bool deprecated_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ bool allow_alias_;
+ bool deprecated_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -6092,9 +6182,11 @@ class PROTOBUF_EXPORT EnumValueOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const EnumValueOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const EnumValueOptions& from);
+ void MergeFrom( const EnumValueOptions& from) {
+ EnumValueOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -6103,10 +6195,10 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(EnumValueOptions* other);
@@ -6173,7 +6265,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -6182,7 +6274,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -6193,7 +6285,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -6203,7 +6295,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -6215,7 +6307,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6225,7 +6317,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -6237,7 +6329,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6248,7 +6340,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6261,7 +6353,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -6272,7 +6364,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6283,7 +6375,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -6294,7 +6386,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6304,7 +6396,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -6315,7 +6407,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -6328,7 +6420,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -6340,7 +6432,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6352,22 +6444,25 @@ class PROTOBUF_EXPORT EnumValueOptions final :
EnumValueOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- bool deprecated_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ bool deprecated_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -6459,9 +6554,11 @@ class PROTOBUF_EXPORT ServiceOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const ServiceOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const ServiceOptions& from);
+ void MergeFrom( const ServiceOptions& from) {
+ ServiceOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -6470,10 +6567,10 @@ class PROTOBUF_EXPORT ServiceOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(ServiceOptions* other);
@@ -6540,7 +6637,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -6549,7 +6646,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -6560,7 +6657,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -6570,7 +6667,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -6582,7 +6679,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6592,7 +6689,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -6604,7 +6701,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6615,7 +6712,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6628,7 +6725,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -6639,7 +6736,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6650,7 +6747,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -6661,7 +6758,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6671,7 +6768,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -6682,7 +6779,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -6695,7 +6792,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -6707,7 +6804,7 @@ class PROTOBUF_EXPORT ServiceOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -6719,22 +6816,25 @@ class PROTOBUF_EXPORT ServiceOptions final :
ServiceOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- bool deprecated_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ bool deprecated_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -6826,9 +6926,11 @@ class PROTOBUF_EXPORT MethodOptions final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const MethodOptions& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const MethodOptions& from);
+ void MergeFrom( const MethodOptions& from) {
+ MethodOptions::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -6837,10 +6939,10 @@ class PROTOBUF_EXPORT MethodOptions final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(MethodOptions* other);
@@ -6953,7 +7055,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.Has(id.number());
+ return _impl_._extensions_.Has(id.number());
}
template <typename _proto_TypeTraits,
@@ -6962,7 +7064,7 @@ class PROTOBUF_EXPORT MethodOptions final :
inline void ClearExtension(
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
- _extensions_.ClearExtension(id.number());
+ _impl_._extensions_.ClearExtension(id.number());
}
@@ -6973,7 +7075,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _extensions_.ExtensionSize(id.number());
+ return _impl_._extensions_.ExtensionSize(id.number());
}
template <typename _proto_TypeTraits,
@@ -6983,7 +7085,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_,
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_,
id.default_value());
}
@@ -6995,7 +7097,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Mutable(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -7005,7 +7107,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::ConstType value) {
- _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), _field_type, value, &_impl_._extensions_);
}
@@ -7017,7 +7119,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::SetAllocated(id.number(), _field_type, value,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -7028,7 +7130,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Singular::MutableType value) {
_proto_TypeTraits::UnsafeArenaSetAllocated(id.number(), _field_type,
- value, &_extensions_);
+ value, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -7041,7 +7143,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::Release(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
::PROTOBUF_NAMESPACE_ID::internal::FieldType _field_type,
@@ -7052,7 +7154,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::UnsafeArenaRelease(id.number(), _field_type,
- &_extensions_);
+ &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -7063,7 +7165,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) const {
- return _proto_TypeTraits::Get(id.number(), _extensions_, index);
+ return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, index);
}
template <typename _proto_TypeTraits,
@@ -7074,7 +7176,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index) {
- return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_);
+ return _proto_TypeTraits::Mutable(id.number(), index, &_impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -7084,7 +7186,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
int index, typename _proto_TypeTraits::Repeated::ConstType value) {
- _proto_TypeTraits::Set(id.number(), index, value, &_extensions_);
+ _proto_TypeTraits::Set(id.number(), index, value, &_impl_._extensions_);
}
@@ -7095,7 +7197,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
typename _proto_TypeTraits::Repeated::MutableType to_add =
- _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_);
+ _proto_TypeTraits::Add(id.number(), _field_type, &_impl_._extensions_);
return to_add;
}
@@ -7108,7 +7210,7 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id,
typename _proto_TypeTraits::Repeated::ConstType value) {
_proto_TypeTraits::Add(id.number(), _field_type, _is_packed, value,
- &_extensions_);
+ &_impl_._extensions_);
}
@@ -7120,7 +7222,7 @@ class PROTOBUF_EXPORT MethodOptions final :
const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier<
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) const {
- return _proto_TypeTraits::GetRepeated(id.number(), _extensions_);
+ return _proto_TypeTraits::GetRepeated(id.number(), _impl_._extensions_);
}
template <typename _proto_TypeTraits,
@@ -7132,23 +7234,26 @@ class PROTOBUF_EXPORT MethodOptions final :
MethodOptions, _proto_TypeTraits, _field_type, _is_packed>& id) {
return _proto_TypeTraits::MutableRepeated(id.number(), _field_type,
- _is_packed, &_extensions_);
+ _is_packed, &_impl_._extensions_);
}
// @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions)
private:
class _Internal;
- ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
-
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
- bool deprecated_;
- int idempotency_level_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_;
+
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_;
+ bool deprecated_;
+ int idempotency_level_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -7240,9 +7345,11 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const UninterpretedOption_NamePart& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const UninterpretedOption_NamePart& from);
+ void MergeFrom( const UninterpretedOption_NamePart& from) {
+ UninterpretedOption_NamePart::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -7251,10 +7358,10 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(UninterpretedOption_NamePart* other);
@@ -7323,10 +7430,13 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_part_;
- bool is_extension_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_part_;
+ bool is_extension_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -7418,9 +7528,11 @@ class PROTOBUF_EXPORT UninterpretedOption final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const UninterpretedOption& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const UninterpretedOption& from);
+ void MergeFrom( const UninterpretedOption& from) {
+ UninterpretedOption::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -7429,10 +7541,10 @@ class PROTOBUF_EXPORT UninterpretedOption final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(UninterpretedOption* other);
@@ -7585,15 +7697,18 @@ class PROTOBUF_EXPORT UninterpretedOption final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart > name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr identifier_value_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aggregate_value_;
- arc_ui64 positive_int_value_;
- arc_i64 negative_int_value_;
- double double_value_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart > name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr identifier_value_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aggregate_value_;
+ arc_ui64 positive_int_value_;
+ arc_i64 negative_int_value_;
+ double double_value_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -7685,9 +7800,11 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const SourceCodeInfo_Location& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const SourceCodeInfo_Location& from);
+ void MergeFrom( const SourceCodeInfo_Location& from) {
+ SourceCodeInfo_Location::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -7696,10 +7813,10 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(SourceCodeInfo_Location* other);
@@ -7841,15 +7958,18 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > path_;
- mutable std::atomic<int> _path_cached_byte_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > span_;
- mutable std::atomic<int> _span_cached_byte_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> leading_detached_comments_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr leading_comments_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trailing_comments_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > path_;
+ mutable std::atomic<int> _path_cached_byte_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > span_;
+ mutable std::atomic<int> _span_cached_byte_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> leading_detached_comments_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr leading_comments_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trailing_comments_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -7941,9 +8061,11 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const SourceCodeInfo& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const SourceCodeInfo& from);
+ void MergeFrom( const SourceCodeInfo& from) {
+ SourceCodeInfo::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -7952,10 +8074,10 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(SourceCodeInfo* other);
@@ -8009,8 +8131,11 @@ class PROTOBUF_EXPORT SourceCodeInfo final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location > location_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location > location_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -8102,9 +8227,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const GeneratedCodeInfo_Annotation& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const GeneratedCodeInfo_Annotation& from);
+ void MergeFrom( const GeneratedCodeInfo_Annotation& from) {
+ GeneratedCodeInfo_Annotation::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -8113,10 +8240,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(GeneratedCodeInfo_Annotation* other);
@@ -8219,13 +8346,16 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > path_;
- mutable std::atomic<int> _path_cached_byte_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_file_;
- arc_i32 begin_;
- arc_i32 end_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 > path_;
+ mutable std::atomic<int> _path_cached_byte_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_file_;
+ arc_i32 begin_;
+ arc_i32 end_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// -------------------------------------------------------------------
@@ -8317,9 +8447,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const GeneratedCodeInfo& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const GeneratedCodeInfo& from);
+ void MergeFrom( const GeneratedCodeInfo& from) {
+ GeneratedCodeInfo::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -8328,10 +8460,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(GeneratedCodeInfo* other);
@@ -8385,8 +8517,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation > annotation_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation > annotation_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
};
// ===================================================================
@@ -8402,32 +8537,32 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final :
// repeated .google.protobuf.FileDescriptorProto file = 1;
inline int FileDescriptorSet::_internal_file_size() const {
- return file_.size();
+ return _impl_.file_.size();
}
inline int FileDescriptorSet::file_size() const {
return _internal_file_size();
}
inline void FileDescriptorSet::clear_file() {
- file_.Clear();
+ _impl_.file_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file)
- return file_.Mutable(index);
+ return _impl_.file_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >*
FileDescriptorSet::mutable_file() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file)
- return &file_;
+ return &_impl_.file_;
}
inline const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& FileDescriptorSet::_internal_file(int index) const {
- return file_.Get(index);
+ return _impl_.file_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& FileDescriptorSet::file(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file)
return _internal_file(index);
}
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::_internal_add_file() {
- return file_.Add();
+ return _impl_.file_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::add_file() {
::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _add = _internal_add_file();
@@ -8437,7 +8572,7 @@ inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::add_file
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >&
FileDescriptorSet::file() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
- return file_;
+ return _impl_.file_;
}
// -------------------------------------------------------------------
@@ -8446,15 +8581,15 @@ FileDescriptorSet::file() const {
// optional string name = 1;
inline bool FileDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool FileDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void FileDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& FileDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
@@ -8463,8 +8598,8 @@ inline const TProtoStringType& FileDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name)
}
inline TProtoStringType* FileDescriptorProto::mutable_name() {
@@ -8473,40 +8608,40 @@ inline TProtoStringType* FileDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& FileDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void FileDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
@@ -8514,15 +8649,15 @@ inline void FileDescriptorProto::set_allocated_name(TProtoStringType* name) {
// optional string package = 2;
inline bool FileDescriptorProto::_internal_has_package() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool FileDescriptorProto::has_package() const {
return _internal_has_package();
}
inline void FileDescriptorProto::clear_package() {
- package_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.package_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& FileDescriptorProto::package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
@@ -8531,8 +8666,8 @@ inline const TProtoStringType& FileDescriptorProto::package() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileDescriptorProto::set_package(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package)
}
inline TProtoStringType* FileDescriptorProto::mutable_package() {
@@ -8541,40 +8676,40 @@ inline TProtoStringType* FileDescriptorProto::mutable_package() {
return _s;
}
inline const TProtoStringType& FileDescriptorProto::_internal_package() const {
- return package_.Get();
+ return _impl_.package_.Get();
}
inline void FileDescriptorProto::_internal_set_package(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- package_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.package_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileDescriptorProto::_internal_mutable_package() {
- _has_bits_[0] |= 0x00000002u;
- return package_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.package_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileDescriptorProto::release_package() {
// @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.package)
if (!_internal_has_package()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = package_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.package_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (package_.IsDefault()) {
- package_.Set("", GetArenaForAllocation());
+ if (_impl_.package_.IsDefault()) {
+ _impl_.package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileDescriptorProto::set_allocated_package(TProtoStringType* package) {
if (package != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- package_.SetAllocated(package, GetArenaForAllocation());
+ _impl_.package_.SetAllocated(package, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (package_.IsDefault()) {
- package_.Set("", GetArenaForAllocation());
+ if (_impl_.package_.IsDefault()) {
+ _impl_.package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
@@ -8582,13 +8717,13 @@ inline void FileDescriptorProto::set_allocated_package(TProtoStringType* package
// repeated string dependency = 3;
inline int FileDescriptorProto::_internal_dependency_size() const {
- return dependency_.size();
+ return _impl_.dependency_.size();
}
inline int FileDescriptorProto::dependency_size() const {
return _internal_dependency_size();
}
inline void FileDescriptorProto::clear_dependency() {
- dependency_.Clear();
+ _impl_.dependency_.Clear();
}
inline TProtoStringType* FileDescriptorProto::add_dependency() {
TProtoStringType* _s = _internal_add_dependency();
@@ -8596,7 +8731,7 @@ inline TProtoStringType* FileDescriptorProto::add_dependency() {
return _s;
}
inline const TProtoStringType& FileDescriptorProto::_internal_dependency(int index) const {
- return dependency_.Get(index);
+ return _impl_.dependency_.Get(index);
}
inline const TProtoStringType& FileDescriptorProto::dependency(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency)
@@ -8604,80 +8739,80 @@ inline const TProtoStringType& FileDescriptorProto::dependency(int index) const
}
inline TProtoStringType* FileDescriptorProto::mutable_dependency(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency)
- return dependency_.Mutable(index);
+ return _impl_.dependency_.Mutable(index);
}
inline void FileDescriptorProto::set_dependency(int index, const TProtoStringType& value) {
- dependency_.Mutable(index)->assign(value);
+ _impl_.dependency_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::set_dependency(int index, TProtoStringType&& value) {
- dependency_.Mutable(index)->assign(std::move(value));
+ _impl_.dependency_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::set_dependency(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- dependency_.Mutable(index)->assign(value);
+ _impl_.dependency_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) {
- dependency_.Mutable(index)->assign(
+ _impl_.dependency_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency)
}
inline TProtoStringType* FileDescriptorProto::_internal_add_dependency() {
- return dependency_.Add();
+ return _impl_.dependency_.Add();
}
inline void FileDescriptorProto::add_dependency(const TProtoStringType& value) {
- dependency_.Add()->assign(value);
+ _impl_.dependency_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(TProtoStringType&& value) {
- dependency_.Add(std::move(value));
+ _impl_.dependency_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- dependency_.Add()->assign(value);
+ _impl_.dependency_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency)
}
inline void FileDescriptorProto::add_dependency(const char* value, size_t size) {
- dependency_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.dependency_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
FileDescriptorProto::dependency() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency)
- return dependency_;
+ return _impl_.dependency_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
FileDescriptorProto::mutable_dependency() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency)
- return &dependency_;
+ return &_impl_.dependency_;
}
// repeated int32 public_dependency = 10;
inline int FileDescriptorProto::_internal_public_dependency_size() const {
- return public_dependency_.size();
+ return _impl_.public_dependency_.size();
}
inline int FileDescriptorProto::public_dependency_size() const {
return _internal_public_dependency_size();
}
inline void FileDescriptorProto::clear_public_dependency() {
- public_dependency_.Clear();
+ _impl_.public_dependency_.Clear();
}
inline arc_i32 FileDescriptorProto::_internal_public_dependency(int index) const {
- return public_dependency_.Get(index);
+ return _impl_.public_dependency_.Get(index);
}
inline arc_i32 FileDescriptorProto::public_dependency(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency)
return _internal_public_dependency(index);
}
inline void FileDescriptorProto::set_public_dependency(int index, arc_i32 value) {
- public_dependency_.Set(index, value);
+ _impl_.public_dependency_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency)
}
inline void FileDescriptorProto::_internal_add_public_dependency(arc_i32 value) {
- public_dependency_.Add(value);
+ _impl_.public_dependency_.Add(value);
}
inline void FileDescriptorProto::add_public_dependency(arc_i32 value) {
_internal_add_public_dependency(value);
@@ -8685,7 +8820,7 @@ inline void FileDescriptorProto::add_public_dependency(arc_i32 value) {
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
FileDescriptorProto::_internal_public_dependency() const {
- return public_dependency_;
+ return _impl_.public_dependency_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
FileDescriptorProto::public_dependency() const {
@@ -8694,7 +8829,7 @@ FileDescriptorProto::public_dependency() const {
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
FileDescriptorProto::_internal_mutable_public_dependency() {
- return &public_dependency_;
+ return &_impl_.public_dependency_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
FileDescriptorProto::mutable_public_dependency() {
@@ -8704,27 +8839,27 @@ FileDescriptorProto::mutable_public_dependency() {
// repeated int32 weak_dependency = 11;
inline int FileDescriptorProto::_internal_weak_dependency_size() const {
- return weak_dependency_.size();
+ return _impl_.weak_dependency_.size();
}
inline int FileDescriptorProto::weak_dependency_size() const {
return _internal_weak_dependency_size();
}
inline void FileDescriptorProto::clear_weak_dependency() {
- weak_dependency_.Clear();
+ _impl_.weak_dependency_.Clear();
}
inline arc_i32 FileDescriptorProto::_internal_weak_dependency(int index) const {
- return weak_dependency_.Get(index);
+ return _impl_.weak_dependency_.Get(index);
}
inline arc_i32 FileDescriptorProto::weak_dependency(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency)
return _internal_weak_dependency(index);
}
inline void FileDescriptorProto::set_weak_dependency(int index, arc_i32 value) {
- weak_dependency_.Set(index, value);
+ _impl_.weak_dependency_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency)
}
inline void FileDescriptorProto::_internal_add_weak_dependency(arc_i32 value) {
- weak_dependency_.Add(value);
+ _impl_.weak_dependency_.Add(value);
}
inline void FileDescriptorProto::add_weak_dependency(arc_i32 value) {
_internal_add_weak_dependency(value);
@@ -8732,7 +8867,7 @@ inline void FileDescriptorProto::add_weak_dependency(arc_i32 value) {
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
FileDescriptorProto::_internal_weak_dependency() const {
- return weak_dependency_;
+ return _impl_.weak_dependency_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
FileDescriptorProto::weak_dependency() const {
@@ -8741,7 +8876,7 @@ FileDescriptorProto::weak_dependency() const {
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
FileDescriptorProto::_internal_mutable_weak_dependency() {
- return &weak_dependency_;
+ return &_impl_.weak_dependency_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
FileDescriptorProto::mutable_weak_dependency() {
@@ -8751,32 +8886,32 @@ FileDescriptorProto::mutable_weak_dependency() {
// repeated .google.protobuf.DescriptorProto message_type = 4;
inline int FileDescriptorProto::_internal_message_type_size() const {
- return message_type_.size();
+ return _impl_.message_type_.size();
}
inline int FileDescriptorProto::message_type_size() const {
return _internal_message_type_size();
}
inline void FileDescriptorProto::clear_message_type() {
- message_type_.Clear();
+ _impl_.message_type_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type)
- return message_type_.Mutable(index);
+ return _impl_.message_type_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto >*
FileDescriptorProto::mutable_message_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type)
- return &message_type_;
+ return &_impl_.message_type_;
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto& FileDescriptorProto::_internal_message_type(int index) const {
- return message_type_.Get(index);
+ return _impl_.message_type_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto& FileDescriptorProto::message_type(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type)
return _internal_message_type(index);
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::_internal_add_message_type() {
- return message_type_.Add();
+ return _impl_.message_type_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::add_message_type() {
::PROTOBUF_NAMESPACE_ID::DescriptorProto* _add = _internal_add_message_type();
@@ -8786,37 +8921,37 @@ inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::add_messag
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto >&
FileDescriptorProto::message_type() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
- return message_type_;
+ return _impl_.message_type_;
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
inline int FileDescriptorProto::_internal_enum_type_size() const {
- return enum_type_.size();
+ return _impl_.enum_type_.size();
}
inline int FileDescriptorProto::enum_type_size() const {
return _internal_enum_type_size();
}
inline void FileDescriptorProto::clear_enum_type() {
- enum_type_.Clear();
+ _impl_.enum_type_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type)
- return enum_type_.Mutable(index);
+ return _impl_.enum_type_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >*
FileDescriptorProto::mutable_enum_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type)
- return &enum_type_;
+ return &_impl_.enum_type_;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& FileDescriptorProto::_internal_enum_type(int index) const {
- return enum_type_.Get(index);
+ return _impl_.enum_type_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type)
return _internal_enum_type(index);
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::_internal_add_enum_type() {
- return enum_type_.Add();
+ return _impl_.enum_type_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::add_enum_type() {
::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* _add = _internal_add_enum_type();
@@ -8826,37 +8961,37 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::add_en
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >&
FileDescriptorProto::enum_type() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
- return enum_type_;
+ return _impl_.enum_type_;
}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
inline int FileDescriptorProto::_internal_service_size() const {
- return service_.size();
+ return _impl_.service_.size();
}
inline int FileDescriptorProto::service_size() const {
return _internal_service_size();
}
inline void FileDescriptorProto::clear_service() {
- service_.Clear();
+ _impl_.service_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service)
- return service_.Mutable(index);
+ return _impl_.service_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >*
FileDescriptorProto::mutable_service() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service)
- return &service_;
+ return &_impl_.service_;
}
inline const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& FileDescriptorProto::_internal_service(int index) const {
- return service_.Get(index);
+ return _impl_.service_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& FileDescriptorProto::service(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service)
return _internal_service(index);
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::_internal_add_service() {
- return service_.Add();
+ return _impl_.service_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::add_service() {
::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* _add = _internal_add_service();
@@ -8866,37 +9001,37 @@ inline ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::add
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >&
FileDescriptorProto::service() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
- return service_;
+ return _impl_.service_;
}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
inline int FileDescriptorProto::_internal_extension_size() const {
- return extension_.size();
+ return _impl_.extension_.size();
}
inline int FileDescriptorProto::extension_size() const {
return _internal_extension_size();
}
inline void FileDescriptorProto::clear_extension() {
- extension_.Clear();
+ _impl_.extension_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension)
- return extension_.Mutable(index);
+ return _impl_.extension_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >*
FileDescriptorProto::mutable_extension() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension)
- return &extension_;
+ return &_impl_.extension_;
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& FileDescriptorProto::_internal_extension(int index) const {
- return extension_.Get(index);
+ return _impl_.extension_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& FileDescriptorProto::extension(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension)
return _internal_extension(index);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::_internal_add_extension() {
- return extension_.Add();
+ return _impl_.extension_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::add_extension() {
::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _add = _internal_add_extension();
@@ -8906,24 +9041,24 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::add_e
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >&
FileDescriptorProto::extension() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
- return extension_;
+ return _impl_.extension_;
}
// optional .google.protobuf.FileOptions options = 8;
inline bool FileDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool FileDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void FileDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000008u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline const ::PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::FileOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::FileOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::FileOptions&>(
::PROTOBUF_NAMESPACE_ID::_FileOptions_default_instance_);
}
@@ -8934,20 +9069,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::options(
inline void FileDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::FileOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000008u;
- ::PROTOBUF_NAMESPACE_ID::FileOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ ::PROTOBUF_NAMESPACE_ID::FileOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -8961,18 +9096,18 @@ inline ::PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::release_option
}
inline ::PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.options)
- _has_bits_[0] &= ~0x00000008u;
- ::PROTOBUF_NAMESPACE_ID::FileOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ ::PROTOBUF_NAMESPACE_ID::FileOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000008u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000008u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::FileOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::FileOptions* _msg = _internal_mutable_options();
@@ -8982,7 +9117,7 @@ inline ::PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::mutable_option
inline void FileDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::FileOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -8991,29 +9126,29 @@ inline void FileDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options)
}
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
inline bool FileDescriptorProto::_internal_has_source_code_info() const {
- bool value = (_has_bits_[0] & 0x00000010u) != 0;
- PROTOBUF_ASSUME(!value || source_code_info_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.source_code_info_ != nullptr);
return value;
}
inline bool FileDescriptorProto::has_source_code_info() const {
return _internal_has_source_code_info();
}
inline void FileDescriptorProto::clear_source_code_info() {
- if (source_code_info_ != nullptr) source_code_info_->Clear();
- _has_bits_[0] &= ~0x00000010u;
+ if (_impl_.source_code_info_ != nullptr) _impl_.source_code_info_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
inline const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::_internal_source_code_info() const {
- const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* p = source_code_info_;
+ const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* p = _impl_.source_code_info_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo&>(
::PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_default_instance_);
}
@@ -9024,20 +9159,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::sourc
inline void FileDescriptorProto::unsafe_arena_set_allocated_source_code_info(
::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_code_info_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_code_info_);
}
- source_code_info_ = source_code_info;
+ _impl_.source_code_info_ = source_code_info;
if (source_code_info) {
- _has_bits_[0] |= 0x00000010u;
+ _impl_._has_bits_[0] |= 0x00000010u;
} else {
- _has_bits_[0] &= ~0x00000010u;
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::release_source_code_info() {
- _has_bits_[0] &= ~0x00000010u;
- ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = source_code_info_;
- source_code_info_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000010u;
+ ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = _impl_.source_code_info_;
+ _impl_.source_code_info_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -9051,18 +9186,18 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::release_sou
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::unsafe_arena_release_source_code_info() {
// @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.source_code_info)
- _has_bits_[0] &= ~0x00000010u;
- ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = source_code_info_;
- source_code_info_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000010u;
+ ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = _impl_.source_code_info_;
+ _impl_.source_code_info_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::_internal_mutable_source_code_info() {
- _has_bits_[0] |= 0x00000010u;
- if (source_code_info_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000010u;
+ if (_impl_.source_code_info_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceCodeInfo>(GetArenaForAllocation());
- source_code_info_ = p;
+ _impl_.source_code_info_ = p;
}
- return source_code_info_;
+ return _impl_.source_code_info_;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() {
::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* _msg = _internal_mutable_source_code_info();
@@ -9072,7 +9207,7 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::mutable_sou
inline void FileDescriptorProto::set_allocated_source_code_info(::PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete source_code_info_;
+ delete _impl_.source_code_info_;
}
if (source_code_info) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -9081,25 +9216,25 @@ inline void FileDescriptorProto::set_allocated_source_code_info(::PROTOBUF_NAMES
source_code_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, source_code_info, submessage_arena);
}
- _has_bits_[0] |= 0x00000010u;
+ _impl_._has_bits_[0] |= 0x00000010u;
} else {
- _has_bits_[0] &= ~0x00000010u;
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
- source_code_info_ = source_code_info;
+ _impl_.source_code_info_ = source_code_info;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
}
// optional string syntax = 12;
inline bool FileDescriptorProto::_internal_has_syntax() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool FileDescriptorProto::has_syntax() const {
return _internal_has_syntax();
}
inline void FileDescriptorProto::clear_syntax() {
- syntax_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.syntax_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& FileDescriptorProto::syntax() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
@@ -9108,8 +9243,8 @@ inline const TProtoStringType& FileDescriptorProto::syntax() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileDescriptorProto::set_syntax(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000004u;
- syntax_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.syntax_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax)
}
inline TProtoStringType* FileDescriptorProto::mutable_syntax() {
@@ -9118,40 +9253,40 @@ inline TProtoStringType* FileDescriptorProto::mutable_syntax() {
return _s;
}
inline const TProtoStringType& FileDescriptorProto::_internal_syntax() const {
- return syntax_.Get();
+ return _impl_.syntax_.Get();
}
inline void FileDescriptorProto::_internal_set_syntax(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000004u;
- syntax_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.syntax_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileDescriptorProto::_internal_mutable_syntax() {
- _has_bits_[0] |= 0x00000004u;
- return syntax_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ return _impl_.syntax_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileDescriptorProto::release_syntax() {
// @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.syntax)
if (!_internal_has_syntax()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000004u;
- auto* p = syntax_.Release();
+ _impl_._has_bits_[0] &= ~0x00000004u;
+ auto* p = _impl_.syntax_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (syntax_.IsDefault()) {
- syntax_.Set("", GetArenaForAllocation());
+ if (_impl_.syntax_.IsDefault()) {
+ _impl_.syntax_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileDescriptorProto::set_allocated_syntax(TProtoStringType* syntax) {
if (syntax != nullptr) {
- _has_bits_[0] |= 0x00000004u;
+ _impl_._has_bits_[0] |= 0x00000004u;
} else {
- _has_bits_[0] &= ~0x00000004u;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
- syntax_.SetAllocated(syntax, GetArenaForAllocation());
+ _impl_.syntax_.SetAllocated(syntax, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (syntax_.IsDefault()) {
- syntax_.Set("", GetArenaForAllocation());
+ if (_impl_.syntax_.IsDefault()) {
+ _impl_.syntax_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax)
@@ -9163,26 +9298,26 @@ inline void FileDescriptorProto::set_allocated_syntax(TProtoStringType* syntax)
// optional int32 start = 1;
inline bool DescriptorProto_ExtensionRange::_internal_has_start() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool DescriptorProto_ExtensionRange::has_start() const {
return _internal_has_start();
}
inline void DescriptorProto_ExtensionRange::clear_start() {
- start_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.start_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline arc_i32 DescriptorProto_ExtensionRange::_internal_start() const {
- return start_;
+ return _impl_.start_;
}
inline arc_i32 DescriptorProto_ExtensionRange::start() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start)
return _internal_start();
}
inline void DescriptorProto_ExtensionRange::_internal_set_start(arc_i32 value) {
- _has_bits_[0] |= 0x00000002u;
- start_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.start_ = value;
}
inline void DescriptorProto_ExtensionRange::set_start(arc_i32 value) {
_internal_set_start(value);
@@ -9191,26 +9326,26 @@ inline void DescriptorProto_ExtensionRange::set_start(arc_i32 value) {
// optional int32 end = 2;
inline bool DescriptorProto_ExtensionRange::_internal_has_end() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool DescriptorProto_ExtensionRange::has_end() const {
return _internal_has_end();
}
inline void DescriptorProto_ExtensionRange::clear_end() {
- end_ = 0;
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.end_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline arc_i32 DescriptorProto_ExtensionRange::_internal_end() const {
- return end_;
+ return _impl_.end_;
}
inline arc_i32 DescriptorProto_ExtensionRange::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end)
return _internal_end();
}
inline void DescriptorProto_ExtensionRange::_internal_set_end(arc_i32 value) {
- _has_bits_[0] |= 0x00000004u;
- end_ = value;
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.end_ = value;
}
inline void DescriptorProto_ExtensionRange::set_end(arc_i32 value) {
_internal_set_end(value);
@@ -9219,19 +9354,19 @@ inline void DescriptorProto_ExtensionRange::set_end(arc_i32 value) {
// optional .google.protobuf.ExtensionRangeOptions options = 3;
inline bool DescriptorProto_ExtensionRange::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool DescriptorProto_ExtensionRange::has_options() const {
return _internal_has_options();
}
inline void DescriptorProto_ExtensionRange::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000001u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions&>(
::PROTOBUF_NAMESPACE_ID::_ExtensionRangeOptions_default_instance_);
}
@@ -9242,20 +9377,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_Ext
inline void DescriptorProto_ExtensionRange::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.ExtensionRange.options)
}
inline ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::release_options() {
- _has_bits_[0] &= ~0x00000001u;
- ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -9269,18 +9404,18 @@ inline ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_Extension
}
inline ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.ExtensionRange.options)
- _has_bits_[0] &= ~0x00000001u;
- ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000001u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000001u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::mutable_options() {
::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* _msg = _internal_mutable_options();
@@ -9290,7 +9425,7 @@ inline ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_Extension
inline void DescriptorProto_ExtensionRange::set_allocated_options(::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -9299,11 +9434,11 @@ inline void DescriptorProto_ExtensionRange::set_allocated_options(::PROTOBUF_NAM
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.ExtensionRange.options)
}
@@ -9313,26 +9448,26 @@ inline void DescriptorProto_ExtensionRange::set_allocated_options(::PROTOBUF_NAM
// optional int32 start = 1;
inline bool DescriptorProto_ReservedRange::_internal_has_start() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool DescriptorProto_ReservedRange::has_start() const {
return _internal_has_start();
}
inline void DescriptorProto_ReservedRange::clear_start() {
- start_ = 0;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.start_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline arc_i32 DescriptorProto_ReservedRange::_internal_start() const {
- return start_;
+ return _impl_.start_;
}
inline arc_i32 DescriptorProto_ReservedRange::start() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start)
return _internal_start();
}
inline void DescriptorProto_ReservedRange::_internal_set_start(arc_i32 value) {
- _has_bits_[0] |= 0x00000001u;
- start_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.start_ = value;
}
inline void DescriptorProto_ReservedRange::set_start(arc_i32 value) {
_internal_set_start(value);
@@ -9341,26 +9476,26 @@ inline void DescriptorProto_ReservedRange::set_start(arc_i32 value) {
// optional int32 end = 2;
inline bool DescriptorProto_ReservedRange::_internal_has_end() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool DescriptorProto_ReservedRange::has_end() const {
return _internal_has_end();
}
inline void DescriptorProto_ReservedRange::clear_end() {
- end_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.end_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline arc_i32 DescriptorProto_ReservedRange::_internal_end() const {
- return end_;
+ return _impl_.end_;
}
inline arc_i32 DescriptorProto_ReservedRange::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end)
return _internal_end();
}
inline void DescriptorProto_ReservedRange::_internal_set_end(arc_i32 value) {
- _has_bits_[0] |= 0x00000002u;
- end_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.end_ = value;
}
inline void DescriptorProto_ReservedRange::set_end(arc_i32 value) {
_internal_set_end(value);
@@ -9373,15 +9508,15 @@ inline void DescriptorProto_ReservedRange::set_end(arc_i32 value) {
// optional string name = 1;
inline bool DescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool DescriptorProto::has_name() const {
return _internal_has_name();
}
inline void DescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& DescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
@@ -9390,8 +9525,8 @@ inline const TProtoStringType& DescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void DescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name)
}
inline TProtoStringType* DescriptorProto::mutable_name() {
@@ -9400,40 +9535,40 @@ inline TProtoStringType* DescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& DescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void DescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* DescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* DescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void DescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
@@ -9441,32 +9576,32 @@ inline void DescriptorProto::set_allocated_name(TProtoStringType* name) {
// repeated .google.protobuf.FieldDescriptorProto field = 2;
inline int DescriptorProto::_internal_field_size() const {
- return field_.size();
+ return _impl_.field_.size();
}
inline int DescriptorProto::field_size() const {
return _internal_field_size();
}
inline void DescriptorProto::clear_field() {
- field_.Clear();
+ _impl_.field_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::mutable_field(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field)
- return field_.Mutable(index);
+ return _impl_.field_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >*
DescriptorProto::mutable_field() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field)
- return &field_;
+ return &_impl_.field_;
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::_internal_field(int index) const {
- return field_.Get(index);
+ return _impl_.field_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::field(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field)
return _internal_field(index);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::_internal_add_field() {
- return field_.Add();
+ return _impl_.field_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_field() {
::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _add = _internal_add_field();
@@ -9476,37 +9611,37 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_field
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >&
DescriptorProto::field() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
- return field_;
+ return _impl_.field_;
}
// repeated .google.protobuf.FieldDescriptorProto extension = 6;
inline int DescriptorProto::_internal_extension_size() const {
- return extension_.size();
+ return _impl_.extension_.size();
}
inline int DescriptorProto::extension_size() const {
return _internal_extension_size();
}
inline void DescriptorProto::clear_extension() {
- extension_.Clear();
+ _impl_.extension_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension)
- return extension_.Mutable(index);
+ return _impl_.extension_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >*
DescriptorProto::mutable_extension() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension)
- return &extension_;
+ return &_impl_.extension_;
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::_internal_extension(int index) const {
- return extension_.Get(index);
+ return _impl_.extension_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::extension(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension)
return _internal_extension(index);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::_internal_add_extension() {
- return extension_.Add();
+ return _impl_.extension_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_extension() {
::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _add = _internal_add_extension();
@@ -9516,37 +9651,37 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_exten
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >&
DescriptorProto::extension() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
- return extension_;
+ return _impl_.extension_;
}
// repeated .google.protobuf.DescriptorProto nested_type = 3;
inline int DescriptorProto::_internal_nested_type_size() const {
- return nested_type_.size();
+ return _impl_.nested_type_.size();
}
inline int DescriptorProto::nested_type_size() const {
return _internal_nested_type_size();
}
inline void DescriptorProto::clear_nested_type() {
- nested_type_.Clear();
+ _impl_.nested_type_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::mutable_nested_type(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type)
- return nested_type_.Mutable(index);
+ return _impl_.nested_type_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto >*
DescriptorProto::mutable_nested_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type)
- return &nested_type_;
+ return &_impl_.nested_type_;
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto& DescriptorProto::_internal_nested_type(int index) const {
- return nested_type_.Get(index);
+ return _impl_.nested_type_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto& DescriptorProto::nested_type(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type)
return _internal_nested_type(index);
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::_internal_add_nested_type() {
- return nested_type_.Add();
+ return _impl_.nested_type_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::add_nested_type() {
::PROTOBUF_NAMESPACE_ID::DescriptorProto* _add = _internal_add_nested_type();
@@ -9556,37 +9691,37 @@ inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::add_nested_typ
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto >&
DescriptorProto::nested_type() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
- return nested_type_;
+ return _impl_.nested_type_;
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
inline int DescriptorProto::_internal_enum_type_size() const {
- return enum_type_.size();
+ return _impl_.enum_type_.size();
}
inline int DescriptorProto::enum_type_size() const {
return _internal_enum_type_size();
}
inline void DescriptorProto::clear_enum_type() {
- enum_type_.Clear();
+ _impl_.enum_type_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type)
- return enum_type_.Mutable(index);
+ return _impl_.enum_type_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >*
DescriptorProto::mutable_enum_type() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type)
- return &enum_type_;
+ return &_impl_.enum_type_;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& DescriptorProto::_internal_enum_type(int index) const {
- return enum_type_.Get(index);
+ return _impl_.enum_type_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& DescriptorProto::enum_type(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type)
return _internal_enum_type(index);
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::_internal_add_enum_type() {
- return enum_type_.Add();
+ return _impl_.enum_type_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::add_enum_type() {
::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* _add = _internal_add_enum_type();
@@ -9596,37 +9731,37 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::add_enum_t
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >&
DescriptorProto::enum_type() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
- return enum_type_;
+ return _impl_.enum_type_;
}
// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
inline int DescriptorProto::_internal_extension_range_size() const {
- return extension_range_.size();
+ return _impl_.extension_range_.size();
}
inline int DescriptorProto::extension_range_size() const {
return _internal_extension_range_size();
}
inline void DescriptorProto::clear_extension_range() {
- extension_range_.Clear();
+ _impl_.extension_range_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range)
- return extension_range_.Mutable(index);
+ return _impl_.extension_range_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >*
DescriptorProto::mutable_extension_range() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range)
- return &extension_range_;
+ return &_impl_.extension_range_;
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& DescriptorProto::_internal_extension_range(int index) const {
- return extension_range_.Get(index);
+ return _impl_.extension_range_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range)
return _internal_extension_range(index);
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::_internal_add_extension_range() {
- return extension_range_.Add();
+ return _impl_.extension_range_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() {
::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* _add = _internal_add_extension_range();
@@ -9636,37 +9771,37 @@ inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto:
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >&
DescriptorProto::extension_range() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
- return extension_range_;
+ return _impl_.extension_range_;
}
// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
inline int DescriptorProto::_internal_oneof_decl_size() const {
- return oneof_decl_.size();
+ return _impl_.oneof_decl_.size();
}
inline int DescriptorProto::oneof_decl_size() const {
return _internal_oneof_decl_size();
}
inline void DescriptorProto::clear_oneof_decl() {
- oneof_decl_.Clear();
+ _impl_.oneof_decl_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl)
- return oneof_decl_.Mutable(index);
+ return _impl_.oneof_decl_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >*
DescriptorProto::mutable_oneof_decl() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl)
- return &oneof_decl_;
+ return &_impl_.oneof_decl_;
}
inline const ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& DescriptorProto::_internal_oneof_decl(int index) const {
- return oneof_decl_.Get(index);
+ return _impl_.oneof_decl_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl)
return _internal_oneof_decl(index);
}
inline ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::_internal_add_oneof_decl() {
- return oneof_decl_.Add();
+ return _impl_.oneof_decl_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::add_oneof_decl() {
::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* _add = _internal_add_oneof_decl();
@@ -9676,24 +9811,24 @@ inline ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::add_oneof
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >&
DescriptorProto::oneof_decl() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
- return oneof_decl_;
+ return _impl_.oneof_decl_;
}
// optional .google.protobuf.MessageOptions options = 7;
inline bool DescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool DescriptorProto::has_options() const {
return _internal_has_options();
}
inline void DescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::MessageOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::MessageOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::MessageOptions&>(
::PROTOBUF_NAMESPACE_ID::_MessageOptions_default_instance_);
}
@@ -9704,20 +9839,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::options()
inline void DescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::MessageOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::MessageOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::MessageOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -9731,18 +9866,18 @@ inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::release_options
}
inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.options)
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::MessageOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::MessageOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000002u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000002u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::MessageOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::MessageOptions* _msg = _internal_mutable_options();
@@ -9752,7 +9887,7 @@ inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::mutable_options
inline void DescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::MessageOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -9761,42 +9896,42 @@ inline void DescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::Mess
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options)
}
// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
inline int DescriptorProto::_internal_reserved_range_size() const {
- return reserved_range_.size();
+ return _impl_.reserved_range_.size();
}
inline int DescriptorProto::reserved_range_size() const {
return _internal_reserved_range_size();
}
inline void DescriptorProto::clear_reserved_range() {
- reserved_range_.Clear();
+ _impl_.reserved_range_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range)
- return reserved_range_.Mutable(index);
+ return _impl_.reserved_range_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >*
DescriptorProto::mutable_reserved_range() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range)
- return &reserved_range_;
+ return &_impl_.reserved_range_;
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& DescriptorProto::_internal_reserved_range(int index) const {
- return reserved_range_.Get(index);
+ return _impl_.reserved_range_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range)
return _internal_reserved_range(index);
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::_internal_add_reserved_range() {
- return reserved_range_.Add();
+ return _impl_.reserved_range_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() {
::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* _add = _internal_add_reserved_range();
@@ -9806,18 +9941,18 @@ inline ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >&
DescriptorProto::reserved_range() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range)
- return reserved_range_;
+ return _impl_.reserved_range_;
}
// repeated string reserved_name = 10;
inline int DescriptorProto::_internal_reserved_name_size() const {
- return reserved_name_.size();
+ return _impl_.reserved_name_.size();
}
inline int DescriptorProto::reserved_name_size() const {
return _internal_reserved_name_size();
}
inline void DescriptorProto::clear_reserved_name() {
- reserved_name_.Clear();
+ _impl_.reserved_name_.Clear();
}
inline TProtoStringType* DescriptorProto::add_reserved_name() {
TProtoStringType* _s = _internal_add_reserved_name();
@@ -9825,7 +9960,7 @@ inline TProtoStringType* DescriptorProto::add_reserved_name() {
return _s;
}
inline const TProtoStringType& DescriptorProto::_internal_reserved_name(int index) const {
- return reserved_name_.Get(index);
+ return _impl_.reserved_name_.Get(index);
}
inline const TProtoStringType& DescriptorProto::reserved_name(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name)
@@ -9833,55 +9968,55 @@ inline const TProtoStringType& DescriptorProto::reserved_name(int index) const {
}
inline TProtoStringType* DescriptorProto::mutable_reserved_name(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name)
- return reserved_name_.Mutable(index);
+ return _impl_.reserved_name_.Mutable(index);
}
inline void DescriptorProto::set_reserved_name(int index, const TProtoStringType& value) {
- reserved_name_.Mutable(index)->assign(value);
+ _impl_.reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::set_reserved_name(int index, TProtoStringType&& value) {
- reserved_name_.Mutable(index)->assign(std::move(value));
+ _impl_.reserved_name_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::set_reserved_name(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- reserved_name_.Mutable(index)->assign(value);
+ _impl_.reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) {
- reserved_name_.Mutable(index)->assign(
+ _impl_.reserved_name_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name)
}
inline TProtoStringType* DescriptorProto::_internal_add_reserved_name() {
- return reserved_name_.Add();
+ return _impl_.reserved_name_.Add();
}
inline void DescriptorProto::add_reserved_name(const TProtoStringType& value) {
- reserved_name_.Add()->assign(value);
+ _impl_.reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::add_reserved_name(TProtoStringType&& value) {
- reserved_name_.Add(std::move(value));
+ _impl_.reserved_name_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::add_reserved_name(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- reserved_name_.Add()->assign(value);
+ _impl_.reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name)
}
inline void DescriptorProto::add_reserved_name(const char* value, size_t size) {
- reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
DescriptorProto::reserved_name() const {
// @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name)
- return reserved_name_;
+ return _impl_.reserved_name_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
DescriptorProto::mutable_reserved_name() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name)
- return &reserved_name_;
+ return &_impl_.reserved_name_;
}
// -------------------------------------------------------------------
@@ -9890,32 +10025,32 @@ DescriptorProto::mutable_reserved_name() {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int ExtensionRangeOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int ExtensionRangeOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void ExtensionRangeOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
ExtensionRangeOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& ExtensionRangeOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& ExtensionRangeOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -9925,7 +10060,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::add_
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
ExtensionRangeOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -9934,15 +10069,15 @@ ExtensionRangeOptions::uninterpreted_option() const {
// optional string name = 1;
inline bool FieldDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void FieldDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& FieldDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
@@ -9951,8 +10086,8 @@ inline const TProtoStringType& FieldDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FieldDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name)
}
inline TProtoStringType* FieldDescriptorProto::mutable_name() {
@@ -9961,40 +10096,40 @@ inline TProtoStringType* FieldDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& FieldDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void FieldDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FieldDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
@@ -10002,26 +10137,26 @@ inline void FieldDescriptorProto::set_allocated_name(TProtoStringType* name) {
// optional int32 number = 3;
inline bool FieldDescriptorProto::_internal_has_number() const {
- bool value = (_has_bits_[0] & 0x00000040u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_number() const {
return _internal_has_number();
}
inline void FieldDescriptorProto::clear_number() {
- number_ = 0;
- _has_bits_[0] &= ~0x00000040u;
+ _impl_.number_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000040u;
}
inline arc_i32 FieldDescriptorProto::_internal_number() const {
- return number_;
+ return _impl_.number_;
}
inline arc_i32 FieldDescriptorProto::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
return _internal_number();
}
inline void FieldDescriptorProto::_internal_set_number(arc_i32 value) {
- _has_bits_[0] |= 0x00000040u;
- number_ = value;
+ _impl_._has_bits_[0] |= 0x00000040u;
+ _impl_.number_ = value;
}
inline void FieldDescriptorProto::set_number(arc_i32 value) {
_internal_set_number(value);
@@ -10030,18 +10165,18 @@ inline void FieldDescriptorProto::set_number(arc_i32 value) {
// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
inline bool FieldDescriptorProto::_internal_has_label() const {
- bool value = (_has_bits_[0] & 0x00000200u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000200u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_label() const {
return _internal_has_label();
}
inline void FieldDescriptorProto::clear_label() {
- label_ = 1;
- _has_bits_[0] &= ~0x00000200u;
+ _impl_.label_ = 1;
+ _impl_._has_bits_[0] &= ~0x00000200u;
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label FieldDescriptorProto::_internal_label() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(label_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(_impl_.label_);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label FieldDescriptorProto::label() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label)
@@ -10049,8 +10184,8 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label FieldDescriptorProto:
}
inline void FieldDescriptorProto::_internal_set_label(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value) {
assert(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(value));
- _has_bits_[0] |= 0x00000200u;
- label_ = value;
+ _impl_._has_bits_[0] |= 0x00000200u;
+ _impl_.label_ = value;
}
inline void FieldDescriptorProto::set_label(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value) {
_internal_set_label(value);
@@ -10059,18 +10194,18 @@ inline void FieldDescriptorProto::set_label(::PROTOBUF_NAMESPACE_ID::FieldDescri
// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
inline bool FieldDescriptorProto::_internal_has_type() const {
- bool value = (_has_bits_[0] & 0x00000400u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000400u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_type() const {
return _internal_has_type();
}
inline void FieldDescriptorProto::clear_type() {
- type_ = 1;
- _has_bits_[0] &= ~0x00000400u;
+ _impl_.type_ = 1;
+ _impl_._has_bits_[0] &= ~0x00000400u;
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type FieldDescriptorProto::_internal_type() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(type_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(_impl_.type_);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type FieldDescriptorProto::type() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type)
@@ -10078,8 +10213,8 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type FieldDescriptorProto::
}
inline void FieldDescriptorProto::_internal_set_type(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value) {
assert(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(value));
- _has_bits_[0] |= 0x00000400u;
- type_ = value;
+ _impl_._has_bits_[0] |= 0x00000400u;
+ _impl_.type_ = value;
}
inline void FieldDescriptorProto::set_type(::PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value) {
_internal_set_type(value);
@@ -10088,15 +10223,15 @@ inline void FieldDescriptorProto::set_type(::PROTOBUF_NAMESPACE_ID::FieldDescrip
// optional string type_name = 6;
inline bool FieldDescriptorProto::_internal_has_type_name() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_type_name() const {
return _internal_has_type_name();
}
inline void FieldDescriptorProto::clear_type_name() {
- type_name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.type_name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& FieldDescriptorProto::type_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
@@ -10105,8 +10240,8 @@ inline const TProtoStringType& FieldDescriptorProto::type_name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FieldDescriptorProto::set_type_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000004u;
- type_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.type_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name)
}
inline TProtoStringType* FieldDescriptorProto::mutable_type_name() {
@@ -10115,40 +10250,40 @@ inline TProtoStringType* FieldDescriptorProto::mutable_type_name() {
return _s;
}
inline const TProtoStringType& FieldDescriptorProto::_internal_type_name() const {
- return type_name_.Get();
+ return _impl_.type_name_.Get();
}
inline void FieldDescriptorProto::_internal_set_type_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000004u;
- type_name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.type_name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::_internal_mutable_type_name() {
- _has_bits_[0] |= 0x00000004u;
- return type_name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ return _impl_.type_name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::release_type_name() {
// @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.type_name)
if (!_internal_has_type_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000004u;
- auto* p = type_name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000004u;
+ auto* p = _impl_.type_name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (type_name_.IsDefault()) {
- type_name_.Set("", GetArenaForAllocation());
+ if (_impl_.type_name_.IsDefault()) {
+ _impl_.type_name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FieldDescriptorProto::set_allocated_type_name(TProtoStringType* type_name) {
if (type_name != nullptr) {
- _has_bits_[0] |= 0x00000004u;
+ _impl_._has_bits_[0] |= 0x00000004u;
} else {
- _has_bits_[0] &= ~0x00000004u;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
- type_name_.SetAllocated(type_name, GetArenaForAllocation());
+ _impl_.type_name_.SetAllocated(type_name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (type_name_.IsDefault()) {
- type_name_.Set("", GetArenaForAllocation());
+ if (_impl_.type_name_.IsDefault()) {
+ _impl_.type_name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
@@ -10156,15 +10291,15 @@ inline void FieldDescriptorProto::set_allocated_type_name(TProtoStringType* type
// optional string extendee = 2;
inline bool FieldDescriptorProto::_internal_has_extendee() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_extendee() const {
return _internal_has_extendee();
}
inline void FieldDescriptorProto::clear_extendee() {
- extendee_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.extendee_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& FieldDescriptorProto::extendee() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
@@ -10173,8 +10308,8 @@ inline const TProtoStringType& FieldDescriptorProto::extendee() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FieldDescriptorProto::set_extendee(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- extendee_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.extendee_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee)
}
inline TProtoStringType* FieldDescriptorProto::mutable_extendee() {
@@ -10183,40 +10318,40 @@ inline TProtoStringType* FieldDescriptorProto::mutable_extendee() {
return _s;
}
inline const TProtoStringType& FieldDescriptorProto::_internal_extendee() const {
- return extendee_.Get();
+ return _impl_.extendee_.Get();
}
inline void FieldDescriptorProto::_internal_set_extendee(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- extendee_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.extendee_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::_internal_mutable_extendee() {
- _has_bits_[0] |= 0x00000002u;
- return extendee_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.extendee_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::release_extendee() {
// @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.extendee)
if (!_internal_has_extendee()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = extendee_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.extendee_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (extendee_.IsDefault()) {
- extendee_.Set("", GetArenaForAllocation());
+ if (_impl_.extendee_.IsDefault()) {
+ _impl_.extendee_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FieldDescriptorProto::set_allocated_extendee(TProtoStringType* extendee) {
if (extendee != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- extendee_.SetAllocated(extendee, GetArenaForAllocation());
+ _impl_.extendee_.SetAllocated(extendee, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (extendee_.IsDefault()) {
- extendee_.Set("", GetArenaForAllocation());
+ if (_impl_.extendee_.IsDefault()) {
+ _impl_.extendee_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
@@ -10224,15 +10359,15 @@ inline void FieldDescriptorProto::set_allocated_extendee(TProtoStringType* exten
// optional string default_value = 7;
inline bool FieldDescriptorProto::_internal_has_default_value() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_default_value() const {
return _internal_has_default_value();
}
inline void FieldDescriptorProto::clear_default_value() {
- default_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000008u;
+ _impl_.default_value_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline const TProtoStringType& FieldDescriptorProto::default_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
@@ -10241,8 +10376,8 @@ inline const TProtoStringType& FieldDescriptorProto::default_value() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FieldDescriptorProto::set_default_value(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000008u;
- default_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.default_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value)
}
inline TProtoStringType* FieldDescriptorProto::mutable_default_value() {
@@ -10251,40 +10386,40 @@ inline TProtoStringType* FieldDescriptorProto::mutable_default_value() {
return _s;
}
inline const TProtoStringType& FieldDescriptorProto::_internal_default_value() const {
- return default_value_.Get();
+ return _impl_.default_value_.Get();
}
inline void FieldDescriptorProto::_internal_set_default_value(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000008u;
- default_value_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.default_value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::_internal_mutable_default_value() {
- _has_bits_[0] |= 0x00000008u;
- return default_value_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000008u;
+ return _impl_.default_value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::release_default_value() {
// @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.default_value)
if (!_internal_has_default_value()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000008u;
- auto* p = default_value_.Release();
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ auto* p = _impl_.default_value_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (default_value_.IsDefault()) {
- default_value_.Set("", GetArenaForAllocation());
+ if (_impl_.default_value_.IsDefault()) {
+ _impl_.default_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FieldDescriptorProto::set_allocated_default_value(TProtoStringType* default_value) {
if (default_value != nullptr) {
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
- default_value_.SetAllocated(default_value, GetArenaForAllocation());
+ _impl_.default_value_.SetAllocated(default_value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (default_value_.IsDefault()) {
- default_value_.Set("", GetArenaForAllocation());
+ if (_impl_.default_value_.IsDefault()) {
+ _impl_.default_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
@@ -10292,26 +10427,26 @@ inline void FieldDescriptorProto::set_allocated_default_value(TProtoStringType*
// optional int32 oneof_index = 9;
inline bool FieldDescriptorProto::_internal_has_oneof_index() const {
- bool value = (_has_bits_[0] & 0x00000080u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_oneof_index() const {
return _internal_has_oneof_index();
}
inline void FieldDescriptorProto::clear_oneof_index() {
- oneof_index_ = 0;
- _has_bits_[0] &= ~0x00000080u;
+ _impl_.oneof_index_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000080u;
}
inline arc_i32 FieldDescriptorProto::_internal_oneof_index() const {
- return oneof_index_;
+ return _impl_.oneof_index_;
}
inline arc_i32 FieldDescriptorProto::oneof_index() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index)
return _internal_oneof_index();
}
inline void FieldDescriptorProto::_internal_set_oneof_index(arc_i32 value) {
- _has_bits_[0] |= 0x00000080u;
- oneof_index_ = value;
+ _impl_._has_bits_[0] |= 0x00000080u;
+ _impl_.oneof_index_ = value;
}
inline void FieldDescriptorProto::set_oneof_index(arc_i32 value) {
_internal_set_oneof_index(value);
@@ -10320,15 +10455,15 @@ inline void FieldDescriptorProto::set_oneof_index(arc_i32 value) {
// optional string json_name = 10;
inline bool FieldDescriptorProto::_internal_has_json_name() const {
- bool value = (_has_bits_[0] & 0x00000010u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_json_name() const {
return _internal_has_json_name();
}
inline void FieldDescriptorProto::clear_json_name() {
- json_name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000010u;
+ _impl_.json_name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
inline const TProtoStringType& FieldDescriptorProto::json_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name)
@@ -10337,8 +10472,8 @@ inline const TProtoStringType& FieldDescriptorProto::json_name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FieldDescriptorProto::set_json_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000010u;
- json_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.json_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name)
}
inline TProtoStringType* FieldDescriptorProto::mutable_json_name() {
@@ -10347,40 +10482,40 @@ inline TProtoStringType* FieldDescriptorProto::mutable_json_name() {
return _s;
}
inline const TProtoStringType& FieldDescriptorProto::_internal_json_name() const {
- return json_name_.Get();
+ return _impl_.json_name_.Get();
}
inline void FieldDescriptorProto::_internal_set_json_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000010u;
- json_name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.json_name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::_internal_mutable_json_name() {
- _has_bits_[0] |= 0x00000010u;
- return json_name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000010u;
+ return _impl_.json_name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FieldDescriptorProto::release_json_name() {
// @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.json_name)
if (!_internal_has_json_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000010u;
- auto* p = json_name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000010u;
+ auto* p = _impl_.json_name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (json_name_.IsDefault()) {
- json_name_.Set("", GetArenaForAllocation());
+ if (_impl_.json_name_.IsDefault()) {
+ _impl_.json_name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FieldDescriptorProto::set_allocated_json_name(TProtoStringType* json_name) {
if (json_name != nullptr) {
- _has_bits_[0] |= 0x00000010u;
+ _impl_._has_bits_[0] |= 0x00000010u;
} else {
- _has_bits_[0] &= ~0x00000010u;
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
- json_name_.SetAllocated(json_name, GetArenaForAllocation());
+ _impl_.json_name_.SetAllocated(json_name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (json_name_.IsDefault()) {
- json_name_.Set("", GetArenaForAllocation());
+ if (_impl_.json_name_.IsDefault()) {
+ _impl_.json_name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name)
@@ -10388,19 +10523,19 @@ inline void FieldDescriptorProto::set_allocated_json_name(TProtoStringType* json
// optional .google.protobuf.FieldOptions options = 8;
inline bool FieldDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000020u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool FieldDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void FieldDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000020u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
inline const ::PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::FieldOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::FieldOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::FieldOptions&>(
::PROTOBUF_NAMESPACE_ID::_FieldOptions_default_instance_);
}
@@ -10411,20 +10546,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::option
inline void FieldDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::FieldOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000020u;
+ _impl_._has_bits_[0] |= 0x00000020u;
} else {
- _has_bits_[0] &= ~0x00000020u;
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000020u;
- ::PROTOBUF_NAMESPACE_ID::FieldOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000020u;
+ ::PROTOBUF_NAMESPACE_ID::FieldOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -10438,18 +10573,18 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::release_opti
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.options)
- _has_bits_[0] &= ~0x00000020u;
- ::PROTOBUF_NAMESPACE_ID::FieldOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000020u;
+ ::PROTOBUF_NAMESPACE_ID::FieldOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000020u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000020u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::FieldOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::FieldOptions* _msg = _internal_mutable_options();
@@ -10459,7 +10594,7 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::mutable_opti
inline void FieldDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::FieldOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -10468,36 +10603,36 @@ inline void FieldDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID:
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000020u;
+ _impl_._has_bits_[0] |= 0x00000020u;
} else {
- _has_bits_[0] &= ~0x00000020u;
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options)
}
// optional bool proto3_optional = 17;
inline bool FieldDescriptorProto::_internal_has_proto3_optional() const {
- bool value = (_has_bits_[0] & 0x00000100u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000100u) != 0;
return value;
}
inline bool FieldDescriptorProto::has_proto3_optional() const {
return _internal_has_proto3_optional();
}
inline void FieldDescriptorProto::clear_proto3_optional() {
- proto3_optional_ = false;
- _has_bits_[0] &= ~0x00000100u;
+ _impl_.proto3_optional_ = false;
+ _impl_._has_bits_[0] &= ~0x00000100u;
}
inline bool FieldDescriptorProto::_internal_proto3_optional() const {
- return proto3_optional_;
+ return _impl_.proto3_optional_;
}
inline bool FieldDescriptorProto::proto3_optional() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.proto3_optional)
return _internal_proto3_optional();
}
inline void FieldDescriptorProto::_internal_set_proto3_optional(bool value) {
- _has_bits_[0] |= 0x00000100u;
- proto3_optional_ = value;
+ _impl_._has_bits_[0] |= 0x00000100u;
+ _impl_.proto3_optional_ = value;
}
inline void FieldDescriptorProto::set_proto3_optional(bool value) {
_internal_set_proto3_optional(value);
@@ -10510,15 +10645,15 @@ inline void FieldDescriptorProto::set_proto3_optional(bool value) {
// optional string name = 1;
inline bool OneofDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool OneofDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void OneofDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& OneofDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
@@ -10527,8 +10662,8 @@ inline const TProtoStringType& OneofDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void OneofDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name)
}
inline TProtoStringType* OneofDescriptorProto::mutable_name() {
@@ -10537,40 +10672,40 @@ inline TProtoStringType* OneofDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& OneofDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void OneofDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* OneofDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* OneofDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void OneofDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
@@ -10578,19 +10713,19 @@ inline void OneofDescriptorProto::set_allocated_name(TProtoStringType* name) {
// optional .google.protobuf.OneofOptions options = 2;
inline bool OneofDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool OneofDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void OneofDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::OneofOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::OneofOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::OneofOptions&>(
::PROTOBUF_NAMESPACE_ID::_OneofOptions_default_instance_);
}
@@ -10601,20 +10736,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::option
inline void OneofDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::OneofOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.OneofDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::OneofOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::OneofOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -10628,18 +10763,18 @@ inline ::PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::release_opti
}
inline ::PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.options)
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::OneofOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::OneofOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000002u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000002u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::OneofOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::OneofOptions* _msg = _internal_mutable_options();
@@ -10649,7 +10784,7 @@ inline ::PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::mutable_opti
inline void OneofDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::OneofOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -10658,11 +10793,11 @@ inline void OneofDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID:
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.options)
}
@@ -10672,26 +10807,26 @@ inline void OneofDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID:
// optional int32 start = 1;
inline bool EnumDescriptorProto_EnumReservedRange::_internal_has_start() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool EnumDescriptorProto_EnumReservedRange::has_start() const {
return _internal_has_start();
}
inline void EnumDescriptorProto_EnumReservedRange::clear_start() {
- start_ = 0;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.start_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline arc_i32 EnumDescriptorProto_EnumReservedRange::_internal_start() const {
- return start_;
+ return _impl_.start_;
}
inline arc_i32 EnumDescriptorProto_EnumReservedRange::start() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.start)
return _internal_start();
}
inline void EnumDescriptorProto_EnumReservedRange::_internal_set_start(arc_i32 value) {
- _has_bits_[0] |= 0x00000001u;
- start_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.start_ = value;
}
inline void EnumDescriptorProto_EnumReservedRange::set_start(arc_i32 value) {
_internal_set_start(value);
@@ -10700,26 +10835,26 @@ inline void EnumDescriptorProto_EnumReservedRange::set_start(arc_i32 value) {
// optional int32 end = 2;
inline bool EnumDescriptorProto_EnumReservedRange::_internal_has_end() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool EnumDescriptorProto_EnumReservedRange::has_end() const {
return _internal_has_end();
}
inline void EnumDescriptorProto_EnumReservedRange::clear_end() {
- end_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.end_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline arc_i32 EnumDescriptorProto_EnumReservedRange::_internal_end() const {
- return end_;
+ return _impl_.end_;
}
inline arc_i32 EnumDescriptorProto_EnumReservedRange::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.end)
return _internal_end();
}
inline void EnumDescriptorProto_EnumReservedRange::_internal_set_end(arc_i32 value) {
- _has_bits_[0] |= 0x00000002u;
- end_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.end_ = value;
}
inline void EnumDescriptorProto_EnumReservedRange::set_end(arc_i32 value) {
_internal_set_end(value);
@@ -10732,15 +10867,15 @@ inline void EnumDescriptorProto_EnumReservedRange::set_end(arc_i32 value) {
// optional string name = 1;
inline bool EnumDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool EnumDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void EnumDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& EnumDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
@@ -10749,8 +10884,8 @@ inline const TProtoStringType& EnumDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void EnumDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name)
}
inline TProtoStringType* EnumDescriptorProto::mutable_name() {
@@ -10759,40 +10894,40 @@ inline TProtoStringType* EnumDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& EnumDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void EnumDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* EnumDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* EnumDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void EnumDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
@@ -10800,32 +10935,32 @@ inline void EnumDescriptorProto::set_allocated_name(TProtoStringType* name) {
// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
inline int EnumDescriptorProto::_internal_value_size() const {
- return value_.size();
+ return _impl_.value_.size();
}
inline int EnumDescriptorProto::value_size() const {
return _internal_value_size();
}
inline void EnumDescriptorProto::clear_value() {
- value_.Clear();
+ _impl_.value_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value)
- return value_.Mutable(index);
+ return _impl_.value_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >*
EnumDescriptorProto::mutable_value() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value)
- return &value_;
+ return &_impl_.value_;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& EnumDescriptorProto::_internal_value(int index) const {
- return value_.Get(index);
+ return _impl_.value_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value)
return _internal_value(index);
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::_internal_add_value() {
- return value_.Add();
+ return _impl_.value_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::add_value() {
::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* _add = _internal_add_value();
@@ -10835,24 +10970,24 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::a
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >&
EnumDescriptorProto::value() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
- return value_;
+ return _impl_.value_;
}
// optional .google.protobuf.EnumOptions options = 3;
inline bool EnumDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool EnumDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void EnumDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::EnumOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::EnumOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::EnumOptions&>(
::PROTOBUF_NAMESPACE_ID::_EnumOptions_default_instance_);
}
@@ -10863,20 +10998,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::options(
inline void EnumDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::EnumOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::EnumOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::EnumOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -10890,18 +11025,18 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::release_option
}
inline ::PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.options)
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::EnumOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::EnumOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000002u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000002u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::EnumOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::EnumOptions* _msg = _internal_mutable_options();
@@ -10911,7 +11046,7 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::mutable_option
inline void EnumDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::EnumOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -10920,42 +11055,42 @@ inline void EnumDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options)
}
// repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
inline int EnumDescriptorProto::_internal_reserved_range_size() const {
- return reserved_range_.size();
+ return _impl_.reserved_range_.size();
}
inline int EnumDescriptorProto::reserved_range_size() const {
return _internal_reserved_range_size();
}
inline void EnumDescriptorProto::clear_reserved_range() {
- reserved_range_.Clear();
+ _impl_.reserved_range_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::mutable_reserved_range(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.reserved_range)
- return reserved_range_.Mutable(index);
+ return _impl_.reserved_range_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >*
EnumDescriptorProto::mutable_reserved_range() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.reserved_range)
- return &reserved_range_;
+ return &_impl_.reserved_range_;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& EnumDescriptorProto::_internal_reserved_range(int index) const {
- return reserved_range_.Get(index);
+ return _impl_.reserved_range_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& EnumDescriptorProto::reserved_range(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_range)
return _internal_reserved_range(index);
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::_internal_add_reserved_range() {
- return reserved_range_.Add();
+ return _impl_.reserved_range_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::add_reserved_range() {
::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* _add = _internal_add_reserved_range();
@@ -10965,18 +11100,18 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescr
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >&
EnumDescriptorProto::reserved_range() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.reserved_range)
- return reserved_range_;
+ return _impl_.reserved_range_;
}
// repeated string reserved_name = 5;
inline int EnumDescriptorProto::_internal_reserved_name_size() const {
- return reserved_name_.size();
+ return _impl_.reserved_name_.size();
}
inline int EnumDescriptorProto::reserved_name_size() const {
return _internal_reserved_name_size();
}
inline void EnumDescriptorProto::clear_reserved_name() {
- reserved_name_.Clear();
+ _impl_.reserved_name_.Clear();
}
inline TProtoStringType* EnumDescriptorProto::add_reserved_name() {
TProtoStringType* _s = _internal_add_reserved_name();
@@ -10984,7 +11119,7 @@ inline TProtoStringType* EnumDescriptorProto::add_reserved_name() {
return _s;
}
inline const TProtoStringType& EnumDescriptorProto::_internal_reserved_name(int index) const {
- return reserved_name_.Get(index);
+ return _impl_.reserved_name_.Get(index);
}
inline const TProtoStringType& EnumDescriptorProto::reserved_name(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_name)
@@ -10992,55 +11127,55 @@ inline const TProtoStringType& EnumDescriptorProto::reserved_name(int index) con
}
inline TProtoStringType* EnumDescriptorProto::mutable_reserved_name(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.reserved_name)
- return reserved_name_.Mutable(index);
+ return _impl_.reserved_name_.Mutable(index);
}
inline void EnumDescriptorProto::set_reserved_name(int index, const TProtoStringType& value) {
- reserved_name_.Mutable(index)->assign(value);
+ _impl_.reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::set_reserved_name(int index, TProtoStringType&& value) {
- reserved_name_.Mutable(index)->assign(std::move(value));
+ _impl_.reserved_name_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::set_reserved_name(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- reserved_name_.Mutable(index)->assign(value);
+ _impl_.reserved_name_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::set_reserved_name(int index, const char* value, size_t size) {
- reserved_name_.Mutable(index)->assign(
+ _impl_.reserved_name_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline TProtoStringType* EnumDescriptorProto::_internal_add_reserved_name() {
- return reserved_name_.Add();
+ return _impl_.reserved_name_.Add();
}
inline void EnumDescriptorProto::add_reserved_name(const TProtoStringType& value) {
- reserved_name_.Add()->assign(value);
+ _impl_.reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::add_reserved_name(TProtoStringType&& value) {
- reserved_name_.Add(std::move(value));
+ _impl_.reserved_name_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::add_reserved_name(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- reserved_name_.Add()->assign(value);
+ _impl_.reserved_name_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline void EnumDescriptorProto::add_reserved_name(const char* value, size_t size) {
- reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.EnumDescriptorProto.reserved_name)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
EnumDescriptorProto::reserved_name() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.reserved_name)
- return reserved_name_;
+ return _impl_.reserved_name_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
EnumDescriptorProto::mutable_reserved_name() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.reserved_name)
- return &reserved_name_;
+ return &_impl_.reserved_name_;
}
// -------------------------------------------------------------------
@@ -11049,15 +11184,15 @@ EnumDescriptorProto::mutable_reserved_name() {
// optional string name = 1;
inline bool EnumValueDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool EnumValueDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void EnumValueDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& EnumValueDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
@@ -11066,8 +11201,8 @@ inline const TProtoStringType& EnumValueDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void EnumValueDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name)
}
inline TProtoStringType* EnumValueDescriptorProto::mutable_name() {
@@ -11076,40 +11211,40 @@ inline TProtoStringType* EnumValueDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& EnumValueDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void EnumValueDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* EnumValueDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* EnumValueDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void EnumValueDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
@@ -11117,26 +11252,26 @@ inline void EnumValueDescriptorProto::set_allocated_name(TProtoStringType* name)
// optional int32 number = 2;
inline bool EnumValueDescriptorProto::_internal_has_number() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool EnumValueDescriptorProto::has_number() const {
return _internal_has_number();
}
inline void EnumValueDescriptorProto::clear_number() {
- number_ = 0;
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.number_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline arc_i32 EnumValueDescriptorProto::_internal_number() const {
- return number_;
+ return _impl_.number_;
}
inline arc_i32 EnumValueDescriptorProto::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
return _internal_number();
}
inline void EnumValueDescriptorProto::_internal_set_number(arc_i32 value) {
- _has_bits_[0] |= 0x00000004u;
- number_ = value;
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.number_ = value;
}
inline void EnumValueDescriptorProto::set_number(arc_i32 value) {
_internal_set_number(value);
@@ -11145,19 +11280,19 @@ inline void EnumValueDescriptorProto::set_number(arc_i32 value) {
// optional .google.protobuf.EnumValueOptions options = 3;
inline bool EnumValueDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool EnumValueDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void EnumValueDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions&>(
::PROTOBUF_NAMESPACE_ID::_EnumValueOptions_default_instance_);
}
@@ -11168,20 +11303,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto
inline void EnumValueDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValueDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -11195,18 +11330,18 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::rele
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.options)
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000002u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000002u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::EnumValueOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::EnumValueOptions* _msg = _internal_mutable_options();
@@ -11216,7 +11351,7 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::muta
inline void EnumValueDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -11225,11 +11360,11 @@ inline void EnumValueDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options)
}
@@ -11239,15 +11374,15 @@ inline void EnumValueDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE
// optional string name = 1;
inline bool ServiceDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool ServiceDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void ServiceDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& ServiceDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name)
@@ -11256,8 +11391,8 @@ inline const TProtoStringType& ServiceDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void ServiceDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name)
}
inline TProtoStringType* ServiceDescriptorProto::mutable_name() {
@@ -11266,40 +11401,40 @@ inline TProtoStringType* ServiceDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& ServiceDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void ServiceDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* ServiceDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* ServiceDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void ServiceDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
@@ -11307,32 +11442,32 @@ inline void ServiceDescriptorProto::set_allocated_name(TProtoStringType* name) {
// repeated .google.protobuf.MethodDescriptorProto method = 2;
inline int ServiceDescriptorProto::_internal_method_size() const {
- return method_.size();
+ return _impl_.method_.size();
}
inline int ServiceDescriptorProto::method_size() const {
return _internal_method_size();
}
inline void ServiceDescriptorProto::clear_method() {
- method_.Clear();
+ _impl_.method_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method)
- return method_.Mutable(index);
+ return _impl_.method_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >*
ServiceDescriptorProto::mutable_method() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method)
- return &method_;
+ return &_impl_.method_;
}
inline const ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& ServiceDescriptorProto::_internal_method(int index) const {
- return method_.Get(index);
+ return _impl_.method_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method)
return _internal_method(index);
}
inline ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::_internal_add_method() {
- return method_.Add();
+ return _impl_.method_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::add_method() {
::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* _add = _internal_add_method();
@@ -11342,24 +11477,24 @@ inline ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::a
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >&
ServiceDescriptorProto::method() const {
// @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
- return method_;
+ return _impl_.method_;
}
// optional .google.protobuf.ServiceOptions options = 3;
inline bool ServiceDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool ServiceDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void ServiceDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::ServiceOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::ServiceOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::ServiceOptions&>(
::PROTOBUF_NAMESPACE_ID::_ServiceOptions_default_instance_);
}
@@ -11370,20 +11505,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::op
inline void ServiceDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::ServiceOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.ServiceDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -11397,18 +11532,18 @@ inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::release_
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.options)
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000002u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000002u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::ServiceOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::ServiceOptions* _msg = _internal_mutable_options();
@@ -11418,7 +11553,7 @@ inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::mutable_
inline void ServiceDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::ServiceOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -11427,11 +11562,11 @@ inline void ServiceDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_I
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options)
}
@@ -11441,15 +11576,15 @@ inline void ServiceDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_I
// optional string name = 1;
inline bool MethodDescriptorProto::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool MethodDescriptorProto::has_name() const {
return _internal_has_name();
}
inline void MethodDescriptorProto::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& MethodDescriptorProto::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name)
@@ -11458,8 +11593,8 @@ inline const TProtoStringType& MethodDescriptorProto::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void MethodDescriptorProto::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name)
}
inline TProtoStringType* MethodDescriptorProto::mutable_name() {
@@ -11468,40 +11603,40 @@ inline TProtoStringType* MethodDescriptorProto::mutable_name() {
return _s;
}
inline const TProtoStringType& MethodDescriptorProto::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void MethodDescriptorProto::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* MethodDescriptorProto::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* MethodDescriptorProto::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void MethodDescriptorProto::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
@@ -11509,15 +11644,15 @@ inline void MethodDescriptorProto::set_allocated_name(TProtoStringType* name) {
// optional string input_type = 2;
inline bool MethodDescriptorProto::_internal_has_input_type() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool MethodDescriptorProto::has_input_type() const {
return _internal_has_input_type();
}
inline void MethodDescriptorProto::clear_input_type() {
- input_type_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.input_type_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& MethodDescriptorProto::input_type() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type)
@@ -11526,8 +11661,8 @@ inline const TProtoStringType& MethodDescriptorProto::input_type() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void MethodDescriptorProto::set_input_type(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- input_type_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.input_type_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type)
}
inline TProtoStringType* MethodDescriptorProto::mutable_input_type() {
@@ -11536,40 +11671,40 @@ inline TProtoStringType* MethodDescriptorProto::mutable_input_type() {
return _s;
}
inline const TProtoStringType& MethodDescriptorProto::_internal_input_type() const {
- return input_type_.Get();
+ return _impl_.input_type_.Get();
}
inline void MethodDescriptorProto::_internal_set_input_type(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- input_type_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.input_type_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* MethodDescriptorProto::_internal_mutable_input_type() {
- _has_bits_[0] |= 0x00000002u;
- return input_type_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.input_type_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* MethodDescriptorProto::release_input_type() {
// @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.input_type)
if (!_internal_has_input_type()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = input_type_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.input_type_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (input_type_.IsDefault()) {
- input_type_.Set("", GetArenaForAllocation());
+ if (_impl_.input_type_.IsDefault()) {
+ _impl_.input_type_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void MethodDescriptorProto::set_allocated_input_type(TProtoStringType* input_type) {
if (input_type != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- input_type_.SetAllocated(input_type, GetArenaForAllocation());
+ _impl_.input_type_.SetAllocated(input_type, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (input_type_.IsDefault()) {
- input_type_.Set("", GetArenaForAllocation());
+ if (_impl_.input_type_.IsDefault()) {
+ _impl_.input_type_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
@@ -11577,15 +11712,15 @@ inline void MethodDescriptorProto::set_allocated_input_type(TProtoStringType* in
// optional string output_type = 3;
inline bool MethodDescriptorProto::_internal_has_output_type() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool MethodDescriptorProto::has_output_type() const {
return _internal_has_output_type();
}
inline void MethodDescriptorProto::clear_output_type() {
- output_type_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.output_type_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& MethodDescriptorProto::output_type() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type)
@@ -11594,8 +11729,8 @@ inline const TProtoStringType& MethodDescriptorProto::output_type() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void MethodDescriptorProto::set_output_type(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000004u;
- output_type_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.output_type_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type)
}
inline TProtoStringType* MethodDescriptorProto::mutable_output_type() {
@@ -11604,40 +11739,40 @@ inline TProtoStringType* MethodDescriptorProto::mutable_output_type() {
return _s;
}
inline const TProtoStringType& MethodDescriptorProto::_internal_output_type() const {
- return output_type_.Get();
+ return _impl_.output_type_.Get();
}
inline void MethodDescriptorProto::_internal_set_output_type(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000004u;
- output_type_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.output_type_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* MethodDescriptorProto::_internal_mutable_output_type() {
- _has_bits_[0] |= 0x00000004u;
- return output_type_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ return _impl_.output_type_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* MethodDescriptorProto::release_output_type() {
// @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.output_type)
if (!_internal_has_output_type()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000004u;
- auto* p = output_type_.Release();
+ _impl_._has_bits_[0] &= ~0x00000004u;
+ auto* p = _impl_.output_type_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (output_type_.IsDefault()) {
- output_type_.Set("", GetArenaForAllocation());
+ if (_impl_.output_type_.IsDefault()) {
+ _impl_.output_type_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void MethodDescriptorProto::set_allocated_output_type(TProtoStringType* output_type) {
if (output_type != nullptr) {
- _has_bits_[0] |= 0x00000004u;
+ _impl_._has_bits_[0] |= 0x00000004u;
} else {
- _has_bits_[0] &= ~0x00000004u;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
- output_type_.SetAllocated(output_type, GetArenaForAllocation());
+ _impl_.output_type_.SetAllocated(output_type, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (output_type_.IsDefault()) {
- output_type_.Set("", GetArenaForAllocation());
+ if (_impl_.output_type_.IsDefault()) {
+ _impl_.output_type_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
@@ -11645,19 +11780,19 @@ inline void MethodDescriptorProto::set_allocated_output_type(TProtoStringType* o
// optional .google.protobuf.MethodOptions options = 4;
inline bool MethodDescriptorProto::_internal_has_options() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
- PROTOBUF_ASSUME(!value || options_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
return value;
}
inline bool MethodDescriptorProto::has_options() const {
return _internal_has_options();
}
inline void MethodDescriptorProto::clear_options() {
- if (options_ != nullptr) options_->Clear();
- _has_bits_[0] &= ~0x00000008u;
+ if (_impl_.options_ != nullptr) _impl_.options_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline const ::PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::_internal_options() const {
- const ::PROTOBUF_NAMESPACE_ID::MethodOptions* p = options_;
+ const ::PROTOBUF_NAMESPACE_ID::MethodOptions* p = _impl_.options_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::MethodOptions&>(
::PROTOBUF_NAMESPACE_ID::_MethodOptions_default_instance_);
}
@@ -11668,20 +11803,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::opti
inline void MethodDescriptorProto::unsafe_arena_set_allocated_options(
::PROTOBUF_NAMESPACE_ID::MethodOptions* options) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_);
}
- options_ = options;
+ _impl_.options_ = options;
if (options) {
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.options)
}
inline ::PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::release_options() {
- _has_bits_[0] &= ~0x00000008u;
- ::PROTOBUF_NAMESPACE_ID::MethodOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ ::PROTOBUF_NAMESPACE_ID::MethodOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -11695,18 +11830,18 @@ inline ::PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::release_op
}
inline ::PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::unsafe_arena_release_options() {
// @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.options)
- _has_bits_[0] &= ~0x00000008u;
- ::PROTOBUF_NAMESPACE_ID::MethodOptions* temp = options_;
- options_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ ::PROTOBUF_NAMESPACE_ID::MethodOptions* temp = _impl_.options_;
+ _impl_.options_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::_internal_mutable_options() {
- _has_bits_[0] |= 0x00000008u;
- if (options_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000008u;
+ if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::MethodOptions>(GetArenaForAllocation());
- options_ = p;
+ _impl_.options_ = p;
}
- return options_;
+ return _impl_.options_;
}
inline ::PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::mutable_options() {
::PROTOBUF_NAMESPACE_ID::MethodOptions* _msg = _internal_mutable_options();
@@ -11716,7 +11851,7 @@ inline ::PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::mutable_op
inline void MethodDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID::MethodOptions* options) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete options_;
+ delete _impl_.options_;
}
if (options) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -11725,36 +11860,36 @@ inline void MethodDescriptorProto::set_allocated_options(::PROTOBUF_NAMESPACE_ID
options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, options, submessage_arena);
}
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
- options_ = options;
+ _impl_.options_ = options;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options)
}
// optional bool client_streaming = 5 [default = false];
inline bool MethodDescriptorProto::_internal_has_client_streaming() const {
- bool value = (_has_bits_[0] & 0x00000010u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
return value;
}
inline bool MethodDescriptorProto::has_client_streaming() const {
return _internal_has_client_streaming();
}
inline void MethodDescriptorProto::clear_client_streaming() {
- client_streaming_ = false;
- _has_bits_[0] &= ~0x00000010u;
+ _impl_.client_streaming_ = false;
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
inline bool MethodDescriptorProto::_internal_client_streaming() const {
- return client_streaming_;
+ return _impl_.client_streaming_;
}
inline bool MethodDescriptorProto::client_streaming() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming)
return _internal_client_streaming();
}
inline void MethodDescriptorProto::_internal_set_client_streaming(bool value) {
- _has_bits_[0] |= 0x00000010u;
- client_streaming_ = value;
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.client_streaming_ = value;
}
inline void MethodDescriptorProto::set_client_streaming(bool value) {
_internal_set_client_streaming(value);
@@ -11763,26 +11898,26 @@ inline void MethodDescriptorProto::set_client_streaming(bool value) {
// optional bool server_streaming = 6 [default = false];
inline bool MethodDescriptorProto::_internal_has_server_streaming() const {
- bool value = (_has_bits_[0] & 0x00000020u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
return value;
}
inline bool MethodDescriptorProto::has_server_streaming() const {
return _internal_has_server_streaming();
}
inline void MethodDescriptorProto::clear_server_streaming() {
- server_streaming_ = false;
- _has_bits_[0] &= ~0x00000020u;
+ _impl_.server_streaming_ = false;
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
inline bool MethodDescriptorProto::_internal_server_streaming() const {
- return server_streaming_;
+ return _impl_.server_streaming_;
}
inline bool MethodDescriptorProto::server_streaming() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming)
return _internal_server_streaming();
}
inline void MethodDescriptorProto::_internal_set_server_streaming(bool value) {
- _has_bits_[0] |= 0x00000020u;
- server_streaming_ = value;
+ _impl_._has_bits_[0] |= 0x00000020u;
+ _impl_.server_streaming_ = value;
}
inline void MethodDescriptorProto::set_server_streaming(bool value) {
_internal_set_server_streaming(value);
@@ -11795,15 +11930,15 @@ inline void MethodDescriptorProto::set_server_streaming(bool value) {
// optional string java_package = 1;
inline bool FileOptions::_internal_has_java_package() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool FileOptions::has_java_package() const {
return _internal_has_java_package();
}
inline void FileOptions::clear_java_package() {
- java_package_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.java_package_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& FileOptions::java_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package)
@@ -11812,8 +11947,8 @@ inline const TProtoStringType& FileOptions::java_package() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_java_package(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- java_package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.java_package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package)
}
inline TProtoStringType* FileOptions::mutable_java_package() {
@@ -11822,40 +11957,40 @@ inline TProtoStringType* FileOptions::mutable_java_package() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_java_package() const {
- return java_package_.Get();
+ return _impl_.java_package_.Get();
}
inline void FileOptions::_internal_set_java_package(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- java_package_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.java_package_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_java_package() {
- _has_bits_[0] |= 0x00000001u;
- return java_package_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.java_package_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_java_package() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_package)
if (!_internal_has_java_package()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = java_package_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.java_package_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (java_package_.IsDefault()) {
- java_package_.Set("", GetArenaForAllocation());
+ if (_impl_.java_package_.IsDefault()) {
+ _impl_.java_package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_java_package(TProtoStringType* java_package) {
if (java_package != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- java_package_.SetAllocated(java_package, GetArenaForAllocation());
+ _impl_.java_package_.SetAllocated(java_package, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (java_package_.IsDefault()) {
- java_package_.Set("", GetArenaForAllocation());
+ if (_impl_.java_package_.IsDefault()) {
+ _impl_.java_package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
@@ -11863,15 +11998,15 @@ inline void FileOptions::set_allocated_java_package(TProtoStringType* java_packa
// optional string java_outer_classname = 8;
inline bool FileOptions::_internal_has_java_outer_classname() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool FileOptions::has_java_outer_classname() const {
return _internal_has_java_outer_classname();
}
inline void FileOptions::clear_java_outer_classname() {
- java_outer_classname_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.java_outer_classname_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& FileOptions::java_outer_classname() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname)
@@ -11880,8 +12015,8 @@ inline const TProtoStringType& FileOptions::java_outer_classname() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_java_outer_classname(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- java_outer_classname_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.java_outer_classname_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname)
}
inline TProtoStringType* FileOptions::mutable_java_outer_classname() {
@@ -11890,40 +12025,40 @@ inline TProtoStringType* FileOptions::mutable_java_outer_classname() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_java_outer_classname() const {
- return java_outer_classname_.Get();
+ return _impl_.java_outer_classname_.Get();
}
inline void FileOptions::_internal_set_java_outer_classname(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- java_outer_classname_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.java_outer_classname_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_java_outer_classname() {
- _has_bits_[0] |= 0x00000002u;
- return java_outer_classname_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.java_outer_classname_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_java_outer_classname() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_outer_classname)
if (!_internal_has_java_outer_classname()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = java_outer_classname_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.java_outer_classname_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (java_outer_classname_.IsDefault()) {
- java_outer_classname_.Set("", GetArenaForAllocation());
+ if (_impl_.java_outer_classname_.IsDefault()) {
+ _impl_.java_outer_classname_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_java_outer_classname(TProtoStringType* java_outer_classname) {
if (java_outer_classname != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- java_outer_classname_.SetAllocated(java_outer_classname, GetArenaForAllocation());
+ _impl_.java_outer_classname_.SetAllocated(java_outer_classname, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (java_outer_classname_.IsDefault()) {
- java_outer_classname_.Set("", GetArenaForAllocation());
+ if (_impl_.java_outer_classname_.IsDefault()) {
+ _impl_.java_outer_classname_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
@@ -11931,26 +12066,26 @@ inline void FileOptions::set_allocated_java_outer_classname(TProtoStringType* ja
// optional bool java_multiple_files = 10 [default = false];
inline bool FileOptions::_internal_has_java_multiple_files() const {
- bool value = (_has_bits_[0] & 0x00000400u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000400u) != 0;
return value;
}
inline bool FileOptions::has_java_multiple_files() const {
return _internal_has_java_multiple_files();
}
inline void FileOptions::clear_java_multiple_files() {
- java_multiple_files_ = false;
- _has_bits_[0] &= ~0x00000400u;
+ _impl_.java_multiple_files_ = false;
+ _impl_._has_bits_[0] &= ~0x00000400u;
}
inline bool FileOptions::_internal_java_multiple_files() const {
- return java_multiple_files_;
+ return _impl_.java_multiple_files_;
}
inline bool FileOptions::java_multiple_files() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files)
return _internal_java_multiple_files();
}
inline void FileOptions::_internal_set_java_multiple_files(bool value) {
- _has_bits_[0] |= 0x00000400u;
- java_multiple_files_ = value;
+ _impl_._has_bits_[0] |= 0x00000400u;
+ _impl_.java_multiple_files_ = value;
}
inline void FileOptions::set_java_multiple_files(bool value) {
_internal_set_java_multiple_files(value);
@@ -11959,26 +12094,26 @@ inline void FileOptions::set_java_multiple_files(bool value) {
// optional bool java_generate_equals_and_hash = 20 [deprecated = true];
inline bool FileOptions::_internal_has_java_generate_equals_and_hash() const {
- bool value = (_has_bits_[0] & 0x00000800u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000800u) != 0;
return value;
}
inline bool FileOptions::has_java_generate_equals_and_hash() const {
return _internal_has_java_generate_equals_and_hash();
}
inline void FileOptions::clear_java_generate_equals_and_hash() {
- java_generate_equals_and_hash_ = false;
- _has_bits_[0] &= ~0x00000800u;
+ _impl_.java_generate_equals_and_hash_ = false;
+ _impl_._has_bits_[0] &= ~0x00000800u;
}
inline bool FileOptions::_internal_java_generate_equals_and_hash() const {
- return java_generate_equals_and_hash_;
+ return _impl_.java_generate_equals_and_hash_;
}
inline bool FileOptions::java_generate_equals_and_hash() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash)
return _internal_java_generate_equals_and_hash();
}
inline void FileOptions::_internal_set_java_generate_equals_and_hash(bool value) {
- _has_bits_[0] |= 0x00000800u;
- java_generate_equals_and_hash_ = value;
+ _impl_._has_bits_[0] |= 0x00000800u;
+ _impl_.java_generate_equals_and_hash_ = value;
}
inline void FileOptions::set_java_generate_equals_and_hash(bool value) {
_internal_set_java_generate_equals_and_hash(value);
@@ -11987,26 +12122,26 @@ inline void FileOptions::set_java_generate_equals_and_hash(bool value) {
// optional bool java_string_check_utf8 = 27 [default = false];
inline bool FileOptions::_internal_has_java_string_check_utf8() const {
- bool value = (_has_bits_[0] & 0x00001000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00001000u) != 0;
return value;
}
inline bool FileOptions::has_java_string_check_utf8() const {
return _internal_has_java_string_check_utf8();
}
inline void FileOptions::clear_java_string_check_utf8() {
- java_string_check_utf8_ = false;
- _has_bits_[0] &= ~0x00001000u;
+ _impl_.java_string_check_utf8_ = false;
+ _impl_._has_bits_[0] &= ~0x00001000u;
}
inline bool FileOptions::_internal_java_string_check_utf8() const {
- return java_string_check_utf8_;
+ return _impl_.java_string_check_utf8_;
}
inline bool FileOptions::java_string_check_utf8() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8)
return _internal_java_string_check_utf8();
}
inline void FileOptions::_internal_set_java_string_check_utf8(bool value) {
- _has_bits_[0] |= 0x00001000u;
- java_string_check_utf8_ = value;
+ _impl_._has_bits_[0] |= 0x00001000u;
+ _impl_.java_string_check_utf8_ = value;
}
inline void FileOptions::set_java_string_check_utf8(bool value) {
_internal_set_java_string_check_utf8(value);
@@ -12015,18 +12150,18 @@ inline void FileOptions::set_java_string_check_utf8(bool value) {
// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
inline bool FileOptions::_internal_has_optimize_for() const {
- bool value = (_has_bits_[0] & 0x00040000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00040000u) != 0;
return value;
}
inline bool FileOptions::has_optimize_for() const {
return _internal_has_optimize_for();
}
inline void FileOptions::clear_optimize_for() {
- optimize_for_ = 1;
- _has_bits_[0] &= ~0x00040000u;
+ _impl_.optimize_for_ = 1;
+ _impl_._has_bits_[0] &= ~0x00040000u;
}
inline ::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode FileOptions::_internal_optimize_for() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode >(optimize_for_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode >(_impl_.optimize_for_);
}
inline ::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode FileOptions::optimize_for() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for)
@@ -12034,8 +12169,8 @@ inline ::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode FileOptions::optimize_f
}
inline void FileOptions::_internal_set_optimize_for(::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value) {
assert(::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(value));
- _has_bits_[0] |= 0x00040000u;
- optimize_for_ = value;
+ _impl_._has_bits_[0] |= 0x00040000u;
+ _impl_.optimize_for_ = value;
}
inline void FileOptions::set_optimize_for(::PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value) {
_internal_set_optimize_for(value);
@@ -12044,15 +12179,15 @@ inline void FileOptions::set_optimize_for(::PROTOBUF_NAMESPACE_ID::FileOptions_O
// optional string go_package = 11;
inline bool FileOptions::_internal_has_go_package() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool FileOptions::has_go_package() const {
return _internal_has_go_package();
}
inline void FileOptions::clear_go_package() {
- go_package_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.go_package_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& FileOptions::go_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
@@ -12061,8 +12196,8 @@ inline const TProtoStringType& FileOptions::go_package() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_go_package(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000004u;
- go_package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.go_package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package)
}
inline TProtoStringType* FileOptions::mutable_go_package() {
@@ -12071,40 +12206,40 @@ inline TProtoStringType* FileOptions::mutable_go_package() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_go_package() const {
- return go_package_.Get();
+ return _impl_.go_package_.Get();
}
inline void FileOptions::_internal_set_go_package(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000004u;
- go_package_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.go_package_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_go_package() {
- _has_bits_[0] |= 0x00000004u;
- return go_package_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ return _impl_.go_package_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_go_package() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.go_package)
if (!_internal_has_go_package()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000004u;
- auto* p = go_package_.Release();
+ _impl_._has_bits_[0] &= ~0x00000004u;
+ auto* p = _impl_.go_package_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (go_package_.IsDefault()) {
- go_package_.Set("", GetArenaForAllocation());
+ if (_impl_.go_package_.IsDefault()) {
+ _impl_.go_package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_go_package(TProtoStringType* go_package) {
if (go_package != nullptr) {
- _has_bits_[0] |= 0x00000004u;
+ _impl_._has_bits_[0] |= 0x00000004u;
} else {
- _has_bits_[0] &= ~0x00000004u;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
- go_package_.SetAllocated(go_package, GetArenaForAllocation());
+ _impl_.go_package_.SetAllocated(go_package, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (go_package_.IsDefault()) {
- go_package_.Set("", GetArenaForAllocation());
+ if (_impl_.go_package_.IsDefault()) {
+ _impl_.go_package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
@@ -12112,26 +12247,26 @@ inline void FileOptions::set_allocated_go_package(TProtoStringType* go_package)
// optional bool cc_generic_services = 16 [default = false];
inline bool FileOptions::_internal_has_cc_generic_services() const {
- bool value = (_has_bits_[0] & 0x00002000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00002000u) != 0;
return value;
}
inline bool FileOptions::has_cc_generic_services() const {
return _internal_has_cc_generic_services();
}
inline void FileOptions::clear_cc_generic_services() {
- cc_generic_services_ = false;
- _has_bits_[0] &= ~0x00002000u;
+ _impl_.cc_generic_services_ = false;
+ _impl_._has_bits_[0] &= ~0x00002000u;
}
inline bool FileOptions::_internal_cc_generic_services() const {
- return cc_generic_services_;
+ return _impl_.cc_generic_services_;
}
inline bool FileOptions::cc_generic_services() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services)
return _internal_cc_generic_services();
}
inline void FileOptions::_internal_set_cc_generic_services(bool value) {
- _has_bits_[0] |= 0x00002000u;
- cc_generic_services_ = value;
+ _impl_._has_bits_[0] |= 0x00002000u;
+ _impl_.cc_generic_services_ = value;
}
inline void FileOptions::set_cc_generic_services(bool value) {
_internal_set_cc_generic_services(value);
@@ -12140,26 +12275,26 @@ inline void FileOptions::set_cc_generic_services(bool value) {
// optional bool java_generic_services = 17 [default = false];
inline bool FileOptions::_internal_has_java_generic_services() const {
- bool value = (_has_bits_[0] & 0x00004000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00004000u) != 0;
return value;
}
inline bool FileOptions::has_java_generic_services() const {
return _internal_has_java_generic_services();
}
inline void FileOptions::clear_java_generic_services() {
- java_generic_services_ = false;
- _has_bits_[0] &= ~0x00004000u;
+ _impl_.java_generic_services_ = false;
+ _impl_._has_bits_[0] &= ~0x00004000u;
}
inline bool FileOptions::_internal_java_generic_services() const {
- return java_generic_services_;
+ return _impl_.java_generic_services_;
}
inline bool FileOptions::java_generic_services() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services)
return _internal_java_generic_services();
}
inline void FileOptions::_internal_set_java_generic_services(bool value) {
- _has_bits_[0] |= 0x00004000u;
- java_generic_services_ = value;
+ _impl_._has_bits_[0] |= 0x00004000u;
+ _impl_.java_generic_services_ = value;
}
inline void FileOptions::set_java_generic_services(bool value) {
_internal_set_java_generic_services(value);
@@ -12168,26 +12303,26 @@ inline void FileOptions::set_java_generic_services(bool value) {
// optional bool py_generic_services = 18 [default = false];
inline bool FileOptions::_internal_has_py_generic_services() const {
- bool value = (_has_bits_[0] & 0x00008000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00008000u) != 0;
return value;
}
inline bool FileOptions::has_py_generic_services() const {
return _internal_has_py_generic_services();
}
inline void FileOptions::clear_py_generic_services() {
- py_generic_services_ = false;
- _has_bits_[0] &= ~0x00008000u;
+ _impl_.py_generic_services_ = false;
+ _impl_._has_bits_[0] &= ~0x00008000u;
}
inline bool FileOptions::_internal_py_generic_services() const {
- return py_generic_services_;
+ return _impl_.py_generic_services_;
}
inline bool FileOptions::py_generic_services() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services)
return _internal_py_generic_services();
}
inline void FileOptions::_internal_set_py_generic_services(bool value) {
- _has_bits_[0] |= 0x00008000u;
- py_generic_services_ = value;
+ _impl_._has_bits_[0] |= 0x00008000u;
+ _impl_.py_generic_services_ = value;
}
inline void FileOptions::set_py_generic_services(bool value) {
_internal_set_py_generic_services(value);
@@ -12196,26 +12331,26 @@ inline void FileOptions::set_py_generic_services(bool value) {
// optional bool php_generic_services = 42 [default = false];
inline bool FileOptions::_internal_has_php_generic_services() const {
- bool value = (_has_bits_[0] & 0x00010000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00010000u) != 0;
return value;
}
inline bool FileOptions::has_php_generic_services() const {
return _internal_has_php_generic_services();
}
inline void FileOptions::clear_php_generic_services() {
- php_generic_services_ = false;
- _has_bits_[0] &= ~0x00010000u;
+ _impl_.php_generic_services_ = false;
+ _impl_._has_bits_[0] &= ~0x00010000u;
}
inline bool FileOptions::_internal_php_generic_services() const {
- return php_generic_services_;
+ return _impl_.php_generic_services_;
}
inline bool FileOptions::php_generic_services() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_generic_services)
return _internal_php_generic_services();
}
inline void FileOptions::_internal_set_php_generic_services(bool value) {
- _has_bits_[0] |= 0x00010000u;
- php_generic_services_ = value;
+ _impl_._has_bits_[0] |= 0x00010000u;
+ _impl_.php_generic_services_ = value;
}
inline void FileOptions::set_php_generic_services(bool value) {
_internal_set_php_generic_services(value);
@@ -12224,26 +12359,26 @@ inline void FileOptions::set_php_generic_services(bool value) {
// optional bool deprecated = 23 [default = false];
inline bool FileOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00020000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00020000u) != 0;
return value;
}
inline bool FileOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void FileOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00020000u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00020000u;
}
inline bool FileOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool FileOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated)
return _internal_deprecated();
}
inline void FileOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00020000u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00020000u;
+ _impl_.deprecated_ = value;
}
inline void FileOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -12252,26 +12387,26 @@ inline void FileOptions::set_deprecated(bool value) {
// optional bool cc_enable_arenas = 31 [default = true];
inline bool FileOptions::_internal_has_cc_enable_arenas() const {
- bool value = (_has_bits_[0] & 0x00080000u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00080000u) != 0;
return value;
}
inline bool FileOptions::has_cc_enable_arenas() const {
return _internal_has_cc_enable_arenas();
}
inline void FileOptions::clear_cc_enable_arenas() {
- cc_enable_arenas_ = true;
- _has_bits_[0] &= ~0x00080000u;
+ _impl_.cc_enable_arenas_ = true;
+ _impl_._has_bits_[0] &= ~0x00080000u;
}
inline bool FileOptions::_internal_cc_enable_arenas() const {
- return cc_enable_arenas_;
+ return _impl_.cc_enable_arenas_;
}
inline bool FileOptions::cc_enable_arenas() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas)
return _internal_cc_enable_arenas();
}
inline void FileOptions::_internal_set_cc_enable_arenas(bool value) {
- _has_bits_[0] |= 0x00080000u;
- cc_enable_arenas_ = value;
+ _impl_._has_bits_[0] |= 0x00080000u;
+ _impl_.cc_enable_arenas_ = value;
}
inline void FileOptions::set_cc_enable_arenas(bool value) {
_internal_set_cc_enable_arenas(value);
@@ -12280,15 +12415,15 @@ inline void FileOptions::set_cc_enable_arenas(bool value) {
// optional string objc_class_prefix = 36;
inline bool FileOptions::_internal_has_objc_class_prefix() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
return value;
}
inline bool FileOptions::has_objc_class_prefix() const {
return _internal_has_objc_class_prefix();
}
inline void FileOptions::clear_objc_class_prefix() {
- objc_class_prefix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000008u;
+ _impl_.objc_class_prefix_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline const TProtoStringType& FileOptions::objc_class_prefix() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix)
@@ -12297,8 +12432,8 @@ inline const TProtoStringType& FileOptions::objc_class_prefix() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_objc_class_prefix(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000008u;
- objc_class_prefix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.objc_class_prefix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix)
}
inline TProtoStringType* FileOptions::mutable_objc_class_prefix() {
@@ -12307,40 +12442,40 @@ inline TProtoStringType* FileOptions::mutable_objc_class_prefix() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_objc_class_prefix() const {
- return objc_class_prefix_.Get();
+ return _impl_.objc_class_prefix_.Get();
}
inline void FileOptions::_internal_set_objc_class_prefix(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000008u;
- objc_class_prefix_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.objc_class_prefix_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_objc_class_prefix() {
- _has_bits_[0] |= 0x00000008u;
- return objc_class_prefix_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000008u;
+ return _impl_.objc_class_prefix_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_objc_class_prefix() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.objc_class_prefix)
if (!_internal_has_objc_class_prefix()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000008u;
- auto* p = objc_class_prefix_.Release();
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ auto* p = _impl_.objc_class_prefix_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (objc_class_prefix_.IsDefault()) {
- objc_class_prefix_.Set("", GetArenaForAllocation());
+ if (_impl_.objc_class_prefix_.IsDefault()) {
+ _impl_.objc_class_prefix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_objc_class_prefix(TProtoStringType* objc_class_prefix) {
if (objc_class_prefix != nullptr) {
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
- objc_class_prefix_.SetAllocated(objc_class_prefix, GetArenaForAllocation());
+ _impl_.objc_class_prefix_.SetAllocated(objc_class_prefix, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (objc_class_prefix_.IsDefault()) {
- objc_class_prefix_.Set("", GetArenaForAllocation());
+ if (_impl_.objc_class_prefix_.IsDefault()) {
+ _impl_.objc_class_prefix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix)
@@ -12348,15 +12483,15 @@ inline void FileOptions::set_allocated_objc_class_prefix(TProtoStringType* objc_
// optional string csharp_namespace = 37;
inline bool FileOptions::_internal_has_csharp_namespace() const {
- bool value = (_has_bits_[0] & 0x00000010u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
return value;
}
inline bool FileOptions::has_csharp_namespace() const {
return _internal_has_csharp_namespace();
}
inline void FileOptions::clear_csharp_namespace() {
- csharp_namespace_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000010u;
+ _impl_.csharp_namespace_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
inline const TProtoStringType& FileOptions::csharp_namespace() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace)
@@ -12365,8 +12500,8 @@ inline const TProtoStringType& FileOptions::csharp_namespace() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_csharp_namespace(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000010u;
- csharp_namespace_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.csharp_namespace_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace)
}
inline TProtoStringType* FileOptions::mutable_csharp_namespace() {
@@ -12375,40 +12510,40 @@ inline TProtoStringType* FileOptions::mutable_csharp_namespace() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_csharp_namespace() const {
- return csharp_namespace_.Get();
+ return _impl_.csharp_namespace_.Get();
}
inline void FileOptions::_internal_set_csharp_namespace(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000010u;
- csharp_namespace_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.csharp_namespace_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_csharp_namespace() {
- _has_bits_[0] |= 0x00000010u;
- return csharp_namespace_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000010u;
+ return _impl_.csharp_namespace_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_csharp_namespace() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.csharp_namespace)
if (!_internal_has_csharp_namespace()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000010u;
- auto* p = csharp_namespace_.Release();
+ _impl_._has_bits_[0] &= ~0x00000010u;
+ auto* p = _impl_.csharp_namespace_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (csharp_namespace_.IsDefault()) {
- csharp_namespace_.Set("", GetArenaForAllocation());
+ if (_impl_.csharp_namespace_.IsDefault()) {
+ _impl_.csharp_namespace_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_csharp_namespace(TProtoStringType* csharp_namespace) {
if (csharp_namespace != nullptr) {
- _has_bits_[0] |= 0x00000010u;
+ _impl_._has_bits_[0] |= 0x00000010u;
} else {
- _has_bits_[0] &= ~0x00000010u;
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
- csharp_namespace_.SetAllocated(csharp_namespace, GetArenaForAllocation());
+ _impl_.csharp_namespace_.SetAllocated(csharp_namespace, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (csharp_namespace_.IsDefault()) {
- csharp_namespace_.Set("", GetArenaForAllocation());
+ if (_impl_.csharp_namespace_.IsDefault()) {
+ _impl_.csharp_namespace_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
@@ -12416,15 +12551,15 @@ inline void FileOptions::set_allocated_csharp_namespace(TProtoStringType* csharp
// optional string swift_prefix = 39;
inline bool FileOptions::_internal_has_swift_prefix() const {
- bool value = (_has_bits_[0] & 0x00000020u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
return value;
}
inline bool FileOptions::has_swift_prefix() const {
return _internal_has_swift_prefix();
}
inline void FileOptions::clear_swift_prefix() {
- swift_prefix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000020u;
+ _impl_.swift_prefix_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
inline const TProtoStringType& FileOptions::swift_prefix() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.swift_prefix)
@@ -12433,8 +12568,8 @@ inline const TProtoStringType& FileOptions::swift_prefix() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_swift_prefix(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000020u;
- swift_prefix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000020u;
+ _impl_.swift_prefix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix)
}
inline TProtoStringType* FileOptions::mutable_swift_prefix() {
@@ -12443,40 +12578,40 @@ inline TProtoStringType* FileOptions::mutable_swift_prefix() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_swift_prefix() const {
- return swift_prefix_.Get();
+ return _impl_.swift_prefix_.Get();
}
inline void FileOptions::_internal_set_swift_prefix(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000020u;
- swift_prefix_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000020u;
+ _impl_.swift_prefix_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_swift_prefix() {
- _has_bits_[0] |= 0x00000020u;
- return swift_prefix_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000020u;
+ return _impl_.swift_prefix_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_swift_prefix() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.swift_prefix)
if (!_internal_has_swift_prefix()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000020u;
- auto* p = swift_prefix_.Release();
+ _impl_._has_bits_[0] &= ~0x00000020u;
+ auto* p = _impl_.swift_prefix_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (swift_prefix_.IsDefault()) {
- swift_prefix_.Set("", GetArenaForAllocation());
+ if (_impl_.swift_prefix_.IsDefault()) {
+ _impl_.swift_prefix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_swift_prefix(TProtoStringType* swift_prefix) {
if (swift_prefix != nullptr) {
- _has_bits_[0] |= 0x00000020u;
+ _impl_._has_bits_[0] |= 0x00000020u;
} else {
- _has_bits_[0] &= ~0x00000020u;
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
- swift_prefix_.SetAllocated(swift_prefix, GetArenaForAllocation());
+ _impl_.swift_prefix_.SetAllocated(swift_prefix, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (swift_prefix_.IsDefault()) {
- swift_prefix_.Set("", GetArenaForAllocation());
+ if (_impl_.swift_prefix_.IsDefault()) {
+ _impl_.swift_prefix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.swift_prefix)
@@ -12484,15 +12619,15 @@ inline void FileOptions::set_allocated_swift_prefix(TProtoStringType* swift_pref
// optional string php_class_prefix = 40;
inline bool FileOptions::_internal_has_php_class_prefix() const {
- bool value = (_has_bits_[0] & 0x00000040u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0;
return value;
}
inline bool FileOptions::has_php_class_prefix() const {
return _internal_has_php_class_prefix();
}
inline void FileOptions::clear_php_class_prefix() {
- php_class_prefix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000040u;
+ _impl_.php_class_prefix_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000040u;
}
inline const TProtoStringType& FileOptions::php_class_prefix() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_class_prefix)
@@ -12501,8 +12636,8 @@ inline const TProtoStringType& FileOptions::php_class_prefix() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_php_class_prefix(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000040u;
- php_class_prefix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000040u;
+ _impl_.php_class_prefix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_class_prefix)
}
inline TProtoStringType* FileOptions::mutable_php_class_prefix() {
@@ -12511,40 +12646,40 @@ inline TProtoStringType* FileOptions::mutable_php_class_prefix() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_php_class_prefix() const {
- return php_class_prefix_.Get();
+ return _impl_.php_class_prefix_.Get();
}
inline void FileOptions::_internal_set_php_class_prefix(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000040u;
- php_class_prefix_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000040u;
+ _impl_.php_class_prefix_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_php_class_prefix() {
- _has_bits_[0] |= 0x00000040u;
- return php_class_prefix_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000040u;
+ return _impl_.php_class_prefix_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_php_class_prefix() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_class_prefix)
if (!_internal_has_php_class_prefix()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000040u;
- auto* p = php_class_prefix_.Release();
+ _impl_._has_bits_[0] &= ~0x00000040u;
+ auto* p = _impl_.php_class_prefix_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (php_class_prefix_.IsDefault()) {
- php_class_prefix_.Set("", GetArenaForAllocation());
+ if (_impl_.php_class_prefix_.IsDefault()) {
+ _impl_.php_class_prefix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_php_class_prefix(TProtoStringType* php_class_prefix) {
if (php_class_prefix != nullptr) {
- _has_bits_[0] |= 0x00000040u;
+ _impl_._has_bits_[0] |= 0x00000040u;
} else {
- _has_bits_[0] &= ~0x00000040u;
+ _impl_._has_bits_[0] &= ~0x00000040u;
}
- php_class_prefix_.SetAllocated(php_class_prefix, GetArenaForAllocation());
+ _impl_.php_class_prefix_.SetAllocated(php_class_prefix, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (php_class_prefix_.IsDefault()) {
- php_class_prefix_.Set("", GetArenaForAllocation());
+ if (_impl_.php_class_prefix_.IsDefault()) {
+ _impl_.php_class_prefix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_class_prefix)
@@ -12552,15 +12687,15 @@ inline void FileOptions::set_allocated_php_class_prefix(TProtoStringType* php_cl
// optional string php_namespace = 41;
inline bool FileOptions::_internal_has_php_namespace() const {
- bool value = (_has_bits_[0] & 0x00000080u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0;
return value;
}
inline bool FileOptions::has_php_namespace() const {
return _internal_has_php_namespace();
}
inline void FileOptions::clear_php_namespace() {
- php_namespace_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000080u;
+ _impl_.php_namespace_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000080u;
}
inline const TProtoStringType& FileOptions::php_namespace() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_namespace)
@@ -12569,8 +12704,8 @@ inline const TProtoStringType& FileOptions::php_namespace() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_php_namespace(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000080u;
- php_namespace_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000080u;
+ _impl_.php_namespace_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_namespace)
}
inline TProtoStringType* FileOptions::mutable_php_namespace() {
@@ -12579,40 +12714,40 @@ inline TProtoStringType* FileOptions::mutable_php_namespace() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_php_namespace() const {
- return php_namespace_.Get();
+ return _impl_.php_namespace_.Get();
}
inline void FileOptions::_internal_set_php_namespace(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000080u;
- php_namespace_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000080u;
+ _impl_.php_namespace_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_php_namespace() {
- _has_bits_[0] |= 0x00000080u;
- return php_namespace_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000080u;
+ return _impl_.php_namespace_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_php_namespace() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_namespace)
if (!_internal_has_php_namespace()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000080u;
- auto* p = php_namespace_.Release();
+ _impl_._has_bits_[0] &= ~0x00000080u;
+ auto* p = _impl_.php_namespace_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (php_namespace_.IsDefault()) {
- php_namespace_.Set("", GetArenaForAllocation());
+ if (_impl_.php_namespace_.IsDefault()) {
+ _impl_.php_namespace_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_php_namespace(TProtoStringType* php_namespace) {
if (php_namespace != nullptr) {
- _has_bits_[0] |= 0x00000080u;
+ _impl_._has_bits_[0] |= 0x00000080u;
} else {
- _has_bits_[0] &= ~0x00000080u;
+ _impl_._has_bits_[0] &= ~0x00000080u;
}
- php_namespace_.SetAllocated(php_namespace, GetArenaForAllocation());
+ _impl_.php_namespace_.SetAllocated(php_namespace, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (php_namespace_.IsDefault()) {
- php_namespace_.Set("", GetArenaForAllocation());
+ if (_impl_.php_namespace_.IsDefault()) {
+ _impl_.php_namespace_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_namespace)
@@ -12620,15 +12755,15 @@ inline void FileOptions::set_allocated_php_namespace(TProtoStringType* php_names
// optional string php_metadata_namespace = 44;
inline bool FileOptions::_internal_has_php_metadata_namespace() const {
- bool value = (_has_bits_[0] & 0x00000100u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000100u) != 0;
return value;
}
inline bool FileOptions::has_php_metadata_namespace() const {
return _internal_has_php_metadata_namespace();
}
inline void FileOptions::clear_php_metadata_namespace() {
- php_metadata_namespace_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000100u;
+ _impl_.php_metadata_namespace_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000100u;
}
inline const TProtoStringType& FileOptions::php_metadata_namespace() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_metadata_namespace)
@@ -12637,8 +12772,8 @@ inline const TProtoStringType& FileOptions::php_metadata_namespace() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_php_metadata_namespace(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000100u;
- php_metadata_namespace_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000100u;
+ _impl_.php_metadata_namespace_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_metadata_namespace)
}
inline TProtoStringType* FileOptions::mutable_php_metadata_namespace() {
@@ -12647,40 +12782,40 @@ inline TProtoStringType* FileOptions::mutable_php_metadata_namespace() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_php_metadata_namespace() const {
- return php_metadata_namespace_.Get();
+ return _impl_.php_metadata_namespace_.Get();
}
inline void FileOptions::_internal_set_php_metadata_namespace(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000100u;
- php_metadata_namespace_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000100u;
+ _impl_.php_metadata_namespace_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_php_metadata_namespace() {
- _has_bits_[0] |= 0x00000100u;
- return php_metadata_namespace_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000100u;
+ return _impl_.php_metadata_namespace_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_php_metadata_namespace() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_metadata_namespace)
if (!_internal_has_php_metadata_namespace()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000100u;
- auto* p = php_metadata_namespace_.Release();
+ _impl_._has_bits_[0] &= ~0x00000100u;
+ auto* p = _impl_.php_metadata_namespace_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (php_metadata_namespace_.IsDefault()) {
- php_metadata_namespace_.Set("", GetArenaForAllocation());
+ if (_impl_.php_metadata_namespace_.IsDefault()) {
+ _impl_.php_metadata_namespace_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_php_metadata_namespace(TProtoStringType* php_metadata_namespace) {
if (php_metadata_namespace != nullptr) {
- _has_bits_[0] |= 0x00000100u;
+ _impl_._has_bits_[0] |= 0x00000100u;
} else {
- _has_bits_[0] &= ~0x00000100u;
+ _impl_._has_bits_[0] &= ~0x00000100u;
}
- php_metadata_namespace_.SetAllocated(php_metadata_namespace, GetArenaForAllocation());
+ _impl_.php_metadata_namespace_.SetAllocated(php_metadata_namespace, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (php_metadata_namespace_.IsDefault()) {
- php_metadata_namespace_.Set("", GetArenaForAllocation());
+ if (_impl_.php_metadata_namespace_.IsDefault()) {
+ _impl_.php_metadata_namespace_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_metadata_namespace)
@@ -12688,15 +12823,15 @@ inline void FileOptions::set_allocated_php_metadata_namespace(TProtoStringType*
// optional string ruby_package = 45;
inline bool FileOptions::_internal_has_ruby_package() const {
- bool value = (_has_bits_[0] & 0x00000200u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000200u) != 0;
return value;
}
inline bool FileOptions::has_ruby_package() const {
return _internal_has_ruby_package();
}
inline void FileOptions::clear_ruby_package() {
- ruby_package_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000200u;
+ _impl_.ruby_package_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000200u;
}
inline const TProtoStringType& FileOptions::ruby_package() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.ruby_package)
@@ -12705,8 +12840,8 @@ inline const TProtoStringType& FileOptions::ruby_package() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void FileOptions::set_ruby_package(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000200u;
- ruby_package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000200u;
+ _impl_.ruby_package_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.ruby_package)
}
inline TProtoStringType* FileOptions::mutable_ruby_package() {
@@ -12715,40 +12850,40 @@ inline TProtoStringType* FileOptions::mutable_ruby_package() {
return _s;
}
inline const TProtoStringType& FileOptions::_internal_ruby_package() const {
- return ruby_package_.Get();
+ return _impl_.ruby_package_.Get();
}
inline void FileOptions::_internal_set_ruby_package(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000200u;
- ruby_package_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000200u;
+ _impl_.ruby_package_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::_internal_mutable_ruby_package() {
- _has_bits_[0] |= 0x00000200u;
- return ruby_package_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000200u;
+ return _impl_.ruby_package_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* FileOptions::release_ruby_package() {
// @@protoc_insertion_point(field_release:google.protobuf.FileOptions.ruby_package)
if (!_internal_has_ruby_package()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000200u;
- auto* p = ruby_package_.Release();
+ _impl_._has_bits_[0] &= ~0x00000200u;
+ auto* p = _impl_.ruby_package_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (ruby_package_.IsDefault()) {
- ruby_package_.Set("", GetArenaForAllocation());
+ if (_impl_.ruby_package_.IsDefault()) {
+ _impl_.ruby_package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void FileOptions::set_allocated_ruby_package(TProtoStringType* ruby_package) {
if (ruby_package != nullptr) {
- _has_bits_[0] |= 0x00000200u;
+ _impl_._has_bits_[0] |= 0x00000200u;
} else {
- _has_bits_[0] &= ~0x00000200u;
+ _impl_._has_bits_[0] &= ~0x00000200u;
}
- ruby_package_.SetAllocated(ruby_package, GetArenaForAllocation());
+ _impl_.ruby_package_.SetAllocated(ruby_package, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (ruby_package_.IsDefault()) {
- ruby_package_.Set("", GetArenaForAllocation());
+ if (_impl_.ruby_package_.IsDefault()) {
+ _impl_.ruby_package_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.ruby_package)
@@ -12756,32 +12891,32 @@ inline void FileOptions::set_allocated_ruby_package(TProtoStringType* ruby_packa
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int FileOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int FileOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void FileOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
FileOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& FileOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& FileOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -12791,7 +12926,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::add_uninterpre
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
FileOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -12800,26 +12935,26 @@ FileOptions::uninterpreted_option() const {
// optional bool message_set_wire_format = 1 [default = false];
inline bool MessageOptions::_internal_has_message_set_wire_format() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool MessageOptions::has_message_set_wire_format() const {
return _internal_has_message_set_wire_format();
}
inline void MessageOptions::clear_message_set_wire_format() {
- message_set_wire_format_ = false;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.message_set_wire_format_ = false;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline bool MessageOptions::_internal_message_set_wire_format() const {
- return message_set_wire_format_;
+ return _impl_.message_set_wire_format_;
}
inline bool MessageOptions::message_set_wire_format() const {
// @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format)
return _internal_message_set_wire_format();
}
inline void MessageOptions::_internal_set_message_set_wire_format(bool value) {
- _has_bits_[0] |= 0x00000001u;
- message_set_wire_format_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.message_set_wire_format_ = value;
}
inline void MessageOptions::set_message_set_wire_format(bool value) {
_internal_set_message_set_wire_format(value);
@@ -12828,26 +12963,26 @@ inline void MessageOptions::set_message_set_wire_format(bool value) {
// optional bool no_standard_descriptor_accessor = 2 [default = false];
inline bool MessageOptions::_internal_has_no_standard_descriptor_accessor() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool MessageOptions::has_no_standard_descriptor_accessor() const {
return _internal_has_no_standard_descriptor_accessor();
}
inline void MessageOptions::clear_no_standard_descriptor_accessor() {
- no_standard_descriptor_accessor_ = false;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.no_standard_descriptor_accessor_ = false;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline bool MessageOptions::_internal_no_standard_descriptor_accessor() const {
- return no_standard_descriptor_accessor_;
+ return _impl_.no_standard_descriptor_accessor_;
}
inline bool MessageOptions::no_standard_descriptor_accessor() const {
// @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
return _internal_no_standard_descriptor_accessor();
}
inline void MessageOptions::_internal_set_no_standard_descriptor_accessor(bool value) {
- _has_bits_[0] |= 0x00000002u;
- no_standard_descriptor_accessor_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.no_standard_descriptor_accessor_ = value;
}
inline void MessageOptions::set_no_standard_descriptor_accessor(bool value) {
_internal_set_no_standard_descriptor_accessor(value);
@@ -12856,26 +12991,26 @@ inline void MessageOptions::set_no_standard_descriptor_accessor(bool value) {
// optional bool deprecated = 3 [default = false];
inline bool MessageOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool MessageOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void MessageOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline bool MessageOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool MessageOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated)
return _internal_deprecated();
}
inline void MessageOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00000004u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.deprecated_ = value;
}
inline void MessageOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -12884,26 +13019,26 @@ inline void MessageOptions::set_deprecated(bool value) {
// optional bool map_entry = 7;
inline bool MessageOptions::_internal_has_map_entry() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
return value;
}
inline bool MessageOptions::has_map_entry() const {
return _internal_has_map_entry();
}
inline void MessageOptions::clear_map_entry() {
- map_entry_ = false;
- _has_bits_[0] &= ~0x00000008u;
+ _impl_.map_entry_ = false;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline bool MessageOptions::_internal_map_entry() const {
- return map_entry_;
+ return _impl_.map_entry_;
}
inline bool MessageOptions::map_entry() const {
// @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry)
return _internal_map_entry();
}
inline void MessageOptions::_internal_set_map_entry(bool value) {
- _has_bits_[0] |= 0x00000008u;
- map_entry_ = value;
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.map_entry_ = value;
}
inline void MessageOptions::set_map_entry(bool value) {
_internal_set_map_entry(value);
@@ -12912,32 +13047,32 @@ inline void MessageOptions::set_map_entry(bool value) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int MessageOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int MessageOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void MessageOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
MessageOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& MessageOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -12947,7 +13082,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::add_uninter
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
MessageOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -12956,18 +13091,18 @@ MessageOptions::uninterpreted_option() const {
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
inline bool FieldOptions::_internal_has_ctype() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool FieldOptions::has_ctype() const {
return _internal_has_ctype();
}
inline void FieldOptions::clear_ctype() {
- ctype_ = 0;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.ctype_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::_internal_ctype() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldOptions_CType >(ctype_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldOptions_CType >(_impl_.ctype_);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::ctype() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype)
@@ -12975,8 +13110,8 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::ctype() const {
}
inline void FieldOptions::_internal_set_ctype(::PROTOBUF_NAMESPACE_ID::FieldOptions_CType value) {
assert(::PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(value));
- _has_bits_[0] |= 0x00000001u;
- ctype_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.ctype_ = value;
}
inline void FieldOptions::set_ctype(::PROTOBUF_NAMESPACE_ID::FieldOptions_CType value) {
_internal_set_ctype(value);
@@ -12985,26 +13120,26 @@ inline void FieldOptions::set_ctype(::PROTOBUF_NAMESPACE_ID::FieldOptions_CType
// optional bool packed = 2;
inline bool FieldOptions::_internal_has_packed() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool FieldOptions::has_packed() const {
return _internal_has_packed();
}
inline void FieldOptions::clear_packed() {
- packed_ = false;
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.packed_ = false;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline bool FieldOptions::_internal_packed() const {
- return packed_;
+ return _impl_.packed_;
}
inline bool FieldOptions::packed() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed)
return _internal_packed();
}
inline void FieldOptions::_internal_set_packed(bool value) {
- _has_bits_[0] |= 0x00000004u;
- packed_ = value;
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.packed_ = value;
}
inline void FieldOptions::set_packed(bool value) {
_internal_set_packed(value);
@@ -13013,18 +13148,18 @@ inline void FieldOptions::set_packed(bool value) {
// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
inline bool FieldOptions::_internal_has_jstype() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool FieldOptions::has_jstype() const {
return _internal_has_jstype();
}
inline void FieldOptions::clear_jstype() {
- jstype_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.jstype_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::_internal_jstype() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType >(jstype_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType >(_impl_.jstype_);
}
inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::jstype() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype)
@@ -13032,8 +13167,8 @@ inline ::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::jstype() const
}
inline void FieldOptions::_internal_set_jstype(::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value) {
assert(::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(value));
- _has_bits_[0] |= 0x00000002u;
- jstype_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.jstype_ = value;
}
inline void FieldOptions::set_jstype(::PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value) {
_internal_set_jstype(value);
@@ -13042,26 +13177,26 @@ inline void FieldOptions::set_jstype(::PROTOBUF_NAMESPACE_ID::FieldOptions_JSTyp
// optional bool lazy = 5 [default = false];
inline bool FieldOptions::_internal_has_lazy() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
return value;
}
inline bool FieldOptions::has_lazy() const {
return _internal_has_lazy();
}
inline void FieldOptions::clear_lazy() {
- lazy_ = false;
- _has_bits_[0] &= ~0x00000008u;
+ _impl_.lazy_ = false;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline bool FieldOptions::_internal_lazy() const {
- return lazy_;
+ return _impl_.lazy_;
}
inline bool FieldOptions::lazy() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy)
return _internal_lazy();
}
inline void FieldOptions::_internal_set_lazy(bool value) {
- _has_bits_[0] |= 0x00000008u;
- lazy_ = value;
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.lazy_ = value;
}
inline void FieldOptions::set_lazy(bool value) {
_internal_set_lazy(value);
@@ -13070,26 +13205,26 @@ inline void FieldOptions::set_lazy(bool value) {
// optional bool unverified_lazy = 15 [default = false];
inline bool FieldOptions::_internal_has_unverified_lazy() const {
- bool value = (_has_bits_[0] & 0x00000010u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
return value;
}
inline bool FieldOptions::has_unverified_lazy() const {
return _internal_has_unverified_lazy();
}
inline void FieldOptions::clear_unverified_lazy() {
- unverified_lazy_ = false;
- _has_bits_[0] &= ~0x00000010u;
+ _impl_.unverified_lazy_ = false;
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
inline bool FieldOptions::_internal_unverified_lazy() const {
- return unverified_lazy_;
+ return _impl_.unverified_lazy_;
}
inline bool FieldOptions::unverified_lazy() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.unverified_lazy)
return _internal_unverified_lazy();
}
inline void FieldOptions::_internal_set_unverified_lazy(bool value) {
- _has_bits_[0] |= 0x00000010u;
- unverified_lazy_ = value;
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.unverified_lazy_ = value;
}
inline void FieldOptions::set_unverified_lazy(bool value) {
_internal_set_unverified_lazy(value);
@@ -13098,26 +13233,26 @@ inline void FieldOptions::set_unverified_lazy(bool value) {
// optional bool deprecated = 3 [default = false];
inline bool FieldOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00000020u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
return value;
}
inline bool FieldOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void FieldOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00000020u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
inline bool FieldOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool FieldOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated)
return _internal_deprecated();
}
inline void FieldOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00000020u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00000020u;
+ _impl_.deprecated_ = value;
}
inline void FieldOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -13126,26 +13261,26 @@ inline void FieldOptions::set_deprecated(bool value) {
// optional bool weak = 10 [default = false];
inline bool FieldOptions::_internal_has_weak() const {
- bool value = (_has_bits_[0] & 0x00000040u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0;
return value;
}
inline bool FieldOptions::has_weak() const {
return _internal_has_weak();
}
inline void FieldOptions::clear_weak() {
- weak_ = false;
- _has_bits_[0] &= ~0x00000040u;
+ _impl_.weak_ = false;
+ _impl_._has_bits_[0] &= ~0x00000040u;
}
inline bool FieldOptions::_internal_weak() const {
- return weak_;
+ return _impl_.weak_;
}
inline bool FieldOptions::weak() const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak)
return _internal_weak();
}
inline void FieldOptions::_internal_set_weak(bool value) {
- _has_bits_[0] |= 0x00000040u;
- weak_ = value;
+ _impl_._has_bits_[0] |= 0x00000040u;
+ _impl_.weak_ = value;
}
inline void FieldOptions::set_weak(bool value) {
_internal_set_weak(value);
@@ -13154,32 +13289,32 @@ inline void FieldOptions::set_weak(bool value) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int FieldOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int FieldOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void FieldOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
FieldOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& FieldOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -13189,7 +13324,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::add_uninterpr
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
FieldOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -13198,32 +13333,32 @@ FieldOptions::uninterpreted_option() const {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int OneofOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int OneofOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void OneofOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.OneofOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
OneofOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.OneofOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& OneofOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& OneofOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.OneofOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -13233,7 +13368,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::add_uninterpr
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
OneofOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.OneofOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -13242,26 +13377,26 @@ OneofOptions::uninterpreted_option() const {
// optional bool allow_alias = 2;
inline bool EnumOptions::_internal_has_allow_alias() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool EnumOptions::has_allow_alias() const {
return _internal_has_allow_alias();
}
inline void EnumOptions::clear_allow_alias() {
- allow_alias_ = false;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.allow_alias_ = false;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline bool EnumOptions::_internal_allow_alias() const {
- return allow_alias_;
+ return _impl_.allow_alias_;
}
inline bool EnumOptions::allow_alias() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias)
return _internal_allow_alias();
}
inline void EnumOptions::_internal_set_allow_alias(bool value) {
- _has_bits_[0] |= 0x00000001u;
- allow_alias_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.allow_alias_ = value;
}
inline void EnumOptions::set_allow_alias(bool value) {
_internal_set_allow_alias(value);
@@ -13270,26 +13405,26 @@ inline void EnumOptions::set_allow_alias(bool value) {
// optional bool deprecated = 3 [default = false];
inline bool EnumOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool EnumOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void EnumOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline bool EnumOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool EnumOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated)
return _internal_deprecated();
}
inline void EnumOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00000002u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.deprecated_ = value;
}
inline void EnumOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -13298,32 +13433,32 @@ inline void EnumOptions::set_deprecated(bool value) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int EnumOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int EnumOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void EnumOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
EnumOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -13333,7 +13468,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::add_uninterpre
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
EnumOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -13342,26 +13477,26 @@ EnumOptions::uninterpreted_option() const {
// optional bool deprecated = 1 [default = false];
inline bool EnumValueOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool EnumValueOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void EnumValueOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline bool EnumValueOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool EnumValueOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated)
return _internal_deprecated();
}
inline void EnumValueOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00000001u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.deprecated_ = value;
}
inline void EnumValueOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -13370,32 +13505,32 @@ inline void EnumValueOptions::set_deprecated(bool value) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int EnumValueOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int EnumValueOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void EnumValueOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
EnumValueOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumValueOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -13405,7 +13540,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::add_unint
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
EnumValueOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -13414,26 +13549,26 @@ EnumValueOptions::uninterpreted_option() const {
// optional bool deprecated = 33 [default = false];
inline bool ServiceOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool ServiceOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void ServiceOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline bool ServiceOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool ServiceOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated)
return _internal_deprecated();
}
inline void ServiceOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00000001u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.deprecated_ = value;
}
inline void ServiceOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -13442,32 +13577,32 @@ inline void ServiceOptions::set_deprecated(bool value) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int ServiceOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int ServiceOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void ServiceOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
ServiceOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& ServiceOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -13477,7 +13612,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::add_uninter
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
ServiceOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -13486,26 +13621,26 @@ ServiceOptions::uninterpreted_option() const {
// optional bool deprecated = 33 [default = false];
inline bool MethodOptions::_internal_has_deprecated() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool MethodOptions::has_deprecated() const {
return _internal_has_deprecated();
}
inline void MethodOptions::clear_deprecated() {
- deprecated_ = false;
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.deprecated_ = false;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline bool MethodOptions::_internal_deprecated() const {
- return deprecated_;
+ return _impl_.deprecated_;
}
inline bool MethodOptions::deprecated() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated)
return _internal_deprecated();
}
inline void MethodOptions::_internal_set_deprecated(bool value) {
- _has_bits_[0] |= 0x00000001u;
- deprecated_ = value;
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.deprecated_ = value;
}
inline void MethodOptions::set_deprecated(bool value) {
_internal_set_deprecated(value);
@@ -13514,18 +13649,18 @@ inline void MethodOptions::set_deprecated(bool value) {
// optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
inline bool MethodOptions::_internal_has_idempotency_level() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool MethodOptions::has_idempotency_level() const {
return _internal_has_idempotency_level();
}
inline void MethodOptions::clear_idempotency_level() {
- idempotency_level_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.idempotency_level_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::_internal_idempotency_level() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(idempotency_level_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(_impl_.idempotency_level_);
}
inline ::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::idempotency_level() const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.idempotency_level)
@@ -13533,8 +13668,8 @@ inline ::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::id
}
inline void MethodOptions::_internal_set_idempotency_level(::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) {
assert(::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(value));
- _has_bits_[0] |= 0x00000002u;
- idempotency_level_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.idempotency_level_ = value;
}
inline void MethodOptions::set_idempotency_level(::PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) {
_internal_set_idempotency_level(value);
@@ -13543,32 +13678,32 @@ inline void MethodOptions::set_idempotency_level(::PROTOBUF_NAMESPACE_ID::Method
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int MethodOptions::_internal_uninterpreted_option_size() const {
- return uninterpreted_option_.size();
+ return _impl_.uninterpreted_option_.size();
}
inline int MethodOptions::uninterpreted_option_size() const {
return _internal_uninterpreted_option_size();
}
inline void MethodOptions::clear_uninterpreted_option() {
- uninterpreted_option_.Clear();
+ _impl_.uninterpreted_option_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option)
- return uninterpreted_option_.Mutable(index);
+ return _impl_.uninterpreted_option_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >*
MethodOptions::mutable_uninterpreted_option() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option)
- return &uninterpreted_option_;
+ return &_impl_.uninterpreted_option_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& MethodOptions::_internal_uninterpreted_option(int index) const {
- return uninterpreted_option_.Get(index);
+ return _impl_.uninterpreted_option_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option)
return _internal_uninterpreted_option(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::_internal_add_uninterpreted_option() {
- return uninterpreted_option_.Add();
+ return _impl_.uninterpreted_option_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::add_uninterpreted_option() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption* _add = _internal_add_uninterpreted_option();
@@ -13578,7 +13713,7 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::add_uninterp
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption >&
MethodOptions::uninterpreted_option() const {
// @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
- return uninterpreted_option_;
+ return _impl_.uninterpreted_option_;
}
// -------------------------------------------------------------------
@@ -13587,15 +13722,15 @@ MethodOptions::uninterpreted_option() const {
// required string name_part = 1;
inline bool UninterpretedOption_NamePart::_internal_has_name_part() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool UninterpretedOption_NamePart::has_name_part() const {
return _internal_has_name_part();
}
inline void UninterpretedOption_NamePart::clear_name_part() {
- name_part_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_part_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& UninterpretedOption_NamePart::name_part() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part)
@@ -13604,8 +13739,8 @@ inline const TProtoStringType& UninterpretedOption_NamePart::name_part() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void UninterpretedOption_NamePart::set_name_part(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_part_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_part_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part)
}
inline TProtoStringType* UninterpretedOption_NamePart::mutable_name_part() {
@@ -13614,40 +13749,40 @@ inline TProtoStringType* UninterpretedOption_NamePart::mutable_name_part() {
return _s;
}
inline const TProtoStringType& UninterpretedOption_NamePart::_internal_name_part() const {
- return name_part_.Get();
+ return _impl_.name_part_.Get();
}
inline void UninterpretedOption_NamePart::_internal_set_name_part(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_part_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_part_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption_NamePart::_internal_mutable_name_part() {
- _has_bits_[0] |= 0x00000001u;
- return name_part_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_part_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption_NamePart::release_name_part() {
// @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.NamePart.name_part)
if (!_internal_has_name_part()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_part_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_part_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_part_.IsDefault()) {
- name_part_.Set("", GetArenaForAllocation());
+ if (_impl_.name_part_.IsDefault()) {
+ _impl_.name_part_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void UninterpretedOption_NamePart::set_allocated_name_part(TProtoStringType* name_part) {
if (name_part != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_part_.SetAllocated(name_part, GetArenaForAllocation());
+ _impl_.name_part_.SetAllocated(name_part, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_part_.IsDefault()) {
- name_part_.Set("", GetArenaForAllocation());
+ if (_impl_.name_part_.IsDefault()) {
+ _impl_.name_part_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
@@ -13655,26 +13790,26 @@ inline void UninterpretedOption_NamePart::set_allocated_name_part(TProtoStringTy
// required bool is_extension = 2;
inline bool UninterpretedOption_NamePart::_internal_has_is_extension() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool UninterpretedOption_NamePart::has_is_extension() const {
return _internal_has_is_extension();
}
inline void UninterpretedOption_NamePart::clear_is_extension() {
- is_extension_ = false;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.is_extension_ = false;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline bool UninterpretedOption_NamePart::_internal_is_extension() const {
- return is_extension_;
+ return _impl_.is_extension_;
}
inline bool UninterpretedOption_NamePart::is_extension() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension)
return _internal_is_extension();
}
inline void UninterpretedOption_NamePart::_internal_set_is_extension(bool value) {
- _has_bits_[0] |= 0x00000002u;
- is_extension_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.is_extension_ = value;
}
inline void UninterpretedOption_NamePart::set_is_extension(bool value) {
_internal_set_is_extension(value);
@@ -13687,32 +13822,32 @@ inline void UninterpretedOption_NamePart::set_is_extension(bool value) {
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
inline int UninterpretedOption::_internal_name_size() const {
- return name_.size();
+ return _impl_.name_.size();
}
inline int UninterpretedOption::name_size() const {
return _internal_name_size();
}
inline void UninterpretedOption::clear_name() {
- name_.Clear();
+ _impl_.name_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name)
- return name_.Mutable(index);
+ return _impl_.name_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >*
UninterpretedOption::mutable_name() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name)
- return &name_;
+ return &_impl_.name_;
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& UninterpretedOption::_internal_name(int index) const {
- return name_.Get(index);
+ return _impl_.name_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name)
return _internal_name(index);
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::_internal_add_name() {
- return name_.Add();
+ return _impl_.name_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::add_name() {
::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* _add = _internal_add_name();
@@ -13722,20 +13857,20 @@ inline ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOptio
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >&
UninterpretedOption::name() const {
// @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
- return name_;
+ return _impl_.name_;
}
// optional string identifier_value = 3;
inline bool UninterpretedOption::_internal_has_identifier_value() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool UninterpretedOption::has_identifier_value() const {
return _internal_has_identifier_value();
}
inline void UninterpretedOption::clear_identifier_value() {
- identifier_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.identifier_value_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& UninterpretedOption::identifier_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
@@ -13744,8 +13879,8 @@ inline const TProtoStringType& UninterpretedOption::identifier_value() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void UninterpretedOption::set_identifier_value(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- identifier_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.identifier_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value)
}
inline TProtoStringType* UninterpretedOption::mutable_identifier_value() {
@@ -13754,40 +13889,40 @@ inline TProtoStringType* UninterpretedOption::mutable_identifier_value() {
return _s;
}
inline const TProtoStringType& UninterpretedOption::_internal_identifier_value() const {
- return identifier_value_.Get();
+ return _impl_.identifier_value_.Get();
}
inline void UninterpretedOption::_internal_set_identifier_value(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- identifier_value_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.identifier_value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption::_internal_mutable_identifier_value() {
- _has_bits_[0] |= 0x00000001u;
- return identifier_value_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.identifier_value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption::release_identifier_value() {
// @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.identifier_value)
if (!_internal_has_identifier_value()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = identifier_value_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.identifier_value_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (identifier_value_.IsDefault()) {
- identifier_value_.Set("", GetArenaForAllocation());
+ if (_impl_.identifier_value_.IsDefault()) {
+ _impl_.identifier_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void UninterpretedOption::set_allocated_identifier_value(TProtoStringType* identifier_value) {
if (identifier_value != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- identifier_value_.SetAllocated(identifier_value, GetArenaForAllocation());
+ _impl_.identifier_value_.SetAllocated(identifier_value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (identifier_value_.IsDefault()) {
- identifier_value_.Set("", GetArenaForAllocation());
+ if (_impl_.identifier_value_.IsDefault()) {
+ _impl_.identifier_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
@@ -13795,26 +13930,26 @@ inline void UninterpretedOption::set_allocated_identifier_value(TProtoStringType
// optional uint64 positive_int_value = 4;
inline bool UninterpretedOption::_internal_has_positive_int_value() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
return value;
}
inline bool UninterpretedOption::has_positive_int_value() const {
return _internal_has_positive_int_value();
}
inline void UninterpretedOption::clear_positive_int_value() {
- positive_int_value_ = arc_ui64{0u};
- _has_bits_[0] &= ~0x00000008u;
+ _impl_.positive_int_value_ = arc_ui64{0u};
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline arc_ui64 UninterpretedOption::_internal_positive_int_value() const {
- return positive_int_value_;
+ return _impl_.positive_int_value_;
}
inline arc_ui64 UninterpretedOption::positive_int_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value)
return _internal_positive_int_value();
}
inline void UninterpretedOption::_internal_set_positive_int_value(arc_ui64 value) {
- _has_bits_[0] |= 0x00000008u;
- positive_int_value_ = value;
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.positive_int_value_ = value;
}
inline void UninterpretedOption::set_positive_int_value(arc_ui64 value) {
_internal_set_positive_int_value(value);
@@ -13823,26 +13958,26 @@ inline void UninterpretedOption::set_positive_int_value(arc_ui64 value) {
// optional int64 negative_int_value = 5;
inline bool UninterpretedOption::_internal_has_negative_int_value() const {
- bool value = (_has_bits_[0] & 0x00000010u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
return value;
}
inline bool UninterpretedOption::has_negative_int_value() const {
return _internal_has_negative_int_value();
}
inline void UninterpretedOption::clear_negative_int_value() {
- negative_int_value_ = arc_i64{0};
- _has_bits_[0] &= ~0x00000010u;
+ _impl_.negative_int_value_ = arc_i64{0};
+ _impl_._has_bits_[0] &= ~0x00000010u;
}
inline arc_i64 UninterpretedOption::_internal_negative_int_value() const {
- return negative_int_value_;
+ return _impl_.negative_int_value_;
}
inline arc_i64 UninterpretedOption::negative_int_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value)
return _internal_negative_int_value();
}
inline void UninterpretedOption::_internal_set_negative_int_value(arc_i64 value) {
- _has_bits_[0] |= 0x00000010u;
- negative_int_value_ = value;
+ _impl_._has_bits_[0] |= 0x00000010u;
+ _impl_.negative_int_value_ = value;
}
inline void UninterpretedOption::set_negative_int_value(arc_i64 value) {
_internal_set_negative_int_value(value);
@@ -13851,26 +13986,26 @@ inline void UninterpretedOption::set_negative_int_value(arc_i64 value) {
// optional double double_value = 6;
inline bool UninterpretedOption::_internal_has_double_value() const {
- bool value = (_has_bits_[0] & 0x00000020u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
return value;
}
inline bool UninterpretedOption::has_double_value() const {
return _internal_has_double_value();
}
inline void UninterpretedOption::clear_double_value() {
- double_value_ = 0;
- _has_bits_[0] &= ~0x00000020u;
+ _impl_.double_value_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000020u;
}
inline double UninterpretedOption::_internal_double_value() const {
- return double_value_;
+ return _impl_.double_value_;
}
inline double UninterpretedOption::double_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value)
return _internal_double_value();
}
inline void UninterpretedOption::_internal_set_double_value(double value) {
- _has_bits_[0] |= 0x00000020u;
- double_value_ = value;
+ _impl_._has_bits_[0] |= 0x00000020u;
+ _impl_.double_value_ = value;
}
inline void UninterpretedOption::set_double_value(double value) {
_internal_set_double_value(value);
@@ -13879,15 +14014,15 @@ inline void UninterpretedOption::set_double_value(double value) {
// optional bytes string_value = 7;
inline bool UninterpretedOption::_internal_has_string_value() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool UninterpretedOption::has_string_value() const {
return _internal_has_string_value();
}
inline void UninterpretedOption::clear_string_value() {
- string_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.string_value_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& UninterpretedOption::string_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
@@ -13896,8 +14031,8 @@ inline const TProtoStringType& UninterpretedOption::string_value() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void UninterpretedOption::set_string_value(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- string_value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.string_value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value)
}
inline TProtoStringType* UninterpretedOption::mutable_string_value() {
@@ -13906,40 +14041,40 @@ inline TProtoStringType* UninterpretedOption::mutable_string_value() {
return _s;
}
inline const TProtoStringType& UninterpretedOption::_internal_string_value() const {
- return string_value_.Get();
+ return _impl_.string_value_.Get();
}
inline void UninterpretedOption::_internal_set_string_value(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- string_value_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.string_value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption::_internal_mutable_string_value() {
- _has_bits_[0] |= 0x00000002u;
- return string_value_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.string_value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption::release_string_value() {
// @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.string_value)
if (!_internal_has_string_value()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = string_value_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.string_value_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (string_value_.IsDefault()) {
- string_value_.Set("", GetArenaForAllocation());
+ if (_impl_.string_value_.IsDefault()) {
+ _impl_.string_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void UninterpretedOption::set_allocated_string_value(TProtoStringType* string_value) {
if (string_value != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- string_value_.SetAllocated(string_value, GetArenaForAllocation());
+ _impl_.string_value_.SetAllocated(string_value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (string_value_.IsDefault()) {
- string_value_.Set("", GetArenaForAllocation());
+ if (_impl_.string_value_.IsDefault()) {
+ _impl_.string_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
@@ -13947,15 +14082,15 @@ inline void UninterpretedOption::set_allocated_string_value(TProtoStringType* st
// optional string aggregate_value = 8;
inline bool UninterpretedOption::_internal_has_aggregate_value() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool UninterpretedOption::has_aggregate_value() const {
return _internal_has_aggregate_value();
}
inline void UninterpretedOption::clear_aggregate_value() {
- aggregate_value_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.aggregate_value_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& UninterpretedOption::aggregate_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
@@ -13964,8 +14099,8 @@ inline const TProtoStringType& UninterpretedOption::aggregate_value() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void UninterpretedOption::set_aggregate_value(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000004u;
- aggregate_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.aggregate_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value)
}
inline TProtoStringType* UninterpretedOption::mutable_aggregate_value() {
@@ -13974,40 +14109,40 @@ inline TProtoStringType* UninterpretedOption::mutable_aggregate_value() {
return _s;
}
inline const TProtoStringType& UninterpretedOption::_internal_aggregate_value() const {
- return aggregate_value_.Get();
+ return _impl_.aggregate_value_.Get();
}
inline void UninterpretedOption::_internal_set_aggregate_value(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000004u;
- aggregate_value_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.aggregate_value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption::_internal_mutable_aggregate_value() {
- _has_bits_[0] |= 0x00000004u;
- return aggregate_value_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ return _impl_.aggregate_value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* UninterpretedOption::release_aggregate_value() {
// @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.aggregate_value)
if (!_internal_has_aggregate_value()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000004u;
- auto* p = aggregate_value_.Release();
+ _impl_._has_bits_[0] &= ~0x00000004u;
+ auto* p = _impl_.aggregate_value_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (aggregate_value_.IsDefault()) {
- aggregate_value_.Set("", GetArenaForAllocation());
+ if (_impl_.aggregate_value_.IsDefault()) {
+ _impl_.aggregate_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void UninterpretedOption::set_allocated_aggregate_value(TProtoStringType* aggregate_value) {
if (aggregate_value != nullptr) {
- _has_bits_[0] |= 0x00000004u;
+ _impl_._has_bits_[0] |= 0x00000004u;
} else {
- _has_bits_[0] &= ~0x00000004u;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
- aggregate_value_.SetAllocated(aggregate_value, GetArenaForAllocation());
+ _impl_.aggregate_value_.SetAllocated(aggregate_value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (aggregate_value_.IsDefault()) {
- aggregate_value_.Set("", GetArenaForAllocation());
+ if (_impl_.aggregate_value_.IsDefault()) {
+ _impl_.aggregate_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
@@ -14019,27 +14154,27 @@ inline void UninterpretedOption::set_allocated_aggregate_value(TProtoStringType*
// repeated int32 path = 1 [packed = true];
inline int SourceCodeInfo_Location::_internal_path_size() const {
- return path_.size();
+ return _impl_.path_.size();
}
inline int SourceCodeInfo_Location::path_size() const {
return _internal_path_size();
}
inline void SourceCodeInfo_Location::clear_path() {
- path_.Clear();
+ _impl_.path_.Clear();
}
inline arc_i32 SourceCodeInfo_Location::_internal_path(int index) const {
- return path_.Get(index);
+ return _impl_.path_.Get(index);
}
inline arc_i32 SourceCodeInfo_Location::path(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path)
return _internal_path(index);
}
inline void SourceCodeInfo_Location::set_path(int index, arc_i32 value) {
- path_.Set(index, value);
+ _impl_.path_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path)
}
inline void SourceCodeInfo_Location::_internal_add_path(arc_i32 value) {
- path_.Add(value);
+ _impl_.path_.Add(value);
}
inline void SourceCodeInfo_Location::add_path(arc_i32 value) {
_internal_add_path(value);
@@ -14047,7 +14182,7 @@ inline void SourceCodeInfo_Location::add_path(arc_i32 value) {
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
SourceCodeInfo_Location::_internal_path() const {
- return path_;
+ return _impl_.path_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
SourceCodeInfo_Location::path() const {
@@ -14056,7 +14191,7 @@ SourceCodeInfo_Location::path() const {
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
SourceCodeInfo_Location::_internal_mutable_path() {
- return &path_;
+ return &_impl_.path_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
SourceCodeInfo_Location::mutable_path() {
@@ -14066,27 +14201,27 @@ SourceCodeInfo_Location::mutable_path() {
// repeated int32 span = 2 [packed = true];
inline int SourceCodeInfo_Location::_internal_span_size() const {
- return span_.size();
+ return _impl_.span_.size();
}
inline int SourceCodeInfo_Location::span_size() const {
return _internal_span_size();
}
inline void SourceCodeInfo_Location::clear_span() {
- span_.Clear();
+ _impl_.span_.Clear();
}
inline arc_i32 SourceCodeInfo_Location::_internal_span(int index) const {
- return span_.Get(index);
+ return _impl_.span_.Get(index);
}
inline arc_i32 SourceCodeInfo_Location::span(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span)
return _internal_span(index);
}
inline void SourceCodeInfo_Location::set_span(int index, arc_i32 value) {
- span_.Set(index, value);
+ _impl_.span_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span)
}
inline void SourceCodeInfo_Location::_internal_add_span(arc_i32 value) {
- span_.Add(value);
+ _impl_.span_.Add(value);
}
inline void SourceCodeInfo_Location::add_span(arc_i32 value) {
_internal_add_span(value);
@@ -14094,7 +14229,7 @@ inline void SourceCodeInfo_Location::add_span(arc_i32 value) {
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
SourceCodeInfo_Location::_internal_span() const {
- return span_;
+ return _impl_.span_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
SourceCodeInfo_Location::span() const {
@@ -14103,7 +14238,7 @@ SourceCodeInfo_Location::span() const {
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
SourceCodeInfo_Location::_internal_mutable_span() {
- return &span_;
+ return &_impl_.span_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
SourceCodeInfo_Location::mutable_span() {
@@ -14113,15 +14248,15 @@ SourceCodeInfo_Location::mutable_span() {
// optional string leading_comments = 3;
inline bool SourceCodeInfo_Location::_internal_has_leading_comments() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool SourceCodeInfo_Location::has_leading_comments() const {
return _internal_has_leading_comments();
}
inline void SourceCodeInfo_Location::clear_leading_comments() {
- leading_comments_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.leading_comments_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& SourceCodeInfo_Location::leading_comments() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
@@ -14130,8 +14265,8 @@ inline const TProtoStringType& SourceCodeInfo_Location::leading_comments() const
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void SourceCodeInfo_Location::set_leading_comments(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- leading_comments_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.leading_comments_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments)
}
inline TProtoStringType* SourceCodeInfo_Location::mutable_leading_comments() {
@@ -14140,40 +14275,40 @@ inline TProtoStringType* SourceCodeInfo_Location::mutable_leading_comments() {
return _s;
}
inline const TProtoStringType& SourceCodeInfo_Location::_internal_leading_comments() const {
- return leading_comments_.Get();
+ return _impl_.leading_comments_.Get();
}
inline void SourceCodeInfo_Location::_internal_set_leading_comments(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- leading_comments_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.leading_comments_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* SourceCodeInfo_Location::_internal_mutable_leading_comments() {
- _has_bits_[0] |= 0x00000001u;
- return leading_comments_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.leading_comments_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* SourceCodeInfo_Location::release_leading_comments() {
// @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.leading_comments)
if (!_internal_has_leading_comments()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = leading_comments_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.leading_comments_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (leading_comments_.IsDefault()) {
- leading_comments_.Set("", GetArenaForAllocation());
+ if (_impl_.leading_comments_.IsDefault()) {
+ _impl_.leading_comments_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void SourceCodeInfo_Location::set_allocated_leading_comments(TProtoStringType* leading_comments) {
if (leading_comments != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- leading_comments_.SetAllocated(leading_comments, GetArenaForAllocation());
+ _impl_.leading_comments_.SetAllocated(leading_comments, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (leading_comments_.IsDefault()) {
- leading_comments_.Set("", GetArenaForAllocation());
+ if (_impl_.leading_comments_.IsDefault()) {
+ _impl_.leading_comments_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
@@ -14181,15 +14316,15 @@ inline void SourceCodeInfo_Location::set_allocated_leading_comments(TProtoString
// optional string trailing_comments = 4;
inline bool SourceCodeInfo_Location::_internal_has_trailing_comments() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool SourceCodeInfo_Location::has_trailing_comments() const {
return _internal_has_trailing_comments();
}
inline void SourceCodeInfo_Location::clear_trailing_comments() {
- trailing_comments_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.trailing_comments_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& SourceCodeInfo_Location::trailing_comments() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
@@ -14198,8 +14333,8 @@ inline const TProtoStringType& SourceCodeInfo_Location::trailing_comments() cons
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void SourceCodeInfo_Location::set_trailing_comments(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- trailing_comments_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.trailing_comments_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments)
}
inline TProtoStringType* SourceCodeInfo_Location::mutable_trailing_comments() {
@@ -14208,40 +14343,40 @@ inline TProtoStringType* SourceCodeInfo_Location::mutable_trailing_comments() {
return _s;
}
inline const TProtoStringType& SourceCodeInfo_Location::_internal_trailing_comments() const {
- return trailing_comments_.Get();
+ return _impl_.trailing_comments_.Get();
}
inline void SourceCodeInfo_Location::_internal_set_trailing_comments(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- trailing_comments_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.trailing_comments_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* SourceCodeInfo_Location::_internal_mutable_trailing_comments() {
- _has_bits_[0] |= 0x00000002u;
- return trailing_comments_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.trailing_comments_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* SourceCodeInfo_Location::release_trailing_comments() {
// @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.trailing_comments)
if (!_internal_has_trailing_comments()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = trailing_comments_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.trailing_comments_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (trailing_comments_.IsDefault()) {
- trailing_comments_.Set("", GetArenaForAllocation());
+ if (_impl_.trailing_comments_.IsDefault()) {
+ _impl_.trailing_comments_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void SourceCodeInfo_Location::set_allocated_trailing_comments(TProtoStringType* trailing_comments) {
if (trailing_comments != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- trailing_comments_.SetAllocated(trailing_comments, GetArenaForAllocation());
+ _impl_.trailing_comments_.SetAllocated(trailing_comments, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (trailing_comments_.IsDefault()) {
- trailing_comments_.Set("", GetArenaForAllocation());
+ if (_impl_.trailing_comments_.IsDefault()) {
+ _impl_.trailing_comments_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
@@ -14249,13 +14384,13 @@ inline void SourceCodeInfo_Location::set_allocated_trailing_comments(TProtoStrin
// repeated string leading_detached_comments = 6;
inline int SourceCodeInfo_Location::_internal_leading_detached_comments_size() const {
- return leading_detached_comments_.size();
+ return _impl_.leading_detached_comments_.size();
}
inline int SourceCodeInfo_Location::leading_detached_comments_size() const {
return _internal_leading_detached_comments_size();
}
inline void SourceCodeInfo_Location::clear_leading_detached_comments() {
- leading_detached_comments_.Clear();
+ _impl_.leading_detached_comments_.Clear();
}
inline TProtoStringType* SourceCodeInfo_Location::add_leading_detached_comments() {
TProtoStringType* _s = _internal_add_leading_detached_comments();
@@ -14263,7 +14398,7 @@ inline TProtoStringType* SourceCodeInfo_Location::add_leading_detached_comments(
return _s;
}
inline const TProtoStringType& SourceCodeInfo_Location::_internal_leading_detached_comments(int index) const {
- return leading_detached_comments_.Get(index);
+ return _impl_.leading_detached_comments_.Get(index);
}
inline const TProtoStringType& SourceCodeInfo_Location::leading_detached_comments(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
@@ -14271,55 +14406,55 @@ inline const TProtoStringType& SourceCodeInfo_Location::leading_detached_comment
}
inline TProtoStringType* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
- return leading_detached_comments_.Mutable(index);
+ return _impl_.leading_detached_comments_.Mutable(index);
}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const TProtoStringType& value) {
- leading_detached_comments_.Mutable(index)->assign(value);
+ _impl_.leading_detached_comments_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, TProtoStringType&& value) {
- leading_detached_comments_.Mutable(index)->assign(std::move(value));
+ _impl_.leading_detached_comments_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- leading_detached_comments_.Mutable(index)->assign(value);
+ _impl_.leading_detached_comments_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) {
- leading_detached_comments_.Mutable(index)->assign(
+ _impl_.leading_detached_comments_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline TProtoStringType* SourceCodeInfo_Location::_internal_add_leading_detached_comments() {
- return leading_detached_comments_.Add();
+ return _impl_.leading_detached_comments_.Add();
}
inline void SourceCodeInfo_Location::add_leading_detached_comments(const TProtoStringType& value) {
- leading_detached_comments_.Add()->assign(value);
+ _impl_.leading_detached_comments_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::add_leading_detached_comments(TProtoStringType&& value) {
- leading_detached_comments_.Add(std::move(value));
+ _impl_.leading_detached_comments_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- leading_detached_comments_.Add()->assign(value);
+ _impl_.leading_detached_comments_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) {
- leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
SourceCodeInfo_Location::leading_detached_comments() const {
// @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
- return leading_detached_comments_;
+ return _impl_.leading_detached_comments_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
SourceCodeInfo_Location::mutable_leading_detached_comments() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
- return &leading_detached_comments_;
+ return &_impl_.leading_detached_comments_;
}
// -------------------------------------------------------------------
@@ -14328,32 +14463,32 @@ SourceCodeInfo_Location::mutable_leading_detached_comments() {
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
inline int SourceCodeInfo::_internal_location_size() const {
- return location_.size();
+ return _impl_.location_.size();
}
inline int SourceCodeInfo::location_size() const {
return _internal_location_size();
}
inline void SourceCodeInfo::clear_location() {
- location_.Clear();
+ _impl_.location_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location)
- return location_.Mutable(index);
+ return _impl_.location_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >*
SourceCodeInfo::mutable_location() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location)
- return &location_;
+ return &_impl_.location_;
}
inline const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& SourceCodeInfo::_internal_location(int index) const {
- return location_.Get(index);
+ return _impl_.location_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location)
return _internal_location(index);
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::_internal_add_location() {
- return location_.Add();
+ return _impl_.location_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::add_location() {
::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* _add = _internal_add_location();
@@ -14363,7 +14498,7 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::add_loc
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >&
SourceCodeInfo::location() const {
// @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
- return location_;
+ return _impl_.location_;
}
// -------------------------------------------------------------------
@@ -14372,27 +14507,27 @@ SourceCodeInfo::location() const {
// repeated int32 path = 1 [packed = true];
inline int GeneratedCodeInfo_Annotation::_internal_path_size() const {
- return path_.size();
+ return _impl_.path_.size();
}
inline int GeneratedCodeInfo_Annotation::path_size() const {
return _internal_path_size();
}
inline void GeneratedCodeInfo_Annotation::clear_path() {
- path_.Clear();
+ _impl_.path_.Clear();
}
inline arc_i32 GeneratedCodeInfo_Annotation::_internal_path(int index) const {
- return path_.Get(index);
+ return _impl_.path_.Get(index);
}
inline arc_i32 GeneratedCodeInfo_Annotation::path(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path)
return _internal_path(index);
}
inline void GeneratedCodeInfo_Annotation::set_path(int index, arc_i32 value) {
- path_.Set(index, value);
+ _impl_.path_.Set(index, value);
// @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path)
}
inline void GeneratedCodeInfo_Annotation::_internal_add_path(arc_i32 value) {
- path_.Add(value);
+ _impl_.path_.Add(value);
}
inline void GeneratedCodeInfo_Annotation::add_path(arc_i32 value) {
_internal_add_path(value);
@@ -14400,7 +14535,7 @@ inline void GeneratedCodeInfo_Annotation::add_path(arc_i32 value) {
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
GeneratedCodeInfo_Annotation::_internal_path() const {
- return path_;
+ return _impl_.path_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >&
GeneratedCodeInfo_Annotation::path() const {
@@ -14409,7 +14544,7 @@ GeneratedCodeInfo_Annotation::path() const {
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
GeneratedCodeInfo_Annotation::_internal_mutable_path() {
- return &path_;
+ return &_impl_.path_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< arc_i32 >*
GeneratedCodeInfo_Annotation::mutable_path() {
@@ -14419,15 +14554,15 @@ GeneratedCodeInfo_Annotation::mutable_path() {
// optional string source_file = 2;
inline bool GeneratedCodeInfo_Annotation::_internal_has_source_file() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool GeneratedCodeInfo_Annotation::has_source_file() const {
return _internal_has_source_file();
}
inline void GeneratedCodeInfo_Annotation::clear_source_file() {
- source_file_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.source_file_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& GeneratedCodeInfo_Annotation::source_file() const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
@@ -14436,8 +14571,8 @@ inline const TProtoStringType& GeneratedCodeInfo_Annotation::source_file() const
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void GeneratedCodeInfo_Annotation::set_source_file(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- source_file_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.source_file_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
}
inline TProtoStringType* GeneratedCodeInfo_Annotation::mutable_source_file() {
@@ -14446,40 +14581,40 @@ inline TProtoStringType* GeneratedCodeInfo_Annotation::mutable_source_file() {
return _s;
}
inline const TProtoStringType& GeneratedCodeInfo_Annotation::_internal_source_file() const {
- return source_file_.Get();
+ return _impl_.source_file_.Get();
}
inline void GeneratedCodeInfo_Annotation::_internal_set_source_file(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- source_file_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.source_file_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* GeneratedCodeInfo_Annotation::_internal_mutable_source_file() {
- _has_bits_[0] |= 0x00000001u;
- return source_file_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.source_file_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* GeneratedCodeInfo_Annotation::release_source_file() {
// @@protoc_insertion_point(field_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
if (!_internal_has_source_file()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = source_file_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.source_file_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (source_file_.IsDefault()) {
- source_file_.Set("", GetArenaForAllocation());
+ if (_impl_.source_file_.IsDefault()) {
+ _impl_.source_file_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(TProtoStringType* source_file) {
if (source_file != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- source_file_.SetAllocated(source_file, GetArenaForAllocation());
+ _impl_.source_file_.SetAllocated(source_file, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (source_file_.IsDefault()) {
- source_file_.Set("", GetArenaForAllocation());
+ if (_impl_.source_file_.IsDefault()) {
+ _impl_.source_file_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
@@ -14487,26 +14622,26 @@ inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(TProtoString
// optional int32 begin = 3;
inline bool GeneratedCodeInfo_Annotation::_internal_has_begin() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool GeneratedCodeInfo_Annotation::has_begin() const {
return _internal_has_begin();
}
inline void GeneratedCodeInfo_Annotation::clear_begin() {
- begin_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.begin_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline arc_i32 GeneratedCodeInfo_Annotation::_internal_begin() const {
- return begin_;
+ return _impl_.begin_;
}
inline arc_i32 GeneratedCodeInfo_Annotation::begin() const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin)
return _internal_begin();
}
inline void GeneratedCodeInfo_Annotation::_internal_set_begin(arc_i32 value) {
- _has_bits_[0] |= 0x00000002u;
- begin_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.begin_ = value;
}
inline void GeneratedCodeInfo_Annotation::set_begin(arc_i32 value) {
_internal_set_begin(value);
@@ -14515,26 +14650,26 @@ inline void GeneratedCodeInfo_Annotation::set_begin(arc_i32 value) {
// optional int32 end = 4;
inline bool GeneratedCodeInfo_Annotation::_internal_has_end() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool GeneratedCodeInfo_Annotation::has_end() const {
return _internal_has_end();
}
inline void GeneratedCodeInfo_Annotation::clear_end() {
- end_ = 0;
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.end_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline arc_i32 GeneratedCodeInfo_Annotation::_internal_end() const {
- return end_;
+ return _impl_.end_;
}
inline arc_i32 GeneratedCodeInfo_Annotation::end() const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end)
return _internal_end();
}
inline void GeneratedCodeInfo_Annotation::_internal_set_end(arc_i32 value) {
- _has_bits_[0] |= 0x00000004u;
- end_ = value;
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.end_ = value;
}
inline void GeneratedCodeInfo_Annotation::set_end(arc_i32 value) {
_internal_set_end(value);
@@ -14547,32 +14682,32 @@ inline void GeneratedCodeInfo_Annotation::set_end(arc_i32 value) {
// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
inline int GeneratedCodeInfo::_internal_annotation_size() const {
- return annotation_.size();
+ return _impl_.annotation_.size();
}
inline int GeneratedCodeInfo::annotation_size() const {
return _internal_annotation_size();
}
inline void GeneratedCodeInfo::clear_annotation() {
- annotation_.Clear();
+ _impl_.annotation_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::mutable_annotation(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.annotation)
- return annotation_.Mutable(index);
+ return _impl_.annotation_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >*
GeneratedCodeInfo::mutable_annotation() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation)
- return &annotation_;
+ return &_impl_.annotation_;
}
inline const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::_internal_annotation(int index) const {
- return annotation_.Get(index);
+ return _impl_.annotation_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::annotation(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.annotation)
return _internal_annotation(index);
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::_internal_add_annotation() {
- return annotation_.Add();
+ return _impl_.annotation_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() {
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* _add = _internal_add_annotation();
@@ -14582,7 +14717,7 @@ inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo:
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >&
GeneratedCodeInfo::annotation() const {
// @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.annotation)
- return annotation_;
+ return _impl_.annotation_;
}
#ifdef __GNUC__
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.proto b/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
index 49ec6534b1..f8eb216cdc 100644
--- a/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
@@ -740,8 +740,8 @@ message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
- // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
- // "foo.(bar.baz).qux".
+ // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+ // "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;
required bool is_extension = 2;
@@ -868,13 +868,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
- // // Comment attached to qux.
+ // // Comment attached to moo.
// //
- // // Another line attached to qux.
- // optional double qux = 4;
+ // // Another line attached to moo.
+ // optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
+ // // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
diff --git a/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc b/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
index d2cd15f04a..f1c91ffcda 100644
--- a/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
@@ -22,9 +22,10 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Duration::Duration(
- ::_pbi::ConstantInitialized)
- : seconds_(arc_i64{0})
- , nanos_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.seconds_)*/arc_i64{0}
+ , /*decltype(_impl_.nanos_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct DurationDefaultTypeInternal {
PROTOBUF_CONSTEXPR DurationDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -46,8 +47,8 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTO
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, seconds_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, nanos_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, _impl_.seconds_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Duration, _impl_.nanos_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Duration)},
@@ -91,23 +92,33 @@ class Duration::_Internal {
Duration::Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Duration)
}
Duration::Duration(const Duration& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Duration* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.seconds_){}
+ , decltype(_impl_.nanos_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&seconds_, &from.seconds_,
- static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+ ::memcpy(&_impl_.seconds_, &from._impl_.seconds_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.nanos_) -
+ reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Duration)
}
-inline void Duration::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&seconds_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+inline void Duration::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.seconds_){arc_i64{0}}
+ , decltype(_impl_.nanos_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
Duration::~Duration() {
@@ -124,7 +135,7 @@ inline void Duration::SharedDtor() {
}
void Duration::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Duration::Clear() {
@@ -133,9 +144,9 @@ void Duration::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- ::memset(&seconds_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+ ::memset(&_impl_.seconds_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.nanos_) -
+ reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -148,7 +159,7 @@ const char* Duration::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
// int64 seconds = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -156,7 +167,7 @@ const char* Duration::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
// int32 nanos = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -228,35 +239,31 @@ size_t Duration::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_nanos());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Duration::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Duration::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Duration::GetClassData() const { return &_class_data_; }
-void Duration::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Duration *>(to)->MergeFrom(
- static_cast<const Duration &>(from));
-}
-
-void Duration::MergeFrom(const Duration& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Duration)
- GOOGLE_DCHECK_NE(&from, this);
+void Duration::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Duration*>(&to_msg);
+ auto& from = static_cast<const Duration&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Duration)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_seconds() != 0) {
- _internal_set_seconds(from._internal_seconds());
+ _this->_internal_set_seconds(from._internal_seconds());
}
if (from._internal_nanos() != 0) {
- _internal_set_nanos(from._internal_nanos());
+ _this->_internal_set_nanos(from._internal_nanos());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Duration::CopyFrom(const Duration& from) {
@@ -274,11 +281,11 @@ void Duration::InternalSwap(Duration* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Duration, nanos_)
- + sizeof(Duration::nanos_)
- - PROTOBUF_FIELD_OFFSET(Duration, seconds_)>(
- reinterpret_cast<char*>(&seconds_),
- reinterpret_cast<char*>(&other->seconds_));
+ PROTOBUF_FIELD_OFFSET(Duration, _impl_.nanos_)
+ + sizeof(Duration::_impl_.nanos_)
+ - PROTOBUF_FIELD_OFFSET(Duration, _impl_.seconds_)>(
+ reinterpret_cast<char*>(&_impl_.seconds_),
+ reinterpret_cast<char*>(&other->_impl_.seconds_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Duration::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/duration.pb.h b/contrib/libs/protobuf/src/google/protobuf/duration.pb.h
index 553046eeba..fd1709ea6e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/duration.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/duration.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -136,9 +136,11 @@ class PROTOBUF_EXPORT Duration final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Duration& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Duration& from);
+ void MergeFrom( const Duration& from) {
+ Duration::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -147,10 +149,10 @@ class PROTOBUF_EXPORT Duration final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Duration* other);
@@ -203,9 +205,12 @@ class PROTOBUF_EXPORT Duration final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- arc_i64 seconds_;
- arc_i32 nanos_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ arc_i64 seconds_;
+ arc_i32 nanos_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fduration_2eproto;
};
// ===================================================================
@@ -221,10 +226,10 @@ class PROTOBUF_EXPORT Duration final :
// int64 seconds = 1;
inline void Duration::clear_seconds() {
- seconds_ = arc_i64{0};
+ _impl_.seconds_ = arc_i64{0};
}
inline arc_i64 Duration::_internal_seconds() const {
- return seconds_;
+ return _impl_.seconds_;
}
inline arc_i64 Duration::seconds() const {
// @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds)
@@ -232,7 +237,7 @@ inline arc_i64 Duration::seconds() const {
}
inline void Duration::_internal_set_seconds(arc_i64 value) {
- seconds_ = value;
+ _impl_.seconds_ = value;
}
inline void Duration::set_seconds(arc_i64 value) {
_internal_set_seconds(value);
@@ -241,10 +246,10 @@ inline void Duration::set_seconds(arc_i64 value) {
// int32 nanos = 2;
inline void Duration::clear_nanos() {
- nanos_ = 0;
+ _impl_.nanos_ = 0;
}
inline arc_i32 Duration::_internal_nanos() const {
- return nanos_;
+ return _impl_.nanos_;
}
inline arc_i32 Duration::nanos() const {
// @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos)
@@ -252,7 +257,7 @@ inline arc_i32 Duration::nanos() const {
}
inline void Duration::_internal_set_nanos(arc_i32 value) {
- nanos_ = value;
+ _impl_.nanos_ = value;
}
inline void Duration::set_nanos(arc_i32 value) {
_internal_set_nanos(value);
diff --git a/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc b/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
index 3db5dbaab8..c1848155e1 100644
--- a/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
@@ -22,7 +22,7 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Empty::Empty(
- ::_pbi::ConstantInitialized){}
+ ::_pbi::ConstantInitialized) {}
struct EmptyDefaultTypeInternal {
PROTOBUF_CONSTEXPR EmptyDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -90,6 +90,7 @@ Empty::Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
Empty::Empty(const Empty& from)
: ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() {
+ Empty* const _this = this; (void)_this;
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.Empty)
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/empty.pb.h b/contrib/libs/protobuf/src/google/protobuf/empty.pb.h
index 36f15c557f..53f9983cb2 100644
--- a/contrib/libs/protobuf/src/google/protobuf/empty.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/empty.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -135,11 +135,11 @@ class PROTOBUF_EXPORT Empty final :
}
using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom;
inline void CopyFrom(const Empty& from) {
- ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(this, from);
+ ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from);
}
using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom;
void MergeFrom(const Empty& from) {
- ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(this, from);
+ ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from);
}
public:
@@ -169,6 +169,8 @@ class PROTOBUF_EXPORT Empty final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
+ struct Impl_ {
+ };
friend struct ::TableStruct_google_2fprotobuf_2fempty_2eproto;
};
// ===================================================================
diff --git a/contrib/libs/protobuf/src/google/protobuf/empty.proto b/contrib/libs/protobuf/src/google/protobuf/empty.proto
index 5f992de94a..2227462198 100644
--- a/contrib/libs/protobuf/src/google/protobuf/empty.proto
+++ b/contrib/libs/protobuf/src/google/protobuf/empty.proto
@@ -48,5 +48,4 @@ option cc_enable_arenas = true;
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
// }
//
-// The JSON representation for `Empty` is empty JSON object `{}`.
message Empty {}
diff --git a/contrib/libs/protobuf/src/google/protobuf/endian.h b/contrib/libs/protobuf/src/google/protobuf/endian.h
new file mode 100644
index 0000000000..ef032c06fb
--- /dev/null
+++ b/contrib/libs/protobuf/src/google/protobuf/endian.h
@@ -0,0 +1,198 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GOOGLE_PROTOBUF_ENDIAN_H__
+#define GOOGLE_PROTOBUF_ENDIAN_H__
+
+#if defined(_MSC_VER)
+#include <stdlib.h>
+#endif
+
+#include <cstdint>
+
+// Must be included last.
+#include <google/protobuf/port_def.inc>
+
+namespace google {
+namespace protobuf {
+namespace internal {
+
+inline arc_ui64 BSwap64(arc_ui64 host_int) {
+#if defined(PROTOBUF_BUILTIN_BSWAP64)
+ return PROTOBUF_BUILTIN_BSWAP64(host_int);
+#elif defined(_MSC_VER)
+ return _byteswap_uint64(host_int);
+#else
+ return (((host_int & arc_ui64{0xFF}) << 56) |
+ ((host_int & arc_ui64{0xFF00}) << 40) |
+ ((host_int & arc_ui64{0xFF0000}) << 24) |
+ ((host_int & arc_ui64{0xFF000000}) << 8) |
+ ((host_int & arc_ui64{0xFF00000000}) >> 8) |
+ ((host_int & arc_ui64{0xFF0000000000}) >> 24) |
+ ((host_int & arc_ui64{0xFF000000000000}) >> 40) |
+ ((host_int & arc_ui64{0xFF00000000000000}) >> 56));
+#endif
+}
+
+inline arc_ui32 BSwap32(arc_ui32 host_int) {
+#if defined(PROTOBUF_BUILTIN_BSWAP32)
+ return PROTOBUF_BUILTIN_BSWAP32(host_int);
+#elif defined(_MSC_VER)
+ return _byteswap_ulong(host_int);
+#else
+ return (((host_int & arc_ui32{0xFF}) << 24) |
+ ((host_int & arc_ui32{0xFF00}) << 8) |
+ ((host_int & arc_ui32{0xFF0000}) >> 8) |
+ ((host_int & arc_ui32{0xFF000000}) >> 24));
+#endif
+}
+
+inline uint16_t BSwap16(uint16_t host_int) {
+#if defined(PROTOBUF_BUILTIN_BSWAP16)
+ return PROTOBUF_BUILTIN_BSWAP16(host_int);
+#elif defined(_MSC_VER)
+ return _byteswap_ushort(host_int);
+#else
+ return (((host_int & uint16_t{0xFF}) << 8) |
+ ((host_int & uint16_t{0xFF00}) >> 8));
+#endif
+}
+
+namespace little_endian {
+
+inline uint16_t FromHost(uint16_t value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return BSwap16(value);
+#else
+ return value;
+#endif
+}
+
+inline arc_ui32 FromHost(arc_ui32 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return BSwap32(value);
+#else
+ return value;
+#endif
+}
+
+inline arc_ui64 FromHost(arc_ui64 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return BSwap64(value);
+#else
+ return value;
+#endif
+}
+
+inline uint16_t ToHost(uint16_t value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return BSwap16(value);
+#else
+ return value;
+#endif
+}
+
+inline arc_ui32 ToHost(arc_ui32 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return BSwap32(value);
+#else
+ return value;
+#endif
+}
+
+inline arc_ui64 ToHost(arc_ui64 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return BSwap64(value);
+#else
+ return value;
+#endif
+}
+
+} // namespace little_endian
+
+namespace big_endian {
+
+inline uint16_t FromHost(uint16_t value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return value;
+#else
+ return BSwap16(value);
+#endif
+}
+
+inline arc_ui32 FromHost(arc_ui32 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return value;
+#else
+ return BSwap32(value);
+#endif
+}
+
+inline arc_ui64 FromHost(arc_ui64 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return value;
+#else
+ return BSwap64(value);
+#endif
+}
+
+inline uint16_t ToHost(uint16_t value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return value;
+#else
+ return BSwap16(value);
+#endif
+}
+
+inline arc_ui32 ToHost(arc_ui32 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return value;
+#else
+ return BSwap32(value);
+#endif
+}
+
+inline arc_ui64 ToHost(arc_ui64 value) {
+#if defined(PROTOBUF_BIG_ENDIAN)
+ return value;
+#else
+ return BSwap64(value);
+#endif
+}
+
+} // namespace big_endian
+
+} // namespace internal
+} // namespace protobuf
+} // namespace google
+
+#include <google/protobuf/port_undef.inc>
+
+#endif // GOOGLE_PROTOBUF_ENDIAN_H__
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set.cc b/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
index 67f4c677de..d41ae5fbd7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
@@ -69,24 +69,6 @@ inline WireFormatLite::CppType cpp_type(FieldType type) {
return WireFormatLite::FieldTypeToCppType(real_type(type));
}
-inline bool is_packable(WireFormatLite::WireType type) {
- switch (type) {
- case WireFormatLite::WIRETYPE_VARINT:
- case WireFormatLite::WIRETYPE_FIXED64:
- case WireFormatLite::WIRETYPE_FIXED32:
- return true;
- case WireFormatLite::WIRETYPE_LENGTH_DELIMITED:
- case WireFormatLite::WIRETYPE_START_GROUP:
- case WireFormatLite::WIRETYPE_END_GROUP:
- return false;
-
- // Do not add a default statement. Let the compiler complain when someone
- // adds a new wire type.
- }
- GOOGLE_LOG(FATAL) << "can't reach here.";
- return false;
-}
-
// Registry stuff.
// Note that we cannot use hetererogeneous lookup for std containers since we
@@ -139,8 +121,6 @@ const ExtensionInfo* FindRegisteredExtension(const MessageLite* extendee,
} // namespace
-ExtensionFinder::~ExtensionFinder() {}
-
bool GeneratedExtensionFinder::Find(int number, ExtensionInfo* output) {
const ExtensionInfo* extension = FindRegisteredExtension(extendee_, number);
if (extension == nullptr) {
@@ -949,23 +929,35 @@ void ExtensionSet::Clear() {
}
namespace {
-// Computes the size of a std::set_union without constructing the union.
+// Computes the size of an ExtensionSet union without actually constructing the
+// union. Note that we do not count cleared extensions from the source to be
+// part of the total, because there is no need to allocate space for those. We
+// do include cleared extensions in the destination, though, because those are
+// already allocated and will not be going away.
template <typename ItX, typename ItY>
-size_t SizeOfUnion(ItX it_xs, ItX end_xs, ItY it_ys, ItY end_ys) {
+size_t SizeOfUnion(ItX it_dest, ItX end_dest, ItY it_source, ItY end_source) {
size_t result = 0;
- while (it_xs != end_xs && it_ys != end_ys) {
- ++result;
- if (it_xs->first < it_ys->first) {
- ++it_xs;
- } else if (it_xs->first == it_ys->first) {
- ++it_xs;
- ++it_ys;
+ while (it_dest != end_dest && it_source != end_source) {
+ if (it_dest->first < it_source->first) {
+ ++result;
+ ++it_dest;
+ } else if (it_dest->first == it_source->first) {
+ ++result;
+ ++it_dest;
+ ++it_source;
} else {
- ++it_ys;
+ if (!it_source->second.is_cleared) {
+ ++result;
+ }
+ ++it_source;
+ }
+ }
+ result += std::distance(it_dest, end_dest);
+ for (; it_source != end_source; ++it_source) {
+ if (!it_source->second.is_cleared) {
+ ++result;
}
}
- result += std::distance(it_xs, end_xs);
- result += std::distance(it_ys, end_ys);
return result;
}
} // namespace
@@ -1235,40 +1227,6 @@ bool ExtensionSet::IsInitialized() const {
return true;
}
-bool ExtensionSet::FindExtensionInfoFromTag(arc_ui32 tag,
- ExtensionFinder* extension_finder,
- int* field_number,
- ExtensionInfo* extension,
- bool* was_packed_on_wire) {
- *field_number = WireFormatLite::GetTagFieldNumber(tag);
- WireFormatLite::WireType wire_type = WireFormatLite::GetTagWireType(tag);
- return FindExtensionInfoFromFieldNumber(wire_type, *field_number,
- extension_finder, extension,
- was_packed_on_wire);
-}
-
-bool ExtensionSet::FindExtensionInfoFromFieldNumber(
- int wire_type, int field_number, ExtensionFinder* extension_finder,
- ExtensionInfo* extension, bool* was_packed_on_wire) const {
- if (!extension_finder->Find(field_number, extension)) {
- return false;
- }
-
- WireFormatLite::WireType expected_wire_type =
- WireFormatLite::WireTypeForFieldType(real_type(extension->type));
-
- // Check if this is a packed field.
- *was_packed_on_wire = false;
- if (extension->is_repeated &&
- wire_type == WireFormatLite::WIRETYPE_LENGTH_DELIMITED &&
- is_packable(expected_wire_type)) {
- *was_packed_on_wire = true;
- return true;
- }
- // Otherwise the wire type must match.
- return expected_wire_type == wire_type;
-}
-
const char* ExtensionSet::ParseField(arc_ui64 tag, const char* ptr,
const MessageLite* extendee,
internal::InternalMetadata* metadata,
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set.h b/contrib/libs/protobuf/src/google/protobuf/extension_set.h
index 327705631d..2067b38169 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set.h
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set.h
@@ -147,26 +147,20 @@ struct ExtensionInfo {
LazyEagerVerifyFnType lazy_eager_verify_func = nullptr;
};
-// Abstract interface for an object which looks up extension definitions. Used
-// when parsing.
-class PROTOBUF_EXPORT ExtensionFinder {
- public:
- virtual ~ExtensionFinder();
-
- // Find the extension with the given containing type and number.
- virtual bool Find(int number, ExtensionInfo* output) = 0;
-};
+// An ExtensionFinder is an object which looks up extension definitions. It
+// must implement this method:
+//
+// bool Find(int number, ExtensionInfo* output);
-// Implementation of ExtensionFinder which finds extensions defined in .proto
-// files which have been compiled into the binary.
-class PROTOBUF_EXPORT GeneratedExtensionFinder : public ExtensionFinder {
+// GeneratedExtensionFinder is an ExtensionFinder which finds extensions
+// defined in .proto files which have been compiled into the binary.
+class PROTOBUF_EXPORT GeneratedExtensionFinder {
public:
explicit GeneratedExtensionFinder(const MessageLite* extendee)
: extendee_(extendee) {}
- ~GeneratedExtensionFinder() override {}
// Returns true and fills in *output if found, otherwise returns false.
- bool Find(int number, ExtensionInfo* output) override;
+ bool Find(int number, ExtensionInfo* output);
private:
const MessageLite* extendee_;
@@ -746,22 +740,71 @@ class PROTOBUF_EXPORT ExtensionSet {
const Extension& other_extension,
Arena* other_arena);
+ inline static bool is_packable(WireFormatLite::WireType type) {
+ switch (type) {
+ case WireFormatLite::WIRETYPE_VARINT:
+ case WireFormatLite::WIRETYPE_FIXED64:
+ case WireFormatLite::WIRETYPE_FIXED32:
+ return true;
+ case WireFormatLite::WIRETYPE_LENGTH_DELIMITED:
+ case WireFormatLite::WIRETYPE_START_GROUP:
+ case WireFormatLite::WIRETYPE_END_GROUP:
+ return false;
+
+ // Do not add a default statement. Let the compiler complain when
+ // someone
+ // adds a new wire type.
+ }
+ PROTOBUF_ASSUME(false); // switch handles all possible enum values
+ return false;
+ }
+
// Returns true and fills field_number and extension if extension is found.
// Note to support packed repeated field compatibility, it also fills whether
// the tag on wire is packed, which can be different from
// extension->is_packed (whether packed=true is specified).
+ template <typename ExtensionFinder>
bool FindExtensionInfoFromTag(arc_ui32 tag, ExtensionFinder* extension_finder,
int* field_number, ExtensionInfo* extension,
- bool* was_packed_on_wire);
+ bool* was_packed_on_wire) {
+ *field_number = WireFormatLite::GetTagFieldNumber(tag);
+ WireFormatLite::WireType wire_type = WireFormatLite::GetTagWireType(tag);
+ return FindExtensionInfoFromFieldNumber(wire_type, *field_number,
+ extension_finder, extension,
+ was_packed_on_wire);
+ }
// Returns true and fills extension if extension is found.
// Note to support packed repeated field compatibility, it also fills whether
// the tag on wire is packed, which can be different from
// extension->is_packed (whether packed=true is specified).
+ template <typename ExtensionFinder>
bool FindExtensionInfoFromFieldNumber(int wire_type, int field_number,
ExtensionFinder* extension_finder,
ExtensionInfo* extension,
- bool* was_packed_on_wire) const;
+ bool* was_packed_on_wire) const {
+ if (!extension_finder->Find(field_number, extension)) {
+ return false;
+ }
+
+ GOOGLE_DCHECK(extension->type > 0 &&
+ extension->type <= WireFormatLite::MAX_FIELD_TYPE);
+ auto real_type = static_cast<WireFormatLite::FieldType>(extension->type);
+
+ WireFormatLite::WireType expected_wire_type =
+ WireFormatLite::WireTypeForFieldType(real_type);
+
+ // Check if this is a packed field.
+ *was_packed_on_wire = false;
+ if (extension->is_repeated &&
+ wire_type == WireFormatLite::WIRETYPE_LENGTH_DELIMITED &&
+ is_packable(expected_wire_type)) {
+ *was_packed_on_wire = true;
+ return true;
+ }
+ // Otherwise the wire type must match.
+ return expected_wire_type == wire_type;
+ }
// Find the prototype for a LazyMessage from the extension registry. Returns
// null if the extension is not found.
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc b/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
index 56d93bc95b..95ce1ea964 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
@@ -61,15 +61,14 @@ namespace internal {
// Implementation of ExtensionFinder which finds extensions in a given
// DescriptorPool, using the given MessageFactory to construct sub-objects.
// This class is implemented in extension_set_heavy.cc.
-class DescriptorPoolExtensionFinder : public ExtensionFinder {
+class DescriptorPoolExtensionFinder {
public:
DescriptorPoolExtensionFinder(const DescriptorPool* pool,
MessageFactory* factory,
const Descriptor* containing_type)
: pool_(pool), factory_(factory), containing_type_(containing_type) {}
- ~DescriptorPoolExtensionFinder() override {}
- bool Find(int number, ExtensionInfo* output) override;
+ bool Find(int number, ExtensionInfo* output);
private:
const DescriptorPool* pool_;
@@ -359,7 +358,8 @@ int ExtensionSet::SpaceUsedExcludingSelf() const {
}
size_t ExtensionSet::SpaceUsedExcludingSelfLong() const {
- size_t total_size = Size() * sizeof(KeyValue);
+ size_t total_size =
+ (is_large() ? map_.large->size() : flat_capacity_) * sizeof(KeyValue);
ForEach([&total_size](int /* number */, const Extension& ext) {
total_size += ext.SpaceUsedExcludingSelfLong();
});
diff --git a/contrib/libs/protobuf/src/google/protobuf/extension_set_inl.h b/contrib/libs/protobuf/src/google/protobuf/extension_set_inl.h
index b2bed39b72..b7bc82eefd 100644
--- a/contrib/libs/protobuf/src/google/protobuf/extension_set_inl.h
+++ b/contrib/libs/protobuf/src/google/protobuf/extension_set_inl.h
@@ -206,21 +206,16 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(
const char* ptr, const Msg* extendee, internal::InternalMetadata* metadata,
internal::ParseContext* ctx) {
TProtoStringType payload;
- arc_ui32 type_id;
- enum class State { kNoTag, kHasType, kHasPayload, kDone };
- State state = State::kNoTag;
-
+ arc_ui32 type_id = 0;
+ bool payload_read = false;
while (!ctx->Done(&ptr)) {
arc_ui32 tag = static_cast<uint8_t>(*ptr++);
if (tag == WireFormatLite::kMessageSetTypeIdTag) {
arc_ui64 tmp;
ptr = ParseBigVarint(ptr, &tmp);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- if (state == State::kNoTag) {
- type_id = tmp;
- state = State::kHasType;
- } else if (state == State::kHasPayload) {
- type_id = tmp;
+ type_id = tmp;
+ if (payload_read) {
ExtensionInfo extension;
bool was_packed_on_wire;
if (!FindExtension(2, type_id, extendee, ctx, &extension,
@@ -246,24 +241,20 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(
GOOGLE_PROTOBUF_PARSER_ASSERT(value->_InternalParse(p, &tmp_ctx) &&
tmp_ctx.EndedAtLimit());
}
- state = State::kDone;
+ type_id = 0;
}
} else if (tag == WireFormatLite::kMessageSetMessageTag) {
- if (state == State::kHasType) {
+ if (type_id != 0) {
ptr = ParseFieldMaybeLazily(static_cast<arc_ui64>(type_id) * 8 + 2, ptr,
extendee, metadata, ctx);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- state = State::kDone;
+ type_id = 0;
} else {
- TProtoStringType tmp;
arc_i32 size = ReadSize(&ptr);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ptr = ctx->ReadString(ptr, size, &tmp);
+ ptr = ctx->ReadString(ptr, size, &payload);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- if (state == State::kNoTag) {
- payload = std::move(tmp);
- state = State::kHasPayload;
- }
+ payload_read = true;
}
} else {
ptr = ReadTag(ptr - 1, &tag);
diff --git a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
index a6e55fbb03..6b869c4423 100644
--- a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
@@ -22,8 +22,9 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR FieldMask::FieldMask(
- ::_pbi::ConstantInitialized)
- : paths_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.paths_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct FieldMaskDefaultTypeInternal {
PROTOBUF_CONSTEXPR FieldMaskDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -45,7 +46,7 @@ const arc_ui32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] P
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, _impl_.paths_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FieldMask)},
@@ -88,19 +89,29 @@ class FieldMask::_Internal {
FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- paths_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask)
}
FieldMask::FieldMask(const FieldMask& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- paths_(from.paths_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ FieldMask* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.paths_){from._impl_.paths_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
}
-inline void FieldMask::SharedCtor() {
+inline void FieldMask::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.paths_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
FieldMask::~FieldMask() {
@@ -114,10 +125,11 @@ FieldMask::~FieldMask() {
inline void FieldMask::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_.paths_.~RepeatedPtrField();
}
void FieldMask::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FieldMask::Clear() {
@@ -126,7 +138,7 @@ void FieldMask::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- paths_.Clear();
+ _impl_.paths_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -208,36 +220,32 @@ size_t FieldMask::ByteSizeLong() const {
// repeated string paths = 1;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(paths_.size());
- for (int i = 0, n = paths_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.paths_.size());
+ for (int i = 0, n = _impl_.paths_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- paths_.Get(i));
+ _impl_.paths_.Get(i));
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FieldMask::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FieldMask::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FieldMask::GetClassData() const { return &_class_data_; }
-void FieldMask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FieldMask *>(to)->MergeFrom(
- static_cast<const FieldMask &>(from));
-}
-
-void FieldMask::MergeFrom(const FieldMask& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
- GOOGLE_DCHECK_NE(&from, this);
+void FieldMask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FieldMask*>(&to_msg);
+ auto& from = static_cast<const FieldMask&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- paths_.MergeFrom(from.paths_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.paths_.MergeFrom(from._impl_.paths_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FieldMask::CopyFrom(const FieldMask& from) {
@@ -254,7 +262,7 @@ bool FieldMask::IsInitialized() const {
void FieldMask::InternalSwap(FieldMask* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- paths_.InternalSwap(&other->paths_);
+ _impl_.paths_.InternalSwap(&other->_impl_.paths_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h
index 4ac3bd4eee..27e3e718b7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -136,9 +136,11 @@ class PROTOBUF_EXPORT FieldMask final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FieldMask& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FieldMask& from);
+ void MergeFrom( const FieldMask& from) {
+ FieldMask::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -147,10 +149,10 @@ class PROTOBUF_EXPORT FieldMask final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FieldMask* other);
@@ -208,8 +210,11 @@ class PROTOBUF_EXPORT FieldMask final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> paths_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> paths_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto;
};
// ===================================================================
@@ -225,13 +230,13 @@ class PROTOBUF_EXPORT FieldMask final :
// repeated string paths = 1;
inline int FieldMask::_internal_paths_size() const {
- return paths_.size();
+ return _impl_.paths_.size();
}
inline int FieldMask::paths_size() const {
return _internal_paths_size();
}
inline void FieldMask::clear_paths() {
- paths_.Clear();
+ _impl_.paths_.Clear();
}
inline TProtoStringType* FieldMask::add_paths() {
TProtoStringType* _s = _internal_add_paths();
@@ -239,7 +244,7 @@ inline TProtoStringType* FieldMask::add_paths() {
return _s;
}
inline const TProtoStringType& FieldMask::_internal_paths(int index) const {
- return paths_.Get(index);
+ return _impl_.paths_.Get(index);
}
inline const TProtoStringType& FieldMask::paths(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths)
@@ -247,55 +252,55 @@ inline const TProtoStringType& FieldMask::paths(int index) const {
}
inline TProtoStringType* FieldMask::mutable_paths(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths)
- return paths_.Mutable(index);
+ return _impl_.paths_.Mutable(index);
}
inline void FieldMask::set_paths(int index, const TProtoStringType& value) {
- paths_.Mutable(index)->assign(value);
+ _impl_.paths_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
}
inline void FieldMask::set_paths(int index, TProtoStringType&& value) {
- paths_.Mutable(index)->assign(std::move(value));
+ _impl_.paths_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
}
inline void FieldMask::set_paths(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- paths_.Mutable(index)->assign(value);
+ _impl_.paths_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths)
}
inline void FieldMask::set_paths(int index, const char* value, size_t size) {
- paths_.Mutable(index)->assign(
+ _impl_.paths_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths)
}
inline TProtoStringType* FieldMask::_internal_add_paths() {
- return paths_.Add();
+ return _impl_.paths_.Add();
}
inline void FieldMask::add_paths(const TProtoStringType& value) {
- paths_.Add()->assign(value);
+ _impl_.paths_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
}
inline void FieldMask::add_paths(TProtoStringType&& value) {
- paths_.Add(std::move(value));
+ _impl_.paths_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
}
inline void FieldMask::add_paths(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- paths_.Add()->assign(value);
+ _impl_.paths_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths)
}
inline void FieldMask::add_paths(const char* value, size_t size) {
- paths_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.paths_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
FieldMask::paths() const {
// @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths)
- return paths_;
+ return _impl_.paths_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
FieldMask::mutable_paths() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths)
- return &paths_;
+ return &_impl_.paths_;
}
#ifdef __GNUC__
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.cc
index 2122203074..3765ac705e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.cc
@@ -98,15 +98,15 @@ failure:
return target;
}
-void ZeroFieldsBase::MergeImpl(Message* to_param, const Message& from_param) {
- auto* to = static_cast<ZeroFieldsBase*>(to_param);
+void ZeroFieldsBase::MergeImpl(Message& to_param, const Message& from_param) {
+ auto* to = static_cast<ZeroFieldsBase*>(&to_param);
const auto* from = static_cast<const ZeroFieldsBase*>(&from_param);
GOOGLE_DCHECK_NE(from, to);
to->_internal_metadata_.MergeFrom<UnknownFieldSet>(from->_internal_metadata_);
}
-void ZeroFieldsBase::CopyImpl(Message* to_param, const Message& from_param) {
- auto* to = static_cast<ZeroFieldsBase*>(to_param);
+void ZeroFieldsBase::CopyImpl(Message& to_param, const Message& from_param) {
+ auto* to = static_cast<ZeroFieldsBase*>(&to_param);
const auto* from = static_cast<const ZeroFieldsBase*>(&from_param);
if (from == to) return;
to->_internal_metadata_.Clear<UnknownFieldSet>();
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.h
index ebd198417c..b295218a70 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.h
@@ -71,8 +71,8 @@ class PROTOBUF_EXPORT ZeroFieldsBase : public Message {
void SetCachedSize(int size) const final { _cached_size_.Set(size); }
- static void MergeImpl(Message* to, const Message& from);
- static void CopyImpl(Message* to, const Message& from);
+ static void MergeImpl(Message& to, const Message& from);
+ static void CopyImpl(Message& to, const Message& from);
void InternalSwap(ZeroFieldsBase* other);
mutable internal::CachedSize _cached_size_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
index 1e424f134e..b9aca09730 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
@@ -257,7 +257,11 @@ bool Reflection::IsLazyExtension(const Message& message,
}
bool Reflection::IsLazilyVerifiedLazyField(const FieldDescriptor* field) const {
- return field->options().lazy() || field->options().unverified_lazy();
+ if (field->options().unverified_lazy()) return true;
+
+ // Message fields with [lazy=true] will be eagerly verified
+ // (go/verified-lazy).
+ return field->options().lazy() && !IsEagerlyVerifiedLazyField(field);
}
bool Reflection::IsEagerlyVerifiedLazyField(
@@ -3107,6 +3111,56 @@ void UnknownFieldSetSerializer(const uint8_t* base, arc_ui32 offset,
}
}
+bool IsDescendant(Message& root, const Message& message) {
+ const Reflection* reflection = root.GetReflection();
+ std::vector<const FieldDescriptor*> fields;
+ reflection->ListFieldsOmitStripped(root, &fields);
+
+ for (const auto* field : fields) {
+ // Skip non-message fields.
+ if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) continue;
+
+ // Optional messages.
+ if (!field->is_repeated()) {
+ Message* sub_message = reflection->MutableMessage(&root, field);
+ if (sub_message == &message || IsDescendant(*sub_message, message)) {
+ return true;
+ }
+ continue;
+ }
+
+ // Repeated messages.
+ if (!IsMapFieldInApi(field)) {
+ int count = reflection->FieldSize(root, field);
+ for (int i = 0; i < count; i++) {
+ Message* sub_message =
+ reflection->MutableRepeatedMessage(&root, field, i);
+ if (sub_message == &message || IsDescendant(*sub_message, message)) {
+ return true;
+ }
+ }
+ continue;
+ }
+
+ // Map field: if accessed as repeated fields, messages are *copied* and
+ // matching pointer won't work. Must directly access map.
+ constexpr int kValIdx = 1;
+ const FieldDescriptor* val_field = field->message_type()->field(kValIdx);
+ // Skip map fields whose value type is not message.
+ if (val_field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) continue;
+
+ MapIterator end = reflection->MapEnd(&root, field);
+ for (auto iter = reflection->MapBegin(&root, field); iter != end; ++iter) {
+ Message* sub_message = iter.MutableValueRef()->MutableMessageValue();
+ if (sub_message == &message || IsDescendant(*sub_message, message)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
index a12b855176..dfab838ee4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
@@ -38,9 +38,6 @@
#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_REFLECTION_H__
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_REFLECTION_H__
-#include <string>
-#include <vector>
-
#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_impl.h b/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_impl.h
index d3929c82ed..0f95846ccd 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_impl.h
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_impl.h
@@ -400,6 +400,13 @@ class PROTOBUF_EXPORT TcParser final {
return *target;
}
+ template <typename T>
+ static inline T ReadAt(const void* x, size_t offset) {
+ T out;
+ memcpy(&out, static_cast<const char*>(x) + offset, sizeof(T));
+ return out;
+ }
+
// Mini parsing:
//
// This function parses a field from incoming data based on metadata stored in
diff --git a/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_lite.cc b/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_lite.cc
index d3f97fd9f3..23266c60d6 100644
--- a/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_lite.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_lite.cc
@@ -84,10 +84,10 @@ PROTOBUF_NOINLINE const char* TcParser::ParseLoop(
MessageLite* msg, const char* ptr, ParseContext* ctx,
const TcParseTableBase* table) {
ScopedArenaSwap saved(msg, ctx);
- const arc_ui32 has_bits_offset = table->has_bits_offset;
while (!ctx->Done(&ptr)) {
- arc_ui64 hasbits = 0;
- if (has_bits_offset) hasbits = RefAt<arc_ui32>(msg, has_bits_offset);
+ // Unconditionally read has bits, even if we don't have has bits.
+ // has_bits_offset will be 0 and we will just read something valid.
+ arc_ui64 hasbits = ReadAt<arc_ui32>(msg, table->has_bits_offset);
ptr = TagDispatch(msg, ptr, ctx, table, hasbits, {});
if (ptr == nullptr) break;
if (ctx->LastTag() != 1) break; // Ended on terminating tag
@@ -301,7 +301,7 @@ StringPiece TcParser::FieldName(const TcParseTableBase* table,
const char* TcParser::MiniParse(PROTOBUF_TC_PARAM_DECL) {
arc_ui32 tag;
- ptr = ReadTag(ptr, &tag);
+ ptr = ReadTagInlined(ptr, &tag);
if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr;
auto* entry = FindFieldEntry(table, tag >> 3);
@@ -371,13 +371,13 @@ const char* TcParser::SingularParseMessageAuxImpl(PROTOBUF_TC_PARAM_DECL) {
auto saved_tag = UnalignedLoad<TagType>(ptr);
ptr += sizeof(TagType);
hasbits |= (arc_ui64{1} << data.hasbit_idx());
+ SyncHasbits(msg, hasbits, table);
auto& field = RefAt<MessageLite*>(msg, data.offset());
if (field == nullptr) {
const MessageLite* default_instance =
table->field_aux(data.aux_idx())->message_default;
field = default_instance->New(ctx->data().arena);
}
- SyncHasbits(msg, hasbits, table);
if (group_coding) {
return ctx->ParseGroup(field, ptr, FastDecodeTag(saved_tag));
}
@@ -456,7 +456,7 @@ PROTOBUF_ALWAYS_INLINE const char* TcParser::SingularFixed(
}
ptr += sizeof(TagType); // Consume tag
hasbits |= (arc_ui64{1} << data.hasbit_idx());
- std::memcpy(Offset(msg, data.offset()), ptr, sizeof(LayoutType));
+ RefAt<LayoutType>(msg, data.offset()) = UnalignedLoad<LayoutType>(ptr);
ptr += sizeof(LayoutType);
PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_PASS);
}
@@ -501,7 +501,7 @@ PROTOBUF_ALWAYS_INLINE const char* TcParser::RepeatedFixed(
auto expected_tag = UnalignedLoad<TagType>(ptr);
do {
ptr += sizeof(TagType);
- std::memcpy(elem + (idx++), ptr, sizeof(LayoutType));
+ elem[idx++] = UnalignedLoad<LayoutType>(ptr);
ptr += sizeof(LayoutType);
if (idx >= space) break;
if (!ctx->DataAvailable(ptr)) break;
@@ -580,6 +580,35 @@ const char* TcParser::FastF64P2(PROTOBUF_TC_PARAM_DECL) {
namespace {
+// Shift "byte" left by n * 7 bits, filling vacated bits with ones.
+template <int n>
+inline PROTOBUF_ALWAYS_INLINE arc_ui64
+shift_left_fill_with_ones(arc_ui64 byte, arc_ui64 ones) {
+ return (byte << (n * 7)) | (ones >> (64 - (n * 7)));
+}
+
+// Shift "byte" left by n * 7 bits, filling vacated bits with ones, and
+// put the new value in res. Return whether the result was negative.
+template <int n>
+inline PROTOBUF_ALWAYS_INLINE bool shift_left_fill_with_ones_was_negative(
+ arc_ui64 byte, arc_ui64 ones, arc_i64& res) {
+#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
+ // For the first two rounds (ptr[1] and ptr[2]), micro benchmarks show a
+ // substantial improvement from capturing the sign from the condition code
+ // register on x86-64.
+ bool sign_bit;
+ asm("shldq %3, %2, %1"
+ : "=@ccs"(sign_bit), "+r"(byte)
+ : "r"(ones), "i"(n * 7));
+ res = byte;
+ return sign_bit;
+#else
+ // Generic fallback:
+ res = (byte << (n * 7)) | (ones >> (64 - (n * 7)));
+ return static_cast<arc_i64>(res) < 0;
+#endif
+}
+
inline PROTOBUF_ALWAYS_INLINE std::pair<const char*, arc_ui64>
Parse64FallbackPair(const char* p, arc_i64 res1) {
auto ptr = reinterpret_cast<const int8_t*>(p);
@@ -601,78 +630,42 @@ Parse64FallbackPair(const char* p, arc_i64 res1) {
// has 57 high bits of ones, which is enough for the largest shift done.
GOOGLE_DCHECK_EQ(res1 >> 7, -1);
arc_ui64 ones = res1; // save the high 1 bits from res1 (input to SHLD)
- arc_ui64 byte; // the "next" 7-bit chunk, shifted (result from SHLD)
arc_i64 res2, res3; // accumulated result chunks
-#define SHLD(n) byte = ((byte << (n * 7)) | (ones >> (64 - (n * 7))))
- int sign_bit;
-#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
- // For the first two rounds (ptr[1] and ptr[2]), micro benchmarks show a
- // substantial improvement from capturing the sign from the condition code
- // register on x86-64.
-#define SHLD_SIGN(n) \
- asm("shldq %3, %2, %1" \
- : "=@ccs"(sign_bit), "+r"(byte) \
- : "r"(ones), "i"(n * 7))
-#else
- // Generic fallback:
-#define SHLD_SIGN(n) \
- do { \
- SHLD(n); \
- sign_bit = static_cast<arc_i64>(byte) < 0; \
- } while (0)
-#endif
-
- byte = ptr[1];
- SHLD_SIGN(1);
- res2 = byte;
- if (!sign_bit) goto done2;
- byte = ptr[2];
- SHLD_SIGN(2);
- res3 = byte;
- if (!sign_bit) goto done3;
-
-#undef SHLD_SIGN
+ if (!shift_left_fill_with_ones_was_negative<1>(ptr[1], ones, res2))
+ goto done2;
+ if (!shift_left_fill_with_ones_was_negative<2>(ptr[2], ones, res3))
+ goto done3;
// For the remainder of the chunks, check the sign of the AND result.
- byte = ptr[3];
- SHLD(3);
- res1 &= byte;
+ res1 &= shift_left_fill_with_ones<3>(ptr[3], ones);
if (res1 >= 0) goto done4;
- byte = ptr[4];
- SHLD(4);
- res2 &= byte;
+ res2 &= shift_left_fill_with_ones<4>(ptr[4], ones);
if (res2 >= 0) goto done5;
- byte = ptr[5];
- SHLD(5);
- res3 &= byte;
+ res3 &= shift_left_fill_with_ones<5>(ptr[5], ones);
if (res3 >= 0) goto done6;
- byte = ptr[6];
- SHLD(6);
- res1 &= byte;
+ res1 &= shift_left_fill_with_ones<6>(ptr[6], ones);
if (res1 >= 0) goto done7;
- byte = ptr[7];
- SHLD(7);
- res2 &= byte;
+ res2 &= shift_left_fill_with_ones<7>(ptr[7], ones);
if (res2 >= 0) goto done8;
- byte = ptr[8];
- SHLD(8);
- res3 &= byte;
+ res3 &= shift_left_fill_with_ones<8>(ptr[8], ones);
if (res3 >= 0) goto done9;
-#undef SHLD
-
// For valid 64bit varints, the 10th byte/ptr[9] should be exactly 1. In this
// case, the continuation bit of ptr[8] already set the top bit of res3
// correctly, so all we have to do is check that the expected case is true.
- byte = ptr[9];
- if (PROTOBUF_PREDICT_TRUE(byte == 1)) goto done10;
+ if (PROTOBUF_PREDICT_TRUE(ptr[9] == 1)) goto done10;
// A value of 0, however, represents an over-serialized varint. This case
// should not happen, but if does (say, due to a nonconforming serializer),
// deassert the continuation bit that came from ptr[8].
- if (byte == 0) {
+ if (ptr[9] == 0) {
+#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
+ // Use a small instruction since this is an uncommon code path.
+ asm("btcq $63,%0" : "+r"(res3));
+#else
res3 ^= static_cast<arc_ui64>(1) << 63;
+#endif
goto done10;
}
@@ -680,18 +673,24 @@ Parse64FallbackPair(const char* p, arc_i64 res1) {
// fit in 64 bits. If the continue bit is set, it is an unterminated varint.
return {nullptr, 0};
-#define DONE(n) done##n : return {p + n, res1 & res2 & res3};
done2:
return {p + 2, res1 & res2};
- DONE(3)
- DONE(4)
- DONE(5)
- DONE(6)
- DONE(7)
- DONE(8)
- DONE(9)
- DONE(10)
-#undef DONE
+done3:
+ return {p + 3, res1 & res2 & res3};
+done4:
+ return {p + 4, res1 & res2 & res3};
+done5:
+ return {p + 5, res1 & res2 & res3};
+done6:
+ return {p + 6, res1 & res2 & res3};
+done7:
+ return {p + 7, res1 & res2 & res3};
+done8:
+ return {p + 8, res1 & res2 & res3};
+done9:
+ return {p + 9, res1 & res2 & res3};
+done10:
+ return {p + 10, res1 & res2 & res3};
}
inline PROTOBUF_ALWAYS_INLINE const char* ParseVarint(const char* p,
@@ -1371,10 +1370,10 @@ const char* TcParser::MpFixed(PROTOBUF_TC_PARAM_DECL) {
}
// Copy the value:
if (rep == field_layout::kRep64Bits) {
- std::memcpy(Offset(msg, entry.offset), ptr, sizeof(arc_ui64));
+ RefAt<arc_ui64>(msg, entry.offset) = UnalignedLoad<arc_ui64>(ptr);
ptr += sizeof(arc_ui64);
} else {
- std::memcpy(Offset(msg, entry.offset), ptr, sizeof(arc_ui32));
+ RefAt<arc_ui32>(msg, entry.offset) = UnalignedLoad<arc_ui32>(ptr);
ptr += sizeof(arc_ui32);
}
PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_PASS);
@@ -1402,7 +1401,7 @@ const char* TcParser::MpRepeatedFixed(PROTOBUF_TC_PARAM_DECL) {
arc_ui32 next_tag;
do {
ptr = ptr2;
- std::memcpy(field.Add(), ptr, size);
+ *field.Add() = UnalignedLoad<arc_ui64>(ptr);
ptr += size;
if (!ctx->DataAvailable(ptr)) break;
ptr2 = ReadTag(ptr, &next_tag);
@@ -1418,7 +1417,7 @@ const char* TcParser::MpRepeatedFixed(PROTOBUF_TC_PARAM_DECL) {
arc_ui32 next_tag;
do {
ptr = ptr2;
- std::memcpy(field.Add(), ptr, size);
+ *field.Add() = UnalignedLoad<arc_ui32>(ptr);
ptr += size;
if (!ctx->DataAvailable(ptr)) break;
ptr2 = ReadTag(ptr, &next_tag);
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
index a4fef38d10..926e939451 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
@@ -392,7 +392,7 @@ inline ::std::pair<bool, const uint8_t*> ReadVarint32FromArray(
b = *(ptr++);
result += b << 28;
if (!(b & 0x80)) goto done;
- // "result -= 0x80 << 28" is irrevelant.
+ // "result -= 0x80 << 28" is irrelevant.
// If the input is larger than 32 bits, we still need to read it all
// and discard the high-order bits.
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
index 839ab42a45..e8bde19d85 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
@@ -121,36 +121,13 @@
#include <type_traits>
#include <utility>
-#ifdef _WIN32
-// Assuming windows is always little-endian.
-#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
-#define PROTOBUF_LITTLE_ENDIAN 1
-#endif
#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
// If MSVC has "/RTCc" set, it will complain about truncating casts at
// runtime. This file contains some intentional truncating casts.
#pragma runtime_checks("c", off)
#endif
-#else
-#ifdef __APPLE__
-#include <machine/endian.h> // __BYTE_ORDER
-#elif defined(__FreeBSD__)
-#include <sys/endian.h> // __BYTE_ORDER
-#elif (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
-#error #include <sys/isa_defs.h> // __BYTE_ORDER
-#elif defined(_AIX) || defined(__TOS_AIX__)
-#include <sys/machine.h> // BYTE_ORDER
-#else
-#if !defined(__QNX__)
-#include <endian.h> // __BYTE_ORDER
-#endif
-#endif
-#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
- (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
- !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
-#define PROTOBUF_LITTLE_ENDIAN 1
-#endif
-#endif
+
+
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/strutil.h>
@@ -957,7 +934,8 @@ class PROTOBUF_EXPORT EpsCopyOutputStream {
template <int S>
uint8_t* WriteRawLittleEndian(const void* data, int size, uint8_t* ptr);
-#ifndef PROTOBUF_LITTLE_ENDIAN
+#if !defined(PROTOBUF_LITTLE_ENDIAN) || \
+ defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
uint8_t* WriteRawLittleEndian32(const void* data, int size, uint8_t* ptr);
uint8_t* WriteRawLittleEndian64(const void* data, int size, uint8_t* ptr);
#endif
@@ -1004,7 +982,8 @@ template <>
inline uint8_t* EpsCopyOutputStream::WriteRawLittleEndian<4>(const void* data,
int size,
uint8_t* ptr) {
-#ifdef PROTOBUF_LITTLE_ENDIAN
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
return WriteRaw(data, size, ptr);
#else
return WriteRawLittleEndian32(data, size, ptr);
@@ -1014,7 +993,8 @@ template <>
inline uint8_t* EpsCopyOutputStream::WriteRawLittleEndian<8>(const void* data,
int size,
uint8_t* ptr) {
-#ifdef PROTOBUF_LITTLE_ENDIAN
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
return WriteRaw(data, size, ptr);
#else
return WriteRawLittleEndian64(data, size, ptr);
@@ -1357,7 +1337,8 @@ inline bool CodedInputStream::ReadVarintSizeAsInt(int* value) {
// static
inline const uint8_t* CodedInputStream::ReadLittleEndian32FromArray(
const uint8_t* buffer, arc_ui32* value) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
memcpy(value, buffer, sizeof(*value));
return buffer + sizeof(*value);
#else
@@ -1371,7 +1352,8 @@ inline const uint8_t* CodedInputStream::ReadLittleEndian32FromArray(
// static
inline const uint8_t* CodedInputStream::ReadLittleEndian64FromArray(
const uint8_t* buffer, arc_ui64* value) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
memcpy(value, buffer, sizeof(*value));
return buffer + sizeof(*value);
#else
@@ -1389,7 +1371,8 @@ inline const uint8_t* CodedInputStream::ReadLittleEndian64FromArray(
}
inline bool CodedInputStream::ReadLittleEndian32(arc_ui32* value) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
if (PROTOBUF_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
buffer_ = ReadLittleEndian32FromArray(buffer_, value);
return true;
@@ -1402,7 +1385,8 @@ inline bool CodedInputStream::ReadLittleEndian32(arc_ui32* value) {
}
inline bool CodedInputStream::ReadLittleEndian64(arc_ui64* value) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
if (PROTOBUF_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
buffer_ = ReadLittleEndian64FromArray(buffer_, value);
return true;
@@ -1689,7 +1673,8 @@ inline uint8_t* CodedOutputStream::WriteVarint32SignExtendedToArray(
inline uint8_t* CodedOutputStream::WriteLittleEndian32ToArray(arc_ui32 value,
uint8_t* target) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
memcpy(target, &value, sizeof(value));
#else
target[0] = static_cast<uint8_t>(value);
@@ -1702,7 +1687,8 @@ inline uint8_t* CodedOutputStream::WriteLittleEndian32ToArray(arc_ui32 value,
inline uint8_t* CodedOutputStream::WriteLittleEndian64ToArray(arc_ui64 value,
uint8_t* target) {
-#if defined(PROTOBUF_LITTLE_ENDIAN)
+#if defined(PROTOBUF_LITTLE_ENDIAN) && \
+ !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
memcpy(target, &value, sizeof(value));
#else
arc_ui32 part0 = static_cast<arc_ui32>(value);
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.h b/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.h
index ba8338da2e..170ba70929 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.h
@@ -47,7 +47,7 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/port.h>
-#include <zlib.h>
+#include "zlib.h"
// Must be included last.
#include <google/protobuf/port_def.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc b/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc
index cef4ce8fb0..56cf5d8917 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc
@@ -98,6 +98,9 @@
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/stubs/stl_util.h>
+// Must be included last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace io {
@@ -147,12 +150,32 @@ CHARACTER_CLASS(Escape, c == 'a' || c == 'b' || c == 'f' || c == 'n' ||
// Given a char, interpret it as a numeric digit and return its value.
// This supports any number base up to 36.
-inline int DigitValue(char digit) {
- if ('0' <= digit && digit <= '9') return digit - '0';
- if ('a' <= digit && digit <= 'z') return digit - 'a' + 10;
- if ('A' <= digit && digit <= 'Z') return digit - 'A' + 10;
- return -1;
-}
+// Represents integer values of digits.
+// Uses 36 to indicate an invalid character since we support
+// bases up to 36.
+static const int8_t kAsciiToInt[256] = {
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // 00-0F
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // 10-1F
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // ' '-'/'
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, // '0'-'9'
+ 36, 36, 36, 36, 36, 36, 36, // ':'-'@'
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 'A'-'P'
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, // 'Q'-'Z'
+ 36, 36, 36, 36, 36, 36, // '['-'`'
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 'a'-'p'
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, // 'q'-'z'
+ 36, 36, 36, 36, 36, // '{'-DEL
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // 80-8F
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // 90-9F
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // A0-AF
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // B0-BF
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // C0-CF
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // D0-DF
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // E0-EF
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, // F0-FF
+};
+
+inline int DigitValue(char digit) { return kAsciiToInt[digit & 0xFF]; }
// Inline because it's only used in one place.
inline char TranslateEscape(char c) {
@@ -911,25 +934,49 @@ bool Tokenizer::NextWithComments(TProtoStringType* prev_trailing_comments,
bool Tokenizer::ParseInteger(const TProtoStringType& text, arc_ui64 max_value,
arc_ui64* output) {
- // Sadly, we can't just use strtoul() since it is only 32-bit and strtoull()
- // is non-standard. I hate the C standard library. :(
-
- // return strtoull(text.c_str(), NULL, 0);
+ // We can't just use strtoull() because (a) it accepts negative numbers,
+ // (b) We want additional range checks, (c) it reports overflows via errno.
+
+#if 0
+ const char *str_begin = text.c_str();
+ if (*str_begin == '-') return false;
+ char *str_end = nullptr;
+ errno = 0;
+ *output = std::strtoull(str_begin, &str_end, 0);
+ return (errno == 0 && str_end && *str_end == '\0' && *output <= max_value);
+#endif
const char* ptr = text.c_str();
int base = 10;
+ arc_ui64 overflow_if_mul_base = (kuint64max / 10) + 1;
if (ptr[0] == '0') {
if (ptr[1] == 'x' || ptr[1] == 'X') {
// This is hex.
base = 16;
+ overflow_if_mul_base = (kuint64max / 16) + 1;
ptr += 2;
} else {
// This is octal.
base = 8;
+ overflow_if_mul_base = (kuint64max / 8) + 1;
}
}
arc_ui64 result = 0;
+ // For all the leading '0's, and also the first non-zero character, we
+ // don't need to multiply.
+ while (*ptr != '\0') {
+ int digit = DigitValue(*ptr++);
+ if (digit >= base) {
+ // The token provided by Tokenizer is invalid. i.e., 099 is an invalid
+ // token, but Tokenizer still think it's integer.
+ return false;
+ }
+ if (digit != 0) {
+ result = digit;
+ break;
+ }
+ }
for (; *ptr != '\0'; ptr++) {
int digit = DigitValue(*ptr);
if (digit < 0 || digit >= base) {
@@ -937,13 +984,18 @@ bool Tokenizer::ParseInteger(const TProtoStringType& text, arc_ui64 max_value,
// token, but Tokenizer still think it's integer.
return false;
}
- if (static_cast<arc_ui64>(digit) > max_value ||
- result > (max_value - digit) / base) {
- // Overflow.
+ if (result >= overflow_if_mul_base) {
+ // We know the multiply we're about to do will overflow, so exit now.
return false;
}
+ // We know that result * base won't overflow, but adding digit might...
result = result * base + digit;
+ // C++ guarantees defined "wrap" semantics when unsigned integer
+ // operations overflow, making this a fast way to check if adding
+ // digit made result overflow, and thus, wrap around.
+ if (result < static_cast<arc_ui64>(base)) return false;
}
+ if (result > max_value) return false;
*output = result;
return true;
@@ -1183,3 +1235,5 @@ bool Tokenizer::IsIdentifier(const TProtoStringType& text) {
} // namespace io
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h
index e2c9737eb6..2041cbf648 100644
--- a/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h
+++ b/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.h
@@ -108,8 +108,6 @@
#define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_H__
-#include <string>
-
#include <google/protobuf/stubs/common.h>
diff --git a/contrib/libs/protobuf/src/google/protobuf/map.h b/contrib/libs/protobuf/src/google/protobuf/map.h
index c51a83a1b1..e0da73ea36 100644
--- a/contrib/libs/protobuf/src/google/protobuf/map.h
+++ b/contrib/libs/protobuf/src/google/protobuf/map.h
@@ -693,40 +693,30 @@ class Map {
return FindHelper(k).first;
}
- // Insert the key into the map, if not present. In that case, the value will
- // be value initialized.
+ // Inserts a new element into the container if there is no element with the
+ // key in the container.
+ // The new element is:
+ // (1) Constructed in-place with the given args, if mapped_type is not
+ // arena constructible.
+ // (2) Constructed in-place with the arena and then assigned with a
+ // mapped_type temporary constructed with the given args, otherwise.
+ template <typename K, typename... Args>
+ std::pair<iterator, bool> try_emplace(K&& k, Args&&... args) {
+ return ArenaAwareTryEmplace(Arena::is_arena_constructable<mapped_type>(),
+ std::forward<K>(k),
+ std::forward<Args>(args)...);
+ }
+
+ // Inserts the key into the map, if not present. In that case, the value
+ // will be value initialized.
template <typename K>
std::pair<iterator, bool> insert(K&& k) {
- std::pair<const_iterator, size_type> p = FindHelper(k);
- // Case 1: key was already present.
- if (p.first.node_ != nullptr)
- return std::make_pair(iterator(p.first), false);
- // Case 2: insert.
- if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) {
- p = FindHelper(k);
- }
- const size_type b = p.second; // bucket number
- // If K is not key_type, make the conversion to key_type explicit.
- using TypeToInit = typename std::conditional<
- std::is_same<typename std::decay<K>::type, key_type>::value, K&&,
- key_type>::type;
- Node* node = Alloc<Node>(1);
- // Even when arena is nullptr, CreateInArenaStorage is still used to
- // ensure the arena of submessage will be consistent. Otherwise,
- // submessage may have its own arena when message-owned arena is enabled.
- Arena::CreateInArenaStorage(const_cast<Key*>(&node->kv.first),
- alloc_.arena(),
- static_cast<TypeToInit>(std::forward<K>(k)));
- Arena::CreateInArenaStorage(&node->kv.second, alloc_.arena());
-
- iterator result = InsertUnique(b, node);
- ++num_elements_;
- return std::make_pair(result, true);
+ return try_emplace(std::forward<K>(k));
}
template <typename K>
value_type& operator[](K&& k) {
- return *insert(std::forward<K>(k)).first;
+ return *try_emplace(std::forward<K>(k)).first;
}
void erase(iterator it) {
@@ -768,6 +758,79 @@ class Map {
}
private:
+ template <typename K, typename... Args>
+ std::pair<iterator, bool> TryEmplaceInternal(K&& k, Args&&... args) {
+ std::pair<const_iterator, size_type> p = FindHelper(k);
+ // Case 1: key was already present.
+ if (p.first.node_ != nullptr)
+ return std::make_pair(iterator(p.first), false);
+ // Case 2: insert.
+ if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) {
+ p = FindHelper(k);
+ }
+ const size_type b = p.second; // bucket number
+ // If K is not key_type, make the conversion to key_type explicit.
+ using TypeToInit = typename std::conditional<
+ std::is_same<typename std::decay<K>::type, key_type>::value, K&&,
+ key_type>::type;
+ Node* node = Alloc<Node>(1);
+ // Even when arena is nullptr, CreateInArenaStorage is still used to
+ // ensure the arena of submessage will be consistent. Otherwise,
+ // submessage may have its own arena when message-owned arena is enabled.
+ // Note: This only works if `Key` is not arena constructible.
+ Arena::CreateInArenaStorage(const_cast<Key*>(&node->kv.first),
+ alloc_.arena(),
+ static_cast<TypeToInit>(std::forward<K>(k)));
+ // Note: if `T` is arena constructible, `Args` needs to be empty.
+ Arena::CreateInArenaStorage(&node->kv.second, alloc_.arena(),
+ std::forward<Args>(args)...);
+
+ iterator result = InsertUnique(b, node);
+ ++num_elements_;
+ return std::make_pair(result, true);
+ }
+
+ // A helper function to perform an assignment of `mapped_type`.
+ // If the first argument is true, then it is a regular assignment.
+ // Otherwise, we first create a temporary and then perform an assignment.
+ template <typename V>
+ static void AssignMapped(std::true_type, mapped_type& mapped, V&& v) {
+ mapped = std::forward<V>(v);
+ }
+ template <typename... Args>
+ static void AssignMapped(std::false_type, mapped_type& mapped,
+ Args&&... args) {
+ mapped = mapped_type(std::forward<Args>(args)...);
+ }
+
+ // Case 1: `mapped_type` is arena constructible. A temporary object is
+ // created and then (if `Args` are not empty) assigned to a mapped value
+ // that was created with the arena.
+ template <typename K>
+ std::pair<iterator, bool> ArenaAwareTryEmplace(std::true_type, K&& k) {
+ // case 1.1: "default" constructed (e.g. from arena only).
+ return TryEmplaceInternal(std::forward<K>(k));
+ }
+ template <typename K, typename... Args>
+ std::pair<iterator, bool> ArenaAwareTryEmplace(std::true_type, K&& k,
+ Args&&... args) {
+ // case 1.2: "default" constructed + copy/move assignment
+ auto p = TryEmplaceInternal(std::forward<K>(k));
+ if (p.second) {
+ AssignMapped(std::is_same<void(typename std::decay<Args>::type...),
+ void(mapped_type)>(),
+ p.first->second, std::forward<Args>(args)...);
+ }
+ return p;
+ }
+ // Case 2: `mapped_type` is not arena constructible. Using in-place
+ // construction.
+ template <typename... Args>
+ std::pair<iterator, bool> ArenaAwareTryEmplace(std::false_type,
+ Args&&... args) {
+ return TryEmplaceInternal(std::forward<Args>(args)...);
+ }
+
const_iterator find(const Key& k, TreeIterator* it) const {
return FindHelper(k, it).first;
}
@@ -1283,21 +1346,26 @@ class Map {
}
// insert
- std::pair<iterator, bool> insert(const value_type& value) {
- std::pair<typename InnerMap::iterator, bool> p =
- elements_.insert(value.first);
- if (p.second) {
- p.first->second = value.second;
- }
+ template <typename K, typename... Args>
+ std::pair<iterator, bool> try_emplace(K&& k, Args&&... args) {
+ auto p =
+ elements_.try_emplace(std::forward<K>(k), std::forward<Args>(args)...);
return std::pair<iterator, bool>(iterator(p.first), p.second);
}
+ std::pair<iterator, bool> insert(const value_type& value) {
+ return try_emplace(value.first, value.second);
+ }
+ std::pair<iterator, bool> insert(value_type&& value) {
+ return try_emplace(value.first, std::move(value.second));
+ }
+ template <typename... Args>
+ std::pair<iterator, bool> emplace(Args&&... args) {
+ return insert(value_type(std::forward<Args>(args)...));
+ }
template <class InputIt>
void insert(InputIt first, InputIt last) {
- for (InputIt it = first; it != last; ++it) {
- iterator exist_it = find(it->first);
- if (exist_it == end()) {
- operator[](it->first) = it->second;
- }
+ for (; first != last; ++first) {
+ try_emplace(first->first, first->second);
}
}
void insert(std::initializer_list<value_type> values) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/message.cc b/contrib/libs/protobuf/src/google/protobuf/message.cc
index a2debdf648..faaa0b0626 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/message.cc
@@ -84,11 +84,11 @@ void Message::MergeFrom(const Message& from) {
auto* class_from = from.GetClassData();
auto* merge_to_from = class_to ? class_to->merge_to_from : nullptr;
if (class_to == nullptr || class_to != class_from) {
- merge_to_from = [](Message* to, const Message& from) {
- ReflectionOps::Merge(from, to);
+ merge_to_from = [](Message& to, const Message& from) {
+ ReflectionOps::Merge(from, &to);
};
}
- merge_to_from(this, from);
+ merge_to_from(*this, from);
}
void Message::CheckTypeAndMergeFrom(const MessageLite& other) {
@@ -111,25 +111,28 @@ void Message::CopyFrom(const Message& from) {
<< ", "
"from: "
<< from.GetDescriptor()->full_name();
- copy_to_from = [](Message* to, const Message& from) {
- ReflectionOps::Copy(from, to);
+ copy_to_from = [](Message& to, const Message& from) {
+ ReflectionOps::Copy(from, &to);
};
}
- copy_to_from(this, from);
+ copy_to_from(*this, from);
}
-void Message::CopyWithSizeCheck(Message* to, const Message& from) {
+void Message::CopyWithSourceCheck(Message& to, const Message& from) {
#ifndef NDEBUG
- size_t from_size = from.ByteSizeLong();
+ FailIfCopyFromDescendant(to, from);
#endif
- to->Clear();
-#ifndef NDEBUG
- GOOGLE_CHECK_EQ(from_size, from.ByteSizeLong())
- << "Source of CopyFrom changed when clearing target. Either "
- "source is a nested message in target (not allowed), or "
- "another thread is modifying the source.";
-#endif
- to->GetClassData()->merge_to_from(to, from);
+ to.Clear();
+ to.GetClassData()->merge_to_from(to, from);
+}
+
+void Message::FailIfCopyFromDescendant(Message& to, const Message& from) {
+ auto* arena = to.GetArenaForAllocation();
+ bool same_message_owned_arena = to.GetOwningArena() == nullptr &&
+ arena != nullptr &&
+ arena == from.GetOwningArena();
+ GOOGLE_CHECK(!same_message_owned_arena && !internal::IsDescendant(to, from))
+ << "Source of CopyFrom cannot be a descendant of the target.";
}
TProtoStringType Message::GetTypeName() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/message.h b/contrib/libs/protobuf/src/google/protobuf/message.h
index c66d94dd1a..8dacc5eb58 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message.h
+++ b/contrib/libs/protobuf/src/google/protobuf/message.h
@@ -221,6 +221,9 @@ const To& GetConstRefAtOffset(const Message& message, arc_ui32 offset) {
}
bool CreateUnknownEnumValues(const FieldDescriptor* field);
+
+// Returns true if "message" is a descendant of "root".
+PROTOBUF_EXPORT bool IsDescendant(Message& root, const Message& message);
} // namespace internal
// Abstract interface for protocol messages.
@@ -254,7 +257,7 @@ class PROTOBUF_EXPORT Message : public MessageLite {
// Make this message into a copy of the given message. The given message
// must have the same descriptor, but need not necessarily be the same class.
// By default this is just implemented as "Clear(); MergeFrom(from);".
- virtual void CopyFrom(const Message& from);
+ void CopyFrom(const Message& from);
// Merge the fields from the given message into this message. Singular
// fields will be overwritten, if specified in from, except for embedded
@@ -304,8 +307,11 @@ class PROTOBUF_EXPORT Message : public MessageLite {
// Debugging & Testing----------------------------------------------
- // Generates a human readable form of this message, useful for debugging
- // and other purposes.
+ // Generates a human-readable form of this message for debugging purposes.
+ // Note that the format and content of a debug string is not guaranteed, may
+ // change without notice, and should not be depended on. Code that does
+ // anything except display a string to assist in debugging should use
+ // TextFormat instead.
TProtoStringType DebugString() const;
// Like DebugString(), but with less whitespace.
TProtoStringType ShortDebugString() const;
@@ -388,8 +394,8 @@ class PROTOBUF_EXPORT Message : public MessageLite {
// Note: The order of arguments (to, then from) is chosen so that the ABI
// of this function is the same as the CopyFrom method. That is, the
// hidden "this" parameter comes first.
- void (*copy_to_from)(Message* to, const Message& from_msg);
- void (*merge_to_from)(Message* to, const Message& from_msg);
+ void (*copy_to_from)(Message& to, const Message& from_msg);
+ void (*merge_to_from)(Message& to, const Message& from_msg);
};
// GetClassData() returns a pointer to a ClassData struct which
// exists in global memory and is unique to each subclass. This uniqueness
@@ -398,11 +404,14 @@ class PROTOBUF_EXPORT Message : public MessageLite {
// TODO(jorg): change to pure virtual
virtual const ClassData* GetClassData() const { return nullptr; }
- // CopyWithSizeCheck calls Clear() and then MergeFrom(), and in debug
+ // CopyWithSourceCheck calls Clear() and then MergeFrom(), and in debug
// builds, checks that calling Clear() on the destination message doesn't
- // alter the size of the source. It assumes the messages are known to be
- // of the same type, and thus uses GetClassData().
- static void CopyWithSizeCheck(Message* to, const Message& from);
+ // alter the source. It assumes the messages are known to be of the same
+ // type, and thus uses GetClassData().
+ static void CopyWithSourceCheck(Message& to, const Message& from);
+
+ // Fail if "from" is a descendant of "to" as such copy is not allowed.
+ static void FailIfCopyFromDescendant(Message& to, const Message& from);
inline explicit Message(Arena* arena, bool is_message_owned = false)
: MessageLite(arena, is_message_owned) {}
@@ -1044,6 +1053,7 @@ class PROTOBUF_EXPORT Reflection final {
bool IsEagerlyVerifiedLazyField(const FieldDescriptor* field) const;
friend class FastReflectionMessageMutator;
+ friend bool internal::IsDescendant(Message& root, const Message& message);
const Descriptor* const descriptor_;
const internal::ReflectionSchema schema_;
diff --git a/contrib/libs/protobuf/src/google/protobuf/message_lite.cc b/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
index 9f6f129c03..c0ff5cc201 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
@@ -551,18 +551,14 @@ void GenericTypeHandler<TProtoStringType>::Merge(const TProtoStringType& from,
*to = from;
}
-// Non-inline implementations of InternalMetadata routines
-#if defined(NDEBUG) || defined(_MSC_VER)
-// for opt and MSVC builds, the destructor is defined in the header.
-#else
+// Non-inline implementations of InternalMetadata destructor
// This is moved out of the header because the GOOGLE_DCHECK produces a lot of code.
-InternalMetadata::~InternalMetadata() {
+void InternalMetadata::CheckedDestruct() {
if (HasMessageOwnedArenaTag()) {
GOOGLE_DCHECK(!HasUnknownFieldsTag());
delete reinterpret_cast<Arena*>(ptr_ - kMessageOwnedArenaTagMask);
}
}
-#endif
// Non-inline variants of TProtoStringType specializations for
// various InternalMetadata routines.
diff --git a/contrib/libs/protobuf/src/google/protobuf/message_lite.h b/contrib/libs/protobuf/src/google/protobuf/message_lite.h
index 97089a25dc..1a510e2a52 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/message_lite.h
@@ -192,10 +192,9 @@ class PROTOBUF_EXPORT MessageLite {
Arena* GetArena() const { return _internal_metadata_.user_arena(); }
// Clear all fields of the message and set them to their default values.
- // Clear() avoids freeing memory, assuming that any memory allocated
- // to hold parts of the message will be needed again to hold the next
- // message. If you actually want to free the memory used by a Message,
- // you must delete it.
+ // Clear() assumes that any memory allocated to hold parts of the message
+ // will likely be needed again, so the memory used may not be freed.
+ // To ensure that all memory used by a Message is freed, you must delete it.
virtual void Clear() = 0;
// Quickly check if all required fields have values set.
@@ -445,6 +444,10 @@ class PROTOBUF_EXPORT MessageLite {
// messages, etc), or owning incoming objects (e.g., set allocated).
Arena* GetArenaForAllocation() const { return _internal_metadata_.arena(); }
+ // Returns true if this message is enabled for message-owned arena (MOA)
+ // trials. No lite messages are eligible for MOA.
+ static bool InMoaTrial() { return false; }
+
internal::InternalMetadata _internal_metadata_;
public:
diff --git a/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h b/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
index fad103588e..eb004422ee 100644
--- a/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
@@ -60,25 +60,33 @@ namespace internal {
// It uses bit 0 == 0 to indicate an arena pointer and bit 0 == 1 to indicate a
// UFS+Arena-container pointer. Besides it uses bit 1 == 0 to indicate arena
// allocation and bit 1 == 1 to indicate heap allocation.
-class InternalMetadata {
+class PROTOBUF_EXPORT InternalMetadata {
public:
constexpr InternalMetadata() : ptr_(0) {}
- explicit InternalMetadata(Arena* arena, bool is_message_owned = false)
- : ptr_(is_message_owned
- ? reinterpret_cast<intptr_t>(arena) | kMessageOwnedArenaTagMask
- : reinterpret_cast<intptr_t>(arena)) {
+ explicit InternalMetadata(Arena* arena, bool is_message_owned = false) {
+ SetArena(arena, is_message_owned);
+ }
+
+ void SetArena(Arena* arena, bool is_message_owned) {
+ ptr_ = is_message_owned
+ ? reinterpret_cast<intptr_t>(arena) | kMessageOwnedArenaTagMask
+ : reinterpret_cast<intptr_t>(arena);
GOOGLE_DCHECK(!is_message_owned || arena != nullptr);
}
-#if defined(NDEBUG) || defined(_MSC_VER)
+ // To keep the ABI identical between debug and non-debug builds,
+ // the destructor is always defined here even though it may delegate
+ // to a non-inline private method.
+ // (see https://github.com/protocolbuffers/protobuf/issues/9947)
~InternalMetadata() {
+#if defined(NDEBUG) || defined(_MSC_VER)
if (HasMessageOwnedArenaTag()) {
delete reinterpret_cast<Arena*>(ptr_ - kMessageOwnedArenaTagMask);
}
- }
#else
- ~InternalMetadata();
+ CheckedDestruct();
#endif
+ }
template <typename T>
void Delete() {
@@ -257,6 +265,9 @@ class InternalMetadata {
PROTOBUF_NOINLINE void DoSwap(T* other) {
mutable_unknown_fields<T>()->Swap(other);
}
+
+ // Private helper with debug checks for ~InternalMetadata()
+ void CheckedDestruct();
};
// String Template specializations.
diff --git a/contrib/libs/protobuf/src/google/protobuf/parse_context.cc b/contrib/libs/protobuf/src/google/protobuf/parse_context.cc
index 4d0779d763..6c07eb1553 100644
--- a/contrib/libs/protobuf/src/google/protobuf/parse_context.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/parse_context.cc
@@ -33,6 +33,7 @@
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/arenastring.h>
+#include <google/protobuf/endian.h>
#include <google/protobuf/message_lite.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/stubs/strutil.h>
@@ -234,19 +235,6 @@ const char* EpsCopyInputStream::AppendStringFallback(const char* ptr, int size,
}
-template <int>
-void byteswap(void* p);
-template <>
-void byteswap<1>(void* /*p*/) {}
-template <>
-void byteswap<4>(void* p) {
- *static_cast<arc_ui32*>(p) = bswap_32(*static_cast<arc_ui32*>(p));
-}
-template <>
-void byteswap<8>(void* p) {
- *static_cast<arc_ui64*>(p) = bswap_64(*static_cast<arc_ui64*>(p));
-}
-
const char* EpsCopyInputStream::InitFrom(io::ZeroCopyInputStream* zcis) {
zcis_ = zcis;
const void* data;
diff --git a/contrib/libs/protobuf/src/google/protobuf/parse_context.h b/contrib/libs/protobuf/src/google/protobuf/parse_context.h
index 3e1bab30bd..eb76cde8a0 100644
--- a/contrib/libs/protobuf/src/google/protobuf/parse_context.h
+++ b/contrib/libs/protobuf/src/google/protobuf/parse_context.h
@@ -34,6 +34,7 @@
#include <cstdint>
#include <cstring>
#include <string>
+#include <type_traits>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream.h>
@@ -41,6 +42,7 @@
#include <google/protobuf/port.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/arenastring.h>
+#include <google/protobuf/endian.h>
#include <google/protobuf/implicit_weak_message.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
@@ -376,6 +378,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
using LazyEagerVerifyFnType = const char* (*)(const char* ptr,
ParseContext* ctx);
+using LazyEagerVerifyFnRef = std::remove_pointer<LazyEagerVerifyFnType>::type&;
// ParseContext holds all data that is global to the entire parse. Most
// importantly it contains the input stream, but also recursion depth and also
@@ -409,7 +412,7 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream {
// Spawns a child parsing context that inherits key properties. New context
// inherits the following:
// --depth_, data_, check_required_fields_, lazy_parse_mode_
- // The spanwed context always disables aliasing (different input).
+ // The spawned context always disables aliasing (different input).
template <typename... T>
ParseContext Spawn(const char** start, T&&... args) {
ParseContext spawned(depth_, false, start, std::forward<T>(args)...);
@@ -486,10 +489,7 @@ struct EndianHelper<2> {
static uint16_t Load(const void* p) {
uint16_t tmp;
std::memcpy(&tmp, p, 2);
-#ifndef PROTOBUF_LITTLE_ENDIAN
- tmp = bswap_16(tmp);
-#endif
- return tmp;
+ return little_endian::ToHost(tmp);
}
};
@@ -498,10 +498,7 @@ struct EndianHelper<4> {
static arc_ui32 Load(const void* p) {
arc_ui32 tmp;
std::memcpy(&tmp, p, 4);
-#ifndef PROTOBUF_LITTLE_ENDIAN
- tmp = bswap_32(tmp);
-#endif
- return tmp;
+ return little_endian::ToHost(tmp);
}
};
@@ -510,10 +507,7 @@ struct EndianHelper<8> {
static arc_ui64 Load(const void* p) {
arc_ui64 tmp;
std::memcpy(&tmp, p, 8);
-#ifndef PROTOBUF_LITTLE_ENDIAN
- tmp = bswap_64(tmp);
-#endif
- return tmp;
+ return little_endian::ToHost(tmp);
}
};
@@ -584,20 +578,96 @@ inline const char* ReadTag(const char* p, arc_ui32* out,
return tmp.first;
}
+// As above, but optimized to consume very few registers while still being fast,
+// ReadTagInlined is useful for callers that don't mind the extra code but would
+// like to avoid an extern function call causing spills into the stack.
+//
+// Two support routines for ReadTagInlined come first...
+template <class T>
+PROTOBUF_NODISCARD PROTOBUF_ALWAYS_INLINE constexpr T RotateLeft(
+ T x, int s) noexcept {
+ return static_cast<T>(x << (s & (std::numeric_limits<T>::digits - 1))) |
+ static_cast<T>(x >> ((-s) & (std::numeric_limits<T>::digits - 1)));
+}
+
+PROTOBUF_NODISCARD inline PROTOBUF_ALWAYS_INLINE arc_ui64
+RotRight7AndReplaceLowByte(arc_ui64 res, const char& byte) {
+#if defined(__x86_64__) && defined(__GNUC__)
+ // This will only use one register for `res`.
+ // `byte` comes as a reference to allow the compiler to generate code like:
+ //
+ // rorq $7, %rcx
+ // movb 1(%rax), %cl
+ //
+ // which avoids loading the incoming bytes into a separate register first.
+ asm("ror $7,%0\n\t"
+ "movb %1,%b0"
+ : "+r"(res)
+ : "m"(byte));
+#else
+ res = RotateLeft(res, -7);
+ res = res & ~0xFF;
+ res |= 0xFF & byte;
+#endif
+ return res;
+};
+
+inline PROTOBUF_ALWAYS_INLINE
+const char* ReadTagInlined(const char* ptr, arc_ui32* out) {
+ arc_ui64 res = 0xFF & ptr[0];
+ if (PROTOBUF_PREDICT_FALSE(res >= 128)) {
+ res = RotRight7AndReplaceLowByte(res, ptr[1]);
+ if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
+ res = RotRight7AndReplaceLowByte(res, ptr[2]);
+ if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
+ res = RotRight7AndReplaceLowByte(res, ptr[3]);
+ if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
+ // Note: this wouldn't work if res were 32-bit,
+ // because then replacing the low byte would overwrite
+ // the bottom 4 bits of the result.
+ res = RotRight7AndReplaceLowByte(res, ptr[4]);
+ if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
+ // The proto format does not permit longer than 5-byte encodings for
+ // tags.
+ *out = 0;
+ return nullptr;
+ }
+ *out = static_cast<arc_ui32>(RotateLeft(res, 28));
+#if defined(__GNUC__)
+ // Note: this asm statement prevents the compiler from
+ // trying to share the "return ptr + constant" among all
+ // branches.
+ asm("" : "+r"(ptr));
+#endif
+ return ptr + 5;
+ }
+ *out = static_cast<arc_ui32>(RotateLeft(res, 21));
+ return ptr + 4;
+ }
+ *out = static_cast<arc_ui32>(RotateLeft(res, 14));
+ return ptr + 3;
+ }
+ *out = static_cast<arc_ui32>(RotateLeft(res, 7));
+ return ptr + 2;
+ }
+ *out = static_cast<arc_ui32>(res);
+ return ptr + 1;
+}
+
// Decode 2 consecutive bytes of a varint and returns the value, shifted left
// by 1. It simultaneous updates *ptr to *ptr + 1 or *ptr + 2 depending if the
// first byte's continuation bit is set.
// If bit 15 of return value is set (equivalent to the continuation bits of both
// bytes being set) the varint continues, otherwise the parse is done. On x86
// movsx eax, dil
-// add edi, eax
+// and edi, eax
+// add eax, edi
// adc [rsi], 1
-// add eax, eax
-// and eax, edi
inline arc_ui32 DecodeTwoBytes(const char** ptr) {
arc_ui32 value = UnalignedLoad<uint16_t>(*ptr);
// Sign extend the low byte continuation bit
arc_ui32 x = static_cast<int8_t>(value);
+ value &= x; // Mask out the high byte iff no continuation
// This add is an amazing operation, it cancels the low byte continuation bit
// from y transferring it to the carry. Simultaneously it also shifts the 7
// LSB left by one tightly against high byte varint bits. Hence value now
@@ -605,7 +675,7 @@ inline arc_ui32 DecodeTwoBytes(const char** ptr) {
value += x;
// Use the carry to update the ptr appropriately.
*ptr += value < x ? 2 : 1;
- return value & (x + x); // Mask out the high byte iff no continuation
+ return value;
}
// More efficient varint parsing for big varints
diff --git a/contrib/libs/protobuf/src/google/protobuf/port_def.inc b/contrib/libs/protobuf/src/google/protobuf/port_def.inc
index a8f868114c..adba3c8f11 100644
--- a/contrib/libs/protobuf/src/google/protobuf/port_def.inc
+++ b/contrib/libs/protobuf/src/google/protobuf/port_def.inc
@@ -118,6 +118,27 @@
#define PROTOBUF_has_builtin_DEFINED_
#endif
+// Portable PROTOBUF_BUILTIN_BSWAPxx definitions
+// Code must check for availability, e.g.: `defined(PROTOBUF_BUILTIN_BSWAP32)`
+#ifdef PROTOBUF_BUILTIN_BSWAP16
+#error PROTOBUF_BUILTIN_BSWAP16 was previously defined
+#endif
+#ifdef PROTOBUF_BUILTIN_BSWAP32
+#error PROTOBUF_BUILTIN_BSWAP32 was previously defined
+#endif
+#ifdef PROTOBUF_BUILTIN_BSWAP64
+#error PROTOBUF_BUILTIN_BSWAP64 was previously defined
+#endif
+#if defined(__GNUC__) || __has_builtin(__builtin_bswap16)
+#define PROTOBUF_BUILTIN_BSWAP16(x) __builtin_bswap16(x)
+#endif
+#if defined(__GNUC__) || __has_builtin(__builtin_bswap32)
+#define PROTOBUF_BUILTIN_BSWAP32(x) __builtin_bswap32(x)
+#endif
+#if defined(__GNUC__) || __has_builtin(__builtin_bswap64)
+#define PROTOBUF_BUILTIN_BSWAP64(x) __builtin_bswap64(x)
+#endif
+
// Portable check for GCC minimum version:
// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
#if defined(__GNUC__) && defined(__GNUC_MINOR__) \
@@ -157,17 +178,17 @@
#ifdef PROTOBUF_VERSION
#error PROTOBUF_VERSION was previously defined
#endif
-#define PROTOBUF_VERSION 3020002
+#define PROTOBUF_VERSION 3021003
#ifdef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
#error PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC was previously defined
#endif
-#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3020000
+#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3021000
#ifdef PROTOBUF_MIN_PROTOC_VERSION
#error PROTOBUF_MIN_PROTOC_VERSION was previously defined
#endif
-#define PROTOBUF_MIN_PROTOC_VERSION 3020000
+#define PROTOBUF_MIN_PROTOC_VERSION 3021000
#ifdef PROTOBUF_VERSION_SUFFIX
#error PROTOBUF_VERSION_SUFFIX was previously defined
@@ -235,7 +256,8 @@
#endif
#if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \
!defined(_ARCH_PPC) && !defined(__wasm__) && \
- !(defined(_MSC_VER) && defined(_M_IX86))
+ !(defined(_MSC_VER) && defined(_M_IX86)) && \
+ !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24)
# ifndef PROTO2_OPENSOURCE
// Compilation fails on ARM32: b/195943306
// Compilation fails on powerpc64le: b/187985113
@@ -350,7 +372,7 @@
// The minimum library version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3020000
+#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3021000
#ifdef PROTOBUF_RTTI
#error PROTOBUF_RTTI was previously defined
@@ -488,6 +510,10 @@
#error PROTOBUF_FORCE_COPY_IN_MOVE was previously defined
#endif
+#ifdef PROTOBUF_FORCE_RESET_IN_CLEAR
+#error PROTOBUF_FORCE_RESET_IN_CLEAR was previously defined
+#endif
+
// Force copy the default string to a string field so that non-optimized builds
// have harder-to-rely-on address stability.
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
@@ -569,6 +595,22 @@
#define PROTOBUF_THREAD_LOCAL __thread
#endif
+// TODO(b/228173843): cleanup PROTOBUF_LITTLE_ENDIAN in various 3p forks.
+#if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+#define PROTOBUF_LITTLE_ENDIAN 1
+#ifdef PROTOBUF_BIG_ENDIAN
+#error Conflicting PROTOBUF_BIG_ENDIAN was previously defined
+#endif
+#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \
+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define PROTOBUF_BIG_ENDIAN 1
+#elif defined(_WIN32) || defined(__x86_64__) || defined(__aarch64__)
+#define PROTOBUF_LITTLE_ENDIAN 1
+#else
+#error "endian detection failed for current compiler"
+#endif
+
// For enabling message owned arena, one major blocker is semantic change from
// moving to copying when there is ownership transfer (e.g., move ctor, swap,
// set allocated, release). This change not only causes performance regression
@@ -583,24 +625,29 @@
#ifdef PROTOBUF_CONSTINIT
#error PROTOBUF_CONSTINIT was previously defined
#endif
-#if defined(__cpp_constinit)
+#if defined(__cpp_constinit) && !defined(_MSC_VER)
#define PROTOBUF_CONSTINIT constinit
#define PROTOBUF_CONSTEXPR constexpr
// Some older Clang versions incorrectly raise an error about
// constant-initializing weak default instance pointers. Versions 12.0 and
// higher seem to work, except that XCode 12.5.1 shows the error even though it
// uses Clang 12.0.5.
-#elif __has_cpp_attribute(clang::require_constant_initialization) && \
+// Clang-cl on Windows raises error also.
+#elif !defined(_MSC_VER) && __has_cpp_attribute(clang::require_constant_initialization) && \
((defined(__APPLE__) && __clang_major__ >= 13) || \
(!defined(__APPLE__) && __clang_major__ >= 12))
#define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
#define PROTOBUF_CONSTEXPR constexpr
-#elif PROTOBUF_GNUC_MIN(12, 0)
+#elif PROTOBUF_GNUC_MIN(12, 2)
#define PROTOBUF_CONSTINIT __constinit
#define PROTOBUF_CONSTEXPR constexpr
+// MSVC 17 currently seems to raise an error about constant-initialized pointers.
+#elif defined(_MSC_VER) && _MSC_VER >= 1930
+#define PROTOBUF_CONSTINIT
+#define PROTOBUF_CONSTEXPR constexpr
#else
#define PROTOBUF_CONSTINIT
-#define PROTOBUF_CONSTEXPR inline
+#define PROTOBUF_CONSTEXPR
#endif
// Some globals with an empty non-trivial destructor are annotated with
@@ -758,6 +805,8 @@
#undef ERROR_INSTALL_FAILED
#pragma push_macro("ERROR_NOT_FOUND")
#undef ERROR_NOT_FOUND
+#pragma push_macro("GetClassName")
+#undef GetClassName
#pragma push_macro("GetMessage")
#undef GetMessage
#pragma push_macro("GetObject")
@@ -805,6 +854,9 @@
#undef TRUE
#pragma push_macro("FALSE")
#undef FALSE
+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs.
+#pragma push_macro("UID_MAX")
+#undef UID_MAX
#endif // __APPLE__
#if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER)
@@ -815,18 +867,20 @@
#endif // defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER)
#if defined(__clang__)
-#pragma clang diagnostic push
-// TODO(gerbens) ideally we cleanup the code. But a cursory try shows many
-// violations. So let's ignore for now.
-#pragma clang diagnostic ignored "-Wshorten-64-to-32"
#pragma clang diagnostic ignored "-Wunused-parameter"
-#elif PROTOBUF_GNUC_MIN(3, 0)
+#pragma clang diagnostic ignored "-Wshorten-64-to-32"
+#endif // defined(__clang__)
+#if PROTOBUF_GNUC_MIN(3, 0)
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wshorten-64-to-32"
+#endif // PROTOBUF_GNUC_MIN(3, 0)
+
+#if PROTOBUF_GNUC_MIN(3, 0)
// GCC does not allow disabling diagnostics within an expression:
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60875, so we disable this one
// globally even though it's only used for PROTOBUF_FIELD_OFFSET.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
// Silence some MSVC warnings in all our code.
diff --git a/contrib/libs/protobuf/src/google/protobuf/port_undef.inc b/contrib/libs/protobuf/src/google/protobuf/port_undef.inc
index 156559e531..e880fa5c59 100644
--- a/contrib/libs/protobuf/src/google/protobuf/port_undef.inc
+++ b/contrib/libs/protobuf/src/google/protobuf/port_undef.inc
@@ -34,6 +34,10 @@
#ifndef PROTOBUF_NAMESPACE
#error "port_undef.inc must be included after port_def.inc"
#endif
+
+#undef PROTOBUF_BUILTIN_BSWAP16
+#undef PROTOBUF_BUILTIN_BSWAP32
+#undef PROTOBUF_BUILTIN_BSWAP64
#undef PROTOBUF_GNUC_MIN
#undef PROTOBUF_MSC_VER_MIN
#undef PROTOBUF_CPLUSPLUS_MIN
@@ -67,6 +71,7 @@
#undef PROTOBUF_FORCE_COPY_IN_RELEASE
#undef PROTOBUF_FORCE_COPY_IN_SWAP
#undef PROTOBUF_FORCE_COPY_IN_MOVE
+#undef PROTOBUF_FORCE_RESET_IN_CLEAR
#undef PROTOBUF_FORCE_COPY_DEFAULT_STRING
#undef PROTOBUF_NAMESPACE_OPEN
#undef PROTOBUF_NAMESPACE_CLOSE
@@ -78,6 +83,8 @@
#undef PROTOBUF_FINAL
#undef PROTOBUF_FUTURE_FINAL
#undef PROTOBUF_THREAD_LOCAL
+#undef PROTOBUF_LITTLE_ENDIAN
+#undef PROTOBUF_BIG_ENDIAN
#undef PROTOBUF_MESSAGE_OWNED_ARENA_EXPERIMENT
#undef PROTOBUF_CONSTINIT
#undef PROTOBUF_CONSTEXPR
@@ -111,6 +118,7 @@
#pragma pop_macro("ERROR_BUSY")
#pragma pop_macro("ERROR_INSTALL_FAILED")
#pragma pop_macro("ERROR_NOT_FOUND")
+#pragma pop_macro("GetClassName")
#pragma pop_macro("GetMessage")
#pragma pop_macro("GetObject")
#pragma pop_macro("IGNORE")
@@ -135,15 +143,14 @@
#pragma pop_macro("DOMAIN")
#pragma pop_macro("TRUE")
#pragma pop_macro("FALSE")
+#pragma pop_macro("UID_MAX")
#endif // __APPLE__
#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER)
#pragma pop_macro("DEBUG")
#endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER)
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#elif defined(__GNUC__)
+#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
diff --git a/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc b/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
index 92287d7470..566dfaa86f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
@@ -170,8 +170,10 @@ void ReflectionOps::Merge(const Message& from, Message* to) {
}
}
- to_reflection->MutableUnknownFields(to)->MergeFrom(
- from_reflection->GetUnknownFields(from));
+ if (!from_reflection->GetUnknownFields(from).empty()) {
+ to_reflection->MutableUnknownFields(to)->MergeFrom(
+ from_reflection->GetUnknownFields(from));
+ }
}
void ReflectionOps::Clear(Message* message) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
index 27f1df72f9..171cd065b2 100644
--- a/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
+++ b/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
@@ -346,7 +346,7 @@ class RepeatedField {
int total_size_;
// Pad the Rep after arena allow for power-of-two byte sizes when
// sizeof(Element) > sizeof(Arena*). eg for 16-byte objects.
- static constexpr size_t kRepHeaderSize =
+ static PROTOBUF_CONSTEXPR const size_t kRepHeaderSize =
sizeof(Arena*) < sizeof(Element) ? sizeof(Element) : sizeof(Arena*);
struct Rep {
Arena* arena;
@@ -547,7 +547,7 @@ RepeatedField<Element>::~RepeatedField() {
#ifndef NDEBUG
// Try to trigger segfault / asan failure in non-opt builds if arena_
// lifetime has ended before the destructor.
- auto arena = GetArena();
+ auto arena = GetOwningArena();
if (arena) (void)arena->SpaceAllocated();
#endif
if (total_size_ > 0) {
@@ -571,7 +571,7 @@ inline RepeatedField<Element>::RepeatedField(RepeatedField&& other) noexcept
// We don't just call Swap(&other) here because it would perform 3 copies if
// other is on an arena. This field can't be on an arena because arena
// construction always uses the Arena* accepting constructor.
- if (other.GetArena()) {
+ if (other.GetOwningArena()) {
CopyFrom(other);
} else {
InternalSwap(&other);
@@ -585,9 +585,9 @@ inline RepeatedField<Element>& RepeatedField<Element>::operator=(
// We don't just call Swap(&other) here because it would perform 3 copies if
// the two fields are on different arenas.
if (this != &other) {
- if (GetArena() != other.GetArena()
+ if (GetOwningArena() != other.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
- || GetArena() == nullptr
+ || GetOwningArena() == nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
CopyFrom(other);
@@ -831,13 +831,14 @@ template <typename Element>
void RepeatedField<Element>::Swap(RepeatedField* other) {
if (this == other) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetArena() != nullptr && GetArena() == other->GetArena()) {
+ if (GetOwningArena() != nullptr &&
+ GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetArena() == other->GetArena()) {
+ if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
- RepeatedField<Element> temp(other->GetArena());
+ RepeatedField<Element> temp(other->GetOwningArena());
temp.MergeFrom(*this);
CopyFrom(*other);
other->UnsafeArenaSwap(&temp);
@@ -847,7 +848,7 @@ void RepeatedField<Element>::Swap(RepeatedField* other) {
template <typename Element>
void RepeatedField<Element>::UnsafeArenaSwap(RepeatedField* other) {
if (this == other) return;
- GOOGLE_DCHECK_EQ(GetArena(), other->GetArena());
+ GOOGLE_DCHECK_EQ(GetOwningArena(), other->GetOwningArena());
InternalSwap(other);
}
@@ -928,7 +929,7 @@ void RepeatedField<Element>::Reserve(int new_size) {
if (total_size_ >= new_size) return;
Rep* old_rep = total_size_ > 0 ? rep() : nullptr;
Rep* new_rep;
- Arena* arena = GetArena();
+ Arena* arena = GetOwningArena();
new_size = internal::CalculateReserveSize<Element, kRepHeaderSize>(
total_size_, new_size);
diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.cc b/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.cc
index a8ba509882..7886494a3d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.cc
@@ -56,7 +56,7 @@ void** RepeatedPtrFieldBase::InternalExtend(int extend_amount) {
return &rep_->elements[current_size_];
}
Rep* old_rep = rep_;
- Arena* arena = GetArena();
+ Arena* arena = GetOwningArena();
new_size = internal::CalculateReserveSize<void*, kRepHeaderSize>(total_size_,
new_size);
GOOGLE_CHECK_LE(static_cast<arc_i64>(new_size),
diff --git a/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.h b/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.h
index 94b1281af7..70776f7489 100644
--- a/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.h
+++ b/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.h
@@ -376,9 +376,10 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
template <typename TypeHandler>
PROTOBUF_NDEBUG_INLINE void Swap(RepeatedPtrFieldBase* other) {
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetArena() != nullptr && GetArena() == other->GetArena())
+ if (GetOwningArena() != nullptr &&
+ GetOwningArena() == other->GetOwningArena())
#else // PROTOBUF_FORCE_COPY_IN_SWAP
- if (GetArena() == other->GetArena())
+ if (GetOwningArena() == other->GetOwningArena())
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
{
InternalSwap(other);
@@ -479,8 +480,8 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
template <typename TypeHandler>
void AddCleared(typename TypeHandler::Type* value) {
- GOOGLE_DCHECK(GetArena() == nullptr) << "AddCleared() can only be used on a "
- "RepeatedPtrField not on an arena.";
+ GOOGLE_DCHECK(GetOwningArena() == nullptr) << "AddCleared() can only be used on a "
+ "RepeatedPtrField not on an arena.";
GOOGLE_DCHECK(TypeHandler::GetOwningArena(value) == nullptr)
<< "AddCleared() can only accept values not on an arena.";
if (!rep_ || rep_->allocated_size == total_size_) {
@@ -491,10 +492,10 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
template <typename TypeHandler>
PROTOBUF_NODISCARD typename TypeHandler::Type* ReleaseCleared() {
- GOOGLE_DCHECK(GetArena() == nullptr)
+ GOOGLE_DCHECK(GetOwningArena() == nullptr)
<< "ReleaseCleared() can only be used on a RepeatedPtrField not on "
<< "an arena.";
- GOOGLE_DCHECK(GetArena() == nullptr);
+ GOOGLE_DCHECK(GetOwningArena() == nullptr);
GOOGLE_DCHECK(rep_ != nullptr);
GOOGLE_DCHECK_GT(rep_->allocated_size, current_size_);
return cast<TypeHandler>(rep_->elements[--rep_->allocated_size]);
@@ -505,7 +506,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
// AddAllocated version that implements arena-safe copying behavior.
Arena* element_arena =
reinterpret_cast<Arena*>(TypeHandler::GetOwningArena(value));
- Arena* arena = GetArena();
+ Arena* arena = GetOwningArena();
if (arena == element_arena && rep_ && rep_->allocated_size < total_size_) {
// Fast path: underlying arena representation (tagged pointer) is equal to
// our arena pointer, and we can add to array without resizing it (at
@@ -575,7 +576,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
// First, release an element.
typename TypeHandler::Type* result = UnsafeArenaReleaseLast<TypeHandler>();
// Now perform a copy if we're on an arena.
- Arena* arena = GetArena();
+ Arena* arena = GetOwningArena();
typename TypeHandler::Type* new_result;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
@@ -593,7 +594,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
// this is the same as UnsafeArenaReleaseLast(). Note that we GOOGLE_DCHECK-fail if
// we're on an arena, since the user really should implement the copy
// operation in this case.
- GOOGLE_DCHECK(GetArena() == nullptr)
+ GOOGLE_DCHECK(GetOwningArena() == nullptr)
<< "ReleaseLast() called on a RepeatedPtrField that is on an arena, "
<< "with a type that does not implement MergeFrom. This is unsafe; "
<< "please implement MergeFrom for your type.";
@@ -603,15 +604,16 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
template <typename TypeHandler>
PROTOBUF_NOINLINE void SwapFallback(RepeatedPtrFieldBase* other) {
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
- GOOGLE_DCHECK(GetArena() == nullptr || other->GetArena() != GetArena());
+ GOOGLE_DCHECK(GetOwningArena() == nullptr ||
+ other->GetOwningArena() != GetOwningArena());
#else // PROTOBUF_FORCE_COPY_IN_SWAP
- GOOGLE_DCHECK(other->GetArena() != GetArena());
+ GOOGLE_DCHECK(other->GetOwningArena() != GetOwningArena());
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
// Copy semantics in this case. We try to improve efficiency by placing the
// temporary on |other|'s arena so that messages are copied twice rather
// than three times.
- RepeatedPtrFieldBase temp(other->GetArena());
+ RepeatedPtrFieldBase temp(other->GetOwningArena());
temp.MergeFrom<TypeHandler>(*this);
this->Clear<TypeHandler>();
this->MergeFrom<TypeHandler>(*other);
@@ -621,11 +623,12 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
inline Arena* GetArena() const { return arena_; }
+ protected:
+ inline Arena* GetOwningArena() const { return arena_; }
+
private:
template <typename T> friend class Arena::InternalHelper;
- inline Arena* GetOwningArena() const { return arena_; }
-
static constexpr int kInitialSize = 0;
// A few notes on internal representation:
//
@@ -685,7 +688,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase {
void** other_elems, int length,
int already_allocated) {
if (already_allocated < length) {
- Arena* arena = GetArena();
+ Arena* arena = GetOwningArena();
typename TypeHandler::Type* elem_prototype =
reinterpret_cast<typename TypeHandler::Type*>(other_elems[0]);
for (int i = already_allocated; i < length; i++) {
@@ -758,7 +761,7 @@ class GenericTypeHandler {
static inline GenericType* New(Arena* arena, GenericType&& value) {
return Arena::Create<GenericType>(arena, std::move(value));
}
- static inline GenericType* NewFromPrototype(const GenericType* prototype,
+ static inline GenericType* NewFromPrototype(const GenericType* /*prototype*/,
Arena* arena = nullptr) {
return New(arena);
}
@@ -881,8 +884,28 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
const Element& Get(int index) const;
Element* Mutable(int index);
+
+ // Unlike std::vector, adding an element to a RepeatedPtrField doesn't always
+ // make a new element; it might re-use an element left over from when the
+ // field was Clear()'d or reize()'d smaller. For this reason, Add() is the
+ // fastest API for adding a new element.
Element* Add();
+
+ // `Add(std::move(value));` is equivalent to `*Add() = std::move(value);`
+ // It will either move-construct to the end of this field, or swap value
+ // with the new-or-recycled element at the end of this field. Note that
+ // this operation is very slow if this RepeatedPtrField is not on the
+ // same Arena, if any, as `value`.
void Add(Element&& value);
+
+ // Copying to the end of this RepeatedPtrField is slowest of all; it can't
+ // reliably copy-construct to the last element of this RepeatedPtrField, for
+ // example (unlike std::vector).
+ // We currently block this API. The right way to add to the end is to call
+ // Add() and modify the element it points to.
+ // If you must add an existing value, call `*Add() = value;`
+ void Add(const Element& value) = delete;
+
// Append elements in the range [begin, end) after reserving
// the appropriate number of elements.
template <typename Iter>
@@ -1119,6 +1142,9 @@ class RepeatedPtrField : private internal::RepeatedPtrFieldBase {
// Note: RepeatedPtrField SHOULD NOT be subclassed by users.
class TypeHandler;
+ // Internal version of GetArena().
+ inline Arena* GetOwningArena() const;
+
// Implementations for ExtractSubrange(). The copying behavior must be
// included only if the type supports the necessary operations (e.g.,
// MergeFrom()), so we must resolve this at compile time. ExtractSubrange()
@@ -1198,7 +1224,7 @@ inline RepeatedPtrField<Element>::RepeatedPtrField(
// We don't just call Swap(&other) here because it would perform 3 copies if
// other is on an arena. This field can't be on an arena because arena
// construction always uses the Arena* accepting constructor.
- if (other.GetArena()) {
+ if (other.GetOwningArena()) {
CopyFrom(other);
} else {
InternalSwap(&other);
@@ -1212,9 +1238,9 @@ inline RepeatedPtrField<Element>& RepeatedPtrField<Element>::operator=(
// We don't just call Swap(&other) here because it would perform 3 copies if
// the two fields are on different arenas.
if (this != &other) {
- if (GetArena() != other.GetArena()
+ if (GetOwningArena() != other.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
- || GetArena() == nullptr
+ || GetOwningArena() == nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
CopyFrom(other);
@@ -1323,7 +1349,7 @@ inline void RepeatedPtrField<Element>::ExtractSubrangeInternal(
return;
}
- Arena* arena = GetArena();
+ Arena* arena = GetOwningArena();
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
// Always copy.
for (int i = 0; i < num; ++i) {
@@ -1361,7 +1387,7 @@ inline void RepeatedPtrField<Element>::ExtractSubrangeInternal(
// ExtractSubrange() must return heap-allocated objects by contract, and we
// cannot fulfill this contract if we are an on arena, we must GOOGLE_DCHECK() that
// we are not on an arena.
- GOOGLE_DCHECK(GetArena() == nullptr)
+ GOOGLE_DCHECK(GetOwningArena() == nullptr)
<< "ExtractSubrange() when arena is non-nullptr is only supported when "
<< "the Element type supplies a MergeFrom() operation to make copies.";
UnsafeArenaExtractSubrange(start, num, elements);
@@ -1443,7 +1469,7 @@ template <typename Element>
inline void RepeatedPtrField<Element>::UnsafeArenaSwap(
RepeatedPtrField* other) {
if (this == other) return;
- GOOGLE_DCHECK_EQ(GetArena(), other->GetArena());
+ GOOGLE_DCHECK_EQ(GetOwningArena(), other->GetOwningArena());
RepeatedPtrFieldBase::InternalSwap(other);
}
@@ -1458,6 +1484,11 @@ inline Arena* RepeatedPtrField<Element>::GetArena() const {
}
template <typename Element>
+inline Arena* RepeatedPtrField<Element>::GetOwningArena() const {
+ return RepeatedPtrFieldBase::GetOwningArena();
+}
+
+template <typename Element>
inline size_t RepeatedPtrField<Element>::SpaceUsedExcludingSelfLong() const {
return RepeatedPtrFieldBase::SpaceUsedExcludingSelfLong<TypeHandler>();
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
index 63f464bc8a..498a5478e0 100644
--- a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
@@ -22,8 +22,9 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR SourceContext::SourceContext(
- ::_pbi::ConstantInitialized)
- : file_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.file_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct SourceContextDefaultTypeInternal {
PROTOBUF_CONSTEXPR SourceContextDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -45,7 +46,7 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, _impl_.file_name_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceContext)},
@@ -89,28 +90,40 @@ class SourceContext::_Internal {
SourceContext::SourceContext(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.SourceContext)
}
SourceContext::SourceContext(const SourceContext& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ SourceContext* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.file_name_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- file_name_.InitDefault();
+ _impl_.file_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- file_name_.Set("", GetArenaForAllocation());
+ _impl_.file_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_file_name().empty()) {
- file_name_.Set(from._internal_file_name(),
- GetArenaForAllocation());
+ _this->_impl_.file_name_.Set(from._internal_file_name(),
+ _this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
}
-inline void SourceContext::SharedCtor() {
-file_name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- file_name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+inline void SourceContext::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.file_name_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.file_name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.file_name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
SourceContext::~SourceContext() {
@@ -124,11 +137,11 @@ SourceContext::~SourceContext() {
inline void SourceContext::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- file_name_.Destroy();
+ _impl_.file_name_.Destroy();
}
void SourceContext::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void SourceContext::Clear() {
@@ -137,7 +150,7 @@ void SourceContext::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- file_name_.ClearToEmpty();
+ _impl_.file_name_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -219,32 +232,28 @@ size_t SourceContext::ByteSizeLong() const {
this->_internal_file_name());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SourceContext::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
SourceContext::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SourceContext::GetClassData() const { return &_class_data_; }
-void SourceContext::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<SourceContext *>(to)->MergeFrom(
- static_cast<const SourceContext &>(from));
-}
-
-void SourceContext::MergeFrom(const SourceContext& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
- GOOGLE_DCHECK_NE(&from, this);
+void SourceContext::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<SourceContext*>(&to_msg);
+ auto& from = static_cast<const SourceContext&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_file_name().empty()) {
- _internal_set_file_name(from._internal_file_name());
+ _this->_internal_set_file_name(from._internal_file_name());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SourceContext::CopyFrom(const SourceContext& from) {
@@ -264,8 +273,8 @@ void SourceContext::InternalSwap(SourceContext* other) {
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &file_name_, lhs_arena,
- &other->file_name_, rhs_arena
+ &_impl_.file_name_, lhs_arena,
+ &other->_impl_.file_name_, rhs_arena
);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h
index 56be038c96..f4ac68863f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/source_context.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -136,9 +136,11 @@ class PROTOBUF_EXPORT SourceContext final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const SourceContext& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const SourceContext& from);
+ void MergeFrom( const SourceContext& from) {
+ SourceContext::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -147,10 +149,10 @@ class PROTOBUF_EXPORT SourceContext final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(SourceContext* other);
@@ -198,8 +200,11 @@ class PROTOBUF_EXPORT SourceContext final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_name_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_name_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto;
};
// ===================================================================
@@ -215,7 +220,7 @@ class PROTOBUF_EXPORT SourceContext final :
// string file_name = 1;
inline void SourceContext::clear_file_name() {
- file_name_.ClearToEmpty();
+ _impl_.file_name_.ClearToEmpty();
}
inline const TProtoStringType& SourceContext::file_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name)
@@ -225,7 +230,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void SourceContext::set_file_name(ArgT0&& arg0, ArgT... args) {
- file_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.file_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name)
}
inline TProtoStringType* SourceContext::mutable_file_name() {
@@ -234,19 +239,19 @@ inline TProtoStringType* SourceContext::mutable_file_name() {
return _s;
}
inline const TProtoStringType& SourceContext::_internal_file_name() const {
- return file_name_.Get();
+ return _impl_.file_name_.Get();
}
inline void SourceContext::_internal_set_file_name(const TProtoStringType& value) {
- file_name_.Set(value, GetArenaForAllocation());
+ _impl_.file_name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* SourceContext::_internal_mutable_file_name() {
- return file_name_.Mutable(GetArenaForAllocation());
+ return _impl_.file_name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* SourceContext::release_file_name() {
// @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_name)
- return file_name_.Release();
+ return _impl_.file_name_.Release();
}
inline void SourceContext::set_allocated_file_name(TProtoStringType* file_name) {
if (file_name != nullptr) {
@@ -254,10 +259,10 @@ inline void SourceContext::set_allocated_file_name(TProtoStringType* file_name)
} else {
}
- file_name_.SetAllocated(file_name, GetArenaForAllocation());
+ _impl_.file_name_.SetAllocated(file_name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (file_name_.IsDefault()) {
- file_name_.Set("", GetArenaForAllocation());
+ if (_impl_.file_name_.IsDefault()) {
+ _impl_.file_name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name)
diff --git a/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc b/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
index 5d0f7619c9..cdd74ec1ee 100644
--- a/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
@@ -22,7 +22,7 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(
- ::_pbi::ConstantInitialized){}
+ ::_pbi::ConstantInitialized) {}
struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUseDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -33,8 +33,9 @@ struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
PROTOBUF_CONSTEXPR Struct::Struct(
- ::_pbi::ConstantInitialized)
- : fields_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.fields_)*/{::_pbi::ConstantInitialized()}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct StructDefaultTypeInternal {
PROTOBUF_CONSTEXPR StructDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -45,8 +46,10 @@ struct StructDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructDefaultTypeInternal _Struct_default_instance_;
PROTOBUF_CONSTEXPR Value::Value(
- ::_pbi::ConstantInitialized)
- : _oneof_case_{}{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.kind_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_._oneof_case_)*/{}} {}
struct ValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR ValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -57,8 +60,9 @@ struct ValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_;
PROTOBUF_CONSTEXPR ListValue::ListValue(
- ::_pbi::ConstantInitialized)
- : values_(){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.values_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct ListValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR ListValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -90,11 +94,11 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBU
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct, fields_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct, _impl_.fields_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _impl_._oneof_case_[0]),
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
::_pbi::kInvalidFieldOffsetTag,
@@ -103,14 +107,14 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBU
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, kind_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _impl_.kind_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, values_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, _impl_.values_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 8, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
@@ -196,9 +200,8 @@ class Struct::_Internal {
Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- fields_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
if (arena != nullptr && !is_message_owned) {
arena->OwnCustomDestructor(this, &Struct::ArenaDtor);
}
@@ -206,12 +209,24 @@ Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena,
}
Struct::Struct(const Struct& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Struct* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_.fields_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- fields_.MergeFrom(from.fields_);
+ _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
}
-inline void Struct::SharedCtor() {
+inline void Struct::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ /*decltype(_impl_.fields_)*/{::_pbi::ArenaInitialized(), arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
Struct::~Struct() {
@@ -226,15 +241,16 @@ Struct::~Struct() {
inline void Struct::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- fields_.Destruct();
+ _impl_.fields_.Destruct();
+ _impl_.fields_.~MapField();
}
void Struct::ArenaDtor(void* object) {
Struct* _this = reinterpret_cast< Struct* >(object);
- _this->fields_.Destruct();
+ _this->_impl_.fields_.Destruct();
}
void Struct::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Struct::Clear() {
@@ -243,7 +259,7 @@ void Struct::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- fields_.Clear();
+ _impl_.fields_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -259,7 +275,7 @@ const char* Struct::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
ptr -= 1;
do {
ptr += 1;
- ptr = ctx->ParseMessage(&fields_, ptr);
+ ptr = ctx->ParseMessage(&_impl_.fields_, ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
@@ -346,30 +362,26 @@ size_t Struct::ByteSizeLong() const {
total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Struct::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Struct::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Struct::GetClassData() const { return &_class_data_; }
-void Struct::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Struct *>(to)->MergeFrom(
- static_cast<const Struct &>(from));
-}
-
-void Struct::MergeFrom(const Struct& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
- GOOGLE_DCHECK_NE(&from, this);
+void Struct::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Struct*>(&to_msg);
+ auto& from = static_cast<const Struct&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- fields_.MergeFrom(from.fields_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Struct::CopyFrom(const Struct& from) {
@@ -386,7 +398,7 @@ bool Struct::IsInitialized() const {
void Struct::InternalSwap(Struct* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- fields_.InternalSwap(&other->fields_);
+ _impl_.fields_.InternalSwap(&other->_impl_.fields_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const {
@@ -405,11 +417,11 @@ class Value::_Internal {
const ::PROTOBUF_NAMESPACE_ID::Struct&
Value::_Internal::struct_value(const Value* msg) {
- return *msg->kind_.struct_value_;
+ return *msg->_impl_.kind_.struct_value_;
}
const ::PROTOBUF_NAMESPACE_ID::ListValue&
Value::_Internal::list_value(const Value* msg) {
- return *msg->kind_.list_value_;
+ return *msg->_impl_.kind_.list_value_;
}
void Value::set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
@@ -422,7 +434,7 @@ void Value::set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_v
message_arena, struct_value, submessage_arena);
}
set_has_struct_value();
- kind_.struct_value_ = struct_value;
+ _impl_.kind_.struct_value_ = struct_value;
}
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
}
@@ -437,43 +449,51 @@ void Value::set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_va
message_arena, list_value, submessage_arena);
}
set_has_list_value();
- kind_.list_value_ = list_value;
+ _impl_.kind_.list_value_ = list_value;
}
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
}
Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
}
Value::Value(const Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Value* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.kind_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_._oneof_case_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
clear_has_kind();
switch (from.kind_case()) {
case kNullValue: {
- _internal_set_null_value(from._internal_null_value());
+ _this->_internal_set_null_value(from._internal_null_value());
break;
}
case kNumberValue: {
- _internal_set_number_value(from._internal_number_value());
+ _this->_internal_set_number_value(from._internal_number_value());
break;
}
case kStringValue: {
- _internal_set_string_value(from._internal_string_value());
+ _this->_internal_set_string_value(from._internal_string_value());
break;
}
case kBoolValue: {
- _internal_set_bool_value(from._internal_bool_value());
+ _this->_internal_set_bool_value(from._internal_bool_value());
break;
}
case kStructValue: {
- _internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
+ _this->_internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(
+ from._internal_struct_value());
break;
}
case kListValue: {
- _internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
+ _this->_internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(
+ from._internal_list_value());
break;
}
case KIND_NOT_SET: {
@@ -483,8 +503,16 @@ Value::Value(const Value& from)
// @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
}
-inline void Value::SharedCtor() {
-clear_has_kind();
+inline void Value::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.kind_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_._oneof_case_)*/{}
+ };
+ clear_has_kind();
}
Value::~Value() {
@@ -504,7 +532,7 @@ inline void Value::SharedDtor() {
}
void Value::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Value::clear_kind() {
@@ -519,7 +547,7 @@ void Value::clear_kind() {
break;
}
case kStringValue: {
- kind_.string_value_.Destroy();
+ _impl_.kind_.string_value_.Destroy();
break;
}
case kBoolValue: {
@@ -528,13 +556,13 @@ void Value::clear_kind() {
}
case kStructValue: {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.struct_value_;
+ delete _impl_.kind_.struct_value_;
}
break;
}
case kListValue: {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.list_value_;
+ delete _impl_.kind_.list_value_;
}
break;
}
@@ -542,7 +570,7 @@ void Value::clear_kind() {
break;
}
}
- _oneof_case_[0] = KIND_NOT_SET;
+ _impl_._oneof_case_[0] = KIND_NOT_SET;
}
@@ -729,72 +757,70 @@ size_t Value::ByteSizeLong() const {
case kStructValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *kind_.struct_value_);
+ *_impl_.kind_.struct_value_);
break;
}
// .google.protobuf.ListValue list_value = 6;
case kListValue: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *kind_.list_value_);
+ *_impl_.kind_.list_value_);
break;
}
case KIND_NOT_SET: {
break;
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Value::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Value::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Value::GetClassData() const { return &_class_data_; }
-void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Value *>(to)->MergeFrom(
- static_cast<const Value &>(from));
-}
-
-void Value::MergeFrom(const Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
- GOOGLE_DCHECK_NE(&from, this);
+void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Value*>(&to_msg);
+ auto& from = static_cast<const Value&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
switch (from.kind_case()) {
case kNullValue: {
- _internal_set_null_value(from._internal_null_value());
+ _this->_internal_set_null_value(from._internal_null_value());
break;
}
case kNumberValue: {
- _internal_set_number_value(from._internal_number_value());
+ _this->_internal_set_number_value(from._internal_number_value());
break;
}
case kStringValue: {
- _internal_set_string_value(from._internal_string_value());
+ _this->_internal_set_string_value(from._internal_string_value());
break;
}
case kBoolValue: {
- _internal_set_bool_value(from._internal_bool_value());
+ _this->_internal_set_bool_value(from._internal_bool_value());
break;
}
case kStructValue: {
- _internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value());
+ _this->_internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(
+ from._internal_struct_value());
break;
}
case kListValue: {
- _internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value());
+ _this->_internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(
+ from._internal_list_value());
break;
}
case KIND_NOT_SET: {
break;
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Value::CopyFrom(const Value& from) {
@@ -811,8 +837,8 @@ bool Value::IsInitialized() const {
void Value::InternalSwap(Value* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(kind_, other->kind_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
+ swap(_impl_.kind_, other->_impl_.kind_);
+ swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}
::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
@@ -829,19 +855,29 @@ class ListValue::_Internal {
ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- values_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
}
ListValue::ListValue(const ListValue& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- values_(from.values_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ ListValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.values_){from._impl_.values_}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
}
-inline void ListValue::SharedCtor() {
+inline void ListValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.values_){arena}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
ListValue::~ListValue() {
@@ -855,10 +891,11 @@ ListValue::~ListValue() {
inline void ListValue::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
+ _impl_.values_.~RepeatedPtrField();
}
void ListValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void ListValue::Clear() {
@@ -867,7 +904,7 @@ void ListValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- values_.Clear();
+ _impl_.values_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -945,35 +982,31 @@ size_t ListValue::ByteSizeLong() const {
// repeated .google.protobuf.Value values = 1;
total_size += 1UL * this->_internal_values_size();
- for (const auto& msg : this->values_) {
+ for (const auto& msg : this->_impl_.values_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
ListValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListValue::GetClassData() const { return &_class_data_; }
-void ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<ListValue *>(to)->MergeFrom(
- static_cast<const ListValue &>(from));
-}
-
-void ListValue::MergeFrom(const ListValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
- GOOGLE_DCHECK_NE(&from, this);
+void ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<ListValue*>(&to_msg);
+ auto& from = static_cast<const ListValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- values_.MergeFrom(from.values_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_impl_.values_.MergeFrom(from._impl_.values_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ListValue::CopyFrom(const ListValue& from) {
@@ -990,7 +1023,7 @@ bool ListValue::IsInitialized() const {
void ListValue::InternalSwap(ListValue* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- values_.InternalSwap(&other->values_);
+ _impl_.values_.InternalSwap(&other->_impl_.values_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/struct.pb.h b/contrib/libs/protobuf/src/google/protobuf/struct.pb.h
index ccdb792184..b5d353e1a5 100644
--- a/contrib/libs/protobuf/src/google/protobuf/struct.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/struct.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -202,9 +202,11 @@ class PROTOBUF_EXPORT Struct final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Struct& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Struct& from);
+ void MergeFrom( const Struct& from) {
+ Struct::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -213,10 +215,10 @@ class PROTOBUF_EXPORT Struct final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Struct* other);
@@ -270,12 +272,15 @@ class PROTOBUF_EXPORT Struct final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::MapField<
- Struct_FieldsEntry_DoNotUse,
- TProtoStringType, ::PROTOBUF_NAMESPACE_ID::Value,
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> fields_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::MapField<
+ Struct_FieldsEntry_DoNotUse,
+ TProtoStringType, ::PROTOBUF_NAMESPACE_ID::Value,
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> fields_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
};
// -------------------------------------------------------------------
@@ -370,9 +375,11 @@ class PROTOBUF_EXPORT Value final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Value& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Value& from);
+ void MergeFrom( const Value& from) {
+ Value::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -381,10 +388,10 @@ class PROTOBUF_EXPORT Value final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Value* other);
@@ -527,19 +534,22 @@ class PROTOBUF_EXPORT Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- union KindUnion {
- constexpr KindUnion() : _constinit_{} {}
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
- int null_value_;
- double number_value_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
- bool bool_value_;
- ::PROTOBUF_NAMESPACE_ID::Struct* struct_value_;
- ::PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
- } kind_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- arc_ui32 _oneof_case_[1];
+ struct Impl_ {
+ union KindUnion {
+ constexpr KindUnion() : _constinit_{} {}
+ ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
+ int null_value_;
+ double number_value_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
+ bool bool_value_;
+ ::PROTOBUF_NAMESPACE_ID::Struct* struct_value_;
+ ::PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
+ } kind_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ arc_ui32 _oneof_case_[1];
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
};
// -------------------------------------------------------------------
@@ -624,9 +634,11 @@ class PROTOBUF_EXPORT ListValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const ListValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const ListValue& from);
+ void MergeFrom( const ListValue& from) {
+ ListValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -635,10 +647,10 @@ class PROTOBUF_EXPORT ListValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(ListValue* other);
@@ -690,8 +702,11 @@ class PROTOBUF_EXPORT ListValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value > values_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value > values_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
};
// ===================================================================
@@ -709,17 +724,17 @@ class PROTOBUF_EXPORT ListValue final :
// map<string, .google.protobuf.Value> fields = 1;
inline int Struct::_internal_fields_size() const {
- return fields_.size();
+ return _impl_.fields_.size();
}
inline int Struct::fields_size() const {
return _internal_fields_size();
}
inline void Struct::clear_fields() {
- fields_.Clear();
+ _impl_.fields_.Clear();
}
inline const ::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, ::PROTOBUF_NAMESPACE_ID::Value >&
Struct::_internal_fields() const {
- return fields_.GetMap();
+ return _impl_.fields_.GetMap();
}
inline const ::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, ::PROTOBUF_NAMESPACE_ID::Value >&
Struct::fields() const {
@@ -728,7 +743,7 @@ Struct::fields() const {
}
inline ::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, ::PROTOBUF_NAMESPACE_ID::Value >*
Struct::_internal_mutable_fields() {
- return fields_.MutableMap();
+ return _impl_.fields_.MutableMap();
}
inline ::PROTOBUF_NAMESPACE_ID::Map< TProtoStringType, ::PROTOBUF_NAMESPACE_ID::Value >*
Struct::mutable_fields() {
@@ -748,17 +763,17 @@ inline bool Value::has_null_value() const {
return _internal_has_null_value();
}
inline void Value::set_has_null_value() {
- _oneof_case_[0] = kNullValue;
+ _impl_._oneof_case_[0] = kNullValue;
}
inline void Value::clear_null_value() {
if (_internal_has_null_value()) {
- kind_.null_value_ = 0;
+ _impl_.kind_.null_value_ = 0;
clear_has_kind();
}
}
inline ::PROTOBUF_NAMESPACE_ID::NullValue Value::_internal_null_value() const {
if (_internal_has_null_value()) {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::NullValue >(kind_.null_value_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::NullValue >(_impl_.kind_.null_value_);
}
return static_cast< ::PROTOBUF_NAMESPACE_ID::NullValue >(0);
}
@@ -771,7 +786,7 @@ inline void Value::_internal_set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue v
clear_kind();
set_has_null_value();
}
- kind_.null_value_ = value;
+ _impl_.kind_.null_value_ = value;
}
inline void Value::set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value) {
_internal_set_null_value(value);
@@ -786,17 +801,17 @@ inline bool Value::has_number_value() const {
return _internal_has_number_value();
}
inline void Value::set_has_number_value() {
- _oneof_case_[0] = kNumberValue;
+ _impl_._oneof_case_[0] = kNumberValue;
}
inline void Value::clear_number_value() {
if (_internal_has_number_value()) {
- kind_.number_value_ = 0;
+ _impl_.kind_.number_value_ = 0;
clear_has_kind();
}
}
inline double Value::_internal_number_value() const {
if (_internal_has_number_value()) {
- return kind_.number_value_;
+ return _impl_.kind_.number_value_;
}
return 0;
}
@@ -805,7 +820,7 @@ inline void Value::_internal_set_number_value(double value) {
clear_kind();
set_has_number_value();
}
- kind_.number_value_ = value;
+ _impl_.kind_.number_value_ = value;
}
inline double Value::number_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
@@ -824,11 +839,11 @@ inline bool Value::has_string_value() const {
return _internal_has_string_value();
}
inline void Value::set_has_string_value() {
- _oneof_case_[0] = kStringValue;
+ _impl_._oneof_case_[0] = kStringValue;
}
inline void Value::clear_string_value() {
if (_internal_has_string_value()) {
- kind_.string_value_.Destroy();
+ _impl_.kind_.string_value_.Destroy();
clear_has_kind();
}
}
@@ -841,9 +856,9 @@ inline void Value::set_string_value(ArgT0&& arg0, ArgT... args) {
if (!_internal_has_string_value()) {
clear_kind();
set_has_string_value();
- kind_.string_value_.InitDefault();
+ _impl_.kind_.string_value_.InitDefault();
}
- kind_.string_value_.Set( static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.kind_.string_value_.Set( static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
}
inline TProtoStringType* Value::mutable_string_value() {
@@ -853,7 +868,7 @@ inline TProtoStringType* Value::mutable_string_value() {
}
inline const TProtoStringType& Value::_internal_string_value() const {
if (_internal_has_string_value()) {
- return kind_.string_value_.Get();
+ return _impl_.kind_.string_value_.Get();
}
return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited();
}
@@ -861,23 +876,23 @@ inline void Value::_internal_set_string_value(const TProtoStringType& value) {
if (!_internal_has_string_value()) {
clear_kind();
set_has_string_value();
- kind_.string_value_.InitDefault();
+ _impl_.kind_.string_value_.InitDefault();
}
- kind_.string_value_.Set(value, GetArenaForAllocation());
+ _impl_.kind_.string_value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Value::_internal_mutable_string_value() {
if (!_internal_has_string_value()) {
clear_kind();
set_has_string_value();
- kind_.string_value_.InitDefault();
+ _impl_.kind_.string_value_.InitDefault();
}
- return kind_.string_value_.Mutable( GetArenaForAllocation());
+ return _impl_.kind_.string_value_.Mutable( GetArenaForAllocation());
}
inline TProtoStringType* Value::release_string_value() {
// @@protoc_insertion_point(field_release:google.protobuf.Value.string_value)
if (_internal_has_string_value()) {
clear_has_kind();
- return kind_.string_value_.Release();
+ return _impl_.kind_.string_value_.Release();
} else {
return nullptr;
}
@@ -888,7 +903,7 @@ inline void Value::set_allocated_string_value(TProtoStringType* string_value) {
}
if (string_value != nullptr) {
set_has_string_value();
- kind_.string_value_.InitAllocated(string_value, GetArenaForAllocation());
+ _impl_.kind_.string_value_.InitAllocated(string_value, GetArenaForAllocation());
}
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
}
@@ -901,17 +916,17 @@ inline bool Value::has_bool_value() const {
return _internal_has_bool_value();
}
inline void Value::set_has_bool_value() {
- _oneof_case_[0] = kBoolValue;
+ _impl_._oneof_case_[0] = kBoolValue;
}
inline void Value::clear_bool_value() {
if (_internal_has_bool_value()) {
- kind_.bool_value_ = false;
+ _impl_.kind_.bool_value_ = false;
clear_has_kind();
}
}
inline bool Value::_internal_bool_value() const {
if (_internal_has_bool_value()) {
- return kind_.bool_value_;
+ return _impl_.kind_.bool_value_;
}
return false;
}
@@ -920,7 +935,7 @@ inline void Value::_internal_set_bool_value(bool value) {
clear_kind();
set_has_bool_value();
}
- kind_.bool_value_ = value;
+ _impl_.kind_.bool_value_ = value;
}
inline bool Value::bool_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
@@ -939,12 +954,12 @@ inline bool Value::has_struct_value() const {
return _internal_has_struct_value();
}
inline void Value::set_has_struct_value() {
- _oneof_case_[0] = kStructValue;
+ _impl_._oneof_case_[0] = kStructValue;
}
inline void Value::clear_struct_value() {
if (_internal_has_struct_value()) {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.struct_value_;
+ delete _impl_.kind_.struct_value_;
}
clear_has_kind();
}
@@ -953,11 +968,11 @@ inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() {
// @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
if (_internal_has_struct_value()) {
clear_has_kind();
- ::PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
+ ::PROTOBUF_NAMESPACE_ID::Struct* temp = _impl_.kind_.struct_value_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
- kind_.struct_value_ = nullptr;
+ _impl_.kind_.struct_value_ = nullptr;
return temp;
} else {
return nullptr;
@@ -965,7 +980,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() {
}
inline const ::PROTOBUF_NAMESPACE_ID::Struct& Value::_internal_struct_value() const {
return _internal_has_struct_value()
- ? *kind_.struct_value_
+ ? *_impl_.kind_.struct_value_
: reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::Struct&>(::PROTOBUF_NAMESPACE_ID::_Struct_default_instance_);
}
inline const ::PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const {
@@ -976,8 +991,8 @@ inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value
// @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
if (_internal_has_struct_value()) {
clear_has_kind();
- ::PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_;
- kind_.struct_value_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::Struct* temp = _impl_.kind_.struct_value_;
+ _impl_.kind_.struct_value_ = nullptr;
return temp;
} else {
return nullptr;
@@ -987,7 +1002,7 @@ inline void Value::unsafe_arena_set_allocated_struct_value(::PROTOBUF_NAMESPACE_
clear_kind();
if (struct_value) {
set_has_struct_value();
- kind_.struct_value_ = struct_value;
+ _impl_.kind_.struct_value_ = struct_value;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
}
@@ -995,9 +1010,9 @@ inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::_internal_mutable_struct_value()
if (!_internal_has_struct_value()) {
clear_kind();
set_has_struct_value();
- kind_.struct_value_ = CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct >(GetArenaForAllocation());
+ _impl_.kind_.struct_value_ = CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct >(GetArenaForAllocation());
}
- return kind_.struct_value_;
+ return _impl_.kind_.struct_value_;
}
inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() {
::PROTOBUF_NAMESPACE_ID::Struct* _msg = _internal_mutable_struct_value();
@@ -1013,12 +1028,12 @@ inline bool Value::has_list_value() const {
return _internal_has_list_value();
}
inline void Value::set_has_list_value() {
- _oneof_case_[0] = kListValue;
+ _impl_._oneof_case_[0] = kListValue;
}
inline void Value::clear_list_value() {
if (_internal_has_list_value()) {
if (GetArenaForAllocation() == nullptr) {
- delete kind_.list_value_;
+ delete _impl_.kind_.list_value_;
}
clear_has_kind();
}
@@ -1027,11 +1042,11 @@ inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() {
// @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
if (_internal_has_list_value()) {
clear_has_kind();
- ::PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
+ ::PROTOBUF_NAMESPACE_ID::ListValue* temp = _impl_.kind_.list_value_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
- kind_.list_value_ = nullptr;
+ _impl_.kind_.list_value_ = nullptr;
return temp;
} else {
return nullptr;
@@ -1039,7 +1054,7 @@ inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() {
}
inline const ::PROTOBUF_NAMESPACE_ID::ListValue& Value::_internal_list_value() const {
return _internal_has_list_value()
- ? *kind_.list_value_
+ ? *_impl_.kind_.list_value_
: reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::ListValue&>(::PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_);
}
inline const ::PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const {
@@ -1050,8 +1065,8 @@ inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_valu
// @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
if (_internal_has_list_value()) {
clear_has_kind();
- ::PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_;
- kind_.list_value_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::ListValue* temp = _impl_.kind_.list_value_;
+ _impl_.kind_.list_value_ = nullptr;
return temp;
} else {
return nullptr;
@@ -1061,7 +1076,7 @@ inline void Value::unsafe_arena_set_allocated_list_value(::PROTOBUF_NAMESPACE_ID
clear_kind();
if (list_value) {
set_has_list_value();
- kind_.list_value_ = list_value;
+ _impl_.kind_.list_value_ = list_value;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
}
@@ -1069,9 +1084,9 @@ inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::_internal_mutable_list_value()
if (!_internal_has_list_value()) {
clear_kind();
set_has_list_value();
- kind_.list_value_ = CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::ListValue >(GetArenaForAllocation());
+ _impl_.kind_.list_value_ = CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::ListValue >(GetArenaForAllocation());
}
- return kind_.list_value_;
+ return _impl_.kind_.list_value_;
}
inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value() {
::PROTOBUF_NAMESPACE_ID::ListValue* _msg = _internal_mutable_list_value();
@@ -1083,10 +1098,10 @@ inline bool Value::has_kind() const {
return kind_case() != KIND_NOT_SET;
}
inline void Value::clear_has_kind() {
- _oneof_case_[0] = KIND_NOT_SET;
+ _impl_._oneof_case_[0] = KIND_NOT_SET;
}
inline Value::KindCase Value::kind_case() const {
- return Value::KindCase(_oneof_case_[0]);
+ return Value::KindCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------
@@ -1094,32 +1109,32 @@ inline Value::KindCase Value::kind_case() const {
// repeated .google.protobuf.Value values = 1;
inline int ListValue::_internal_values_size() const {
- return values_.size();
+ return _impl_.values_.size();
}
inline int ListValue::values_size() const {
return _internal_values_size();
}
inline void ListValue::clear_values() {
- values_.Clear();
+ _impl_.values_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::mutable_values(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
- return values_.Mutable(index);
+ return _impl_.values_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value >*
ListValue::mutable_values() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
- return &values_;
+ return &_impl_.values_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Value& ListValue::_internal_values(int index) const {
- return values_.Get(index);
+ return _impl_.values_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Value& ListValue::values(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
return _internal_values(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::_internal_add_values() {
- return values_.Add();
+ return _impl_.values_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values() {
::PROTOBUF_NAMESPACE_ID::Value* _add = _internal_add_values();
@@ -1129,7 +1144,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Value >&
ListValue::values() const {
// @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
- return values_;
+ return _impl_.values_;
}
#ifdef __GNUC__
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
index 6f8f8d0172..b2efa1b054 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
@@ -298,15 +298,15 @@ void DoNothing() {}
// TODO(xiaofeng): PROTOBUF_LITTLE_ENDIAN is unfortunately defined in
// google/protobuf/io/coded_stream.h and therefore can not be used here.
// Maybe move that macro definition here in the future.
-uint32 ghtonl(uint32 x) {
+arc_ui32 ghtonl(arc_ui32 x) {
union {
- uint32 result;
- uint8 result_array[4];
+ arc_ui32 result;
+ uint8_t result_array[4];
};
- result_array[0] = static_cast<uint8>(x >> 24);
- result_array[1] = static_cast<uint8>((x >> 16) & 0xFF);
- result_array[2] = static_cast<uint8>((x >> 8) & 0xFF);
- result_array[3] = static_cast<uint8>(x & 0xFF);
+ result_array[0] = static_cast<uint8_t>(x >> 24);
+ result_array[1] = static_cast<uint8_t>((x >> 16) & 0xFF);
+ result_array[2] = static_cast<uint8_t>((x >> 8) & 0xFF);
+ result_array[3] = static_cast<uint8_t>(x & 0xFF);
return result;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/common.h b/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
index 45bb73a10b..7bdcef8b8b 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
@@ -84,7 +84,7 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 3020002
+#define GOOGLE_PROTOBUF_VERSION 3021003
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
@@ -92,15 +92,15 @@ namespace internal {
// The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code
// generator.
-static const int kMinHeaderVersionForLibrary = 3020000;
+static const int kMinHeaderVersionForLibrary = 3021000;
// The minimum protoc version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3020000
+#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3021000
// The minimum header version which works with the current version of
// protoc. This constant should only be used in VerifyVersion().
-static const int kMinHeaderVersionForProtoc = 3020000;
+static const int kMinHeaderVersionForProtoc = 3021000;
// Verifies that the headers and libraries are compatible. Use the macro
// below to call this.
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc
index 200b0c696a..038586ffdb 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.cc
@@ -57,14 +57,14 @@ const uint128_pod kuint128max = {arc_ui64{0xFFFFFFFFFFFFFFFFu},
(pos) |= (sh); \
} \
} while (0)
-static inline int Fls64(uint64 n) {
+static inline int Fls64(arc_ui64 n) {
GOOGLE_DCHECK_NE(0, n);
int pos = 0;
- STEP(uint64, n, pos, 0x20);
- uint32 n32 = n;
- STEP(uint32, n32, pos, 0x10);
- STEP(uint32, n32, pos, 0x08);
- STEP(uint32, n32, pos, 0x04);
+ STEP(arc_ui64, n, pos, 0x20);
+ arc_ui32 n32 = n;
+ STEP(arc_ui32, n32, pos, 0x10);
+ STEP(arc_ui32, n32, pos, 0x08);
+ STEP(arc_ui32, n32, pos, 0x04);
return pos + ((arc_ui64{0x3333333322221100u} >> (n32 << 2)) & 0x3);
}
#undef STEP
@@ -72,7 +72,7 @@ static inline int Fls64(uint64 n) {
// Like Fls64() above, but returns the 0-based position of the last set bit
// (i.e., most significant bit) in the given uint128. The argument may not be 0.
static inline int Fls128(uint128 n) {
- if (uint64 hi = Uint128High64(n)) {
+ if (arc_ui64 hi = Uint128High64(n)) {
return Fls64(hi) + 64;
}
return Fls64(Uint128Low64(n));
@@ -132,16 +132,16 @@ std::ostream& operator<<(std::ostream& o, const uint128& b) {
switch (flags & std::ios::basefield) {
case std::ios::hex:
div =
- static_cast<uint64>(arc_ui64{0x1000000000000000u}); // 16^15
+ static_cast<arc_ui64>(arc_ui64{0x1000000000000000u}); // 16^15
div_base_log = 15;
break;
case std::ios::oct:
- div = static_cast<uint64>(
+ div = static_cast<arc_ui64>(
arc_ui64{01000000000000000000000u}); // 8^21
div_base_log = 21;
break;
default: // std::ios::dec
- div = static_cast<uint64>(
+ div = static_cast<arc_ui64>(
arc_ui64{10000000000000000000u}); // 10^19
div_base_log = 19;
break;
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.h b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.h
index dc70d96eb3..f97a19ee53 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/int128.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/int128.h
@@ -53,17 +53,17 @@ struct uint128_pod;
class PROTOBUF_EXPORT uint128 {
public:
UINT128_CONSTEXPR uint128(); // Sets to 0, but don't trust on this behavior.
- UINT128_CONSTEXPR uint128(uint64 top, uint64 bottom);
+ UINT128_CONSTEXPR uint128(arc_ui64 top, arc_ui64 bottom);
#ifndef SWIG
UINT128_CONSTEXPR uint128(int bottom);
- UINT128_CONSTEXPR uint128(uint32 bottom); // Top 96 bits = 0
+ UINT128_CONSTEXPR uint128(arc_ui32 bottom); // Top 96 bits = 0
#endif
- UINT128_CONSTEXPR uint128(uint64 bottom); // hi_ = 0
+ UINT128_CONSTEXPR uint128(arc_ui64 bottom); // hi_ = 0
UINT128_CONSTEXPR uint128(const uint128_pod &val);
// Trivial copy constructor, assignment operator and destructor.
- void Initialize(uint64 top, uint64 bottom);
+ void Initialize(arc_ui64 top, arc_ui64 bottom);
// Arithmetic operators.
uint128& operator+=(const uint128& b);
@@ -82,8 +82,8 @@ class PROTOBUF_EXPORT uint128 {
uint128& operator++();
uint128& operator--();
- friend uint64 Uint128Low64(const uint128& v);
- friend uint64 Uint128High64(const uint128& v);
+ friend arc_ui64 Uint128Low64(const uint128& v);
+ friend arc_ui64 Uint128High64(const uint128& v);
// We add "std::" to avoid including all of port.h.
PROTOBUF_EXPORT friend std::ostream& operator<<(std::ostream& o,
@@ -96,12 +96,12 @@ class PROTOBUF_EXPORT uint128 {
// Little-endian memory order optimizations can benefit from
// having lo_ first, hi_ last.
// See util/endian/endian.h and Load128/Store128 for storing a uint128.
- uint64 lo_;
- uint64 hi_;
+ arc_ui64 lo_;
+ arc_ui64 hi_;
// Not implemented, just declared for catching automatic type conversions.
- uint128(uint8);
- uint128(uint16);
+ uint128(uint8_t);
+ uint128(uint16_t);
uint128(float v);
uint128(double v);
};
@@ -114,8 +114,8 @@ struct uint128_pod {
// of static instances, which is the primary reason for this struct in the
// first place. This does not seem to defeat any optimizations wrt
// operations involving this struct.
- uint64 hi;
- uint64 lo;
+ arc_ui64 hi;
+ arc_ui64 lo;
};
PROTOBUF_EXPORT extern const uint128_pod kuint128max;
@@ -127,8 +127,8 @@ PROTOBUF_EXPORT extern std::ostream& operator<<(std::ostream& o,
// Methods to access low and high pieces of 128-bit value.
// Defined externally from uint128 to facilitate conversion
// to native 128-bit types when compilers support them.
-inline uint64 Uint128Low64(const uint128& v) { return v.lo_; }
-inline uint64 Uint128High64(const uint128& v) { return v.hi_; }
+inline arc_ui64 Uint128Low64(const uint128& v) { return v.lo_; }
+inline arc_ui64 Uint128High64(const uint128& v) { return v.hi_; }
// TODO: perhaps it would be nice to have int128, a signed 128-bit type?
@@ -144,22 +144,22 @@ inline bool operator!=(const uint128& lhs, const uint128& rhs) {
}
inline UINT128_CONSTEXPR uint128::uint128() : lo_(0), hi_(0) {}
-inline UINT128_CONSTEXPR uint128::uint128(uint64 top, uint64 bottom)
+inline UINT128_CONSTEXPR uint128::uint128(arc_ui64 top, arc_ui64 bottom)
: lo_(bottom), hi_(top) {}
inline UINT128_CONSTEXPR uint128::uint128(const uint128_pod& v)
: lo_(v.lo), hi_(v.hi) {}
-inline UINT128_CONSTEXPR uint128::uint128(uint64 bottom)
+inline UINT128_CONSTEXPR uint128::uint128(arc_ui64 bottom)
: lo_(bottom), hi_(0) {}
#ifndef SWIG
-inline UINT128_CONSTEXPR uint128::uint128(uint32 bottom)
+inline UINT128_CONSTEXPR uint128::uint128(arc_ui32 bottom)
: lo_(bottom), hi_(0) {}
inline UINT128_CONSTEXPR uint128::uint128(int bottom)
- : lo_(bottom), hi_(static_cast<int64>((bottom < 0) ? -1 : 0)) {}
+ : lo_(bottom), hi_(static_cast<arc_i64>((bottom < 0) ? -1 : 0)) {}
#endif
#undef UINT128_CONSTEXPR
-inline void uint128::Initialize(uint64 top, uint64 bottom) {
+inline void uint128::Initialize(arc_ui64 top, arc_ui64 bottom) {
hi_ = top;
lo_ = bottom;
}
@@ -183,9 +183,9 @@ CMP128(<=)
// Unary operators
inline uint128 operator-(const uint128& val) {
- const uint64 hi_flip = ~Uint128High64(val);
- const uint64 lo_flip = ~Uint128Low64(val);
- const uint64 lo_add = lo_flip + 1;
+ const arc_ui64 hi_flip = ~Uint128High64(val);
+ const arc_ui64 lo_flip = ~Uint128Low64(val);
+ const arc_ui64 lo_add = lo_flip + 1;
if (lo_add < lo_flip) {
return uint128(hi_flip + 1, lo_add);
}
@@ -235,9 +235,9 @@ inline uint128 operator<<(const uint128& val, int amount) {
if (amount == 0) {
return val;
}
- uint64 new_hi = (Uint128High64(val) << amount) |
- (Uint128Low64(val) >> (64 - amount));
- uint64 new_lo = Uint128Low64(val) << amount;
+ arc_ui64 new_hi = (Uint128High64(val) << amount) |
+ (Uint128Low64(val) >> (64 - amount));
+ arc_ui64 new_lo = Uint128Low64(val) << amount;
return uint128(new_hi, new_lo);
} else if (amount < 128) {
return uint128(Uint128Low64(val) << (amount - 64), 0);
@@ -252,9 +252,9 @@ inline uint128 operator>>(const uint128& val, int amount) {
if (amount == 0) {
return val;
}
- uint64 new_hi = Uint128High64(val) >> amount;
- uint64 new_lo = (Uint128Low64(val) >> amount) |
- (Uint128High64(val) << (64 - amount));
+ arc_ui64 new_hi = Uint128High64(val) >> amount;
+ arc_ui64 new_lo = (Uint128Low64(val) >> amount) |
+ (Uint128High64(val) << (64 - amount));
return uint128(new_hi, new_lo);
} else if (amount < 128) {
return uint128(0, Uint128High64(val) >> (amount - 64));
@@ -319,7 +319,7 @@ inline uint128 operator%(const uint128& lhs, const uint128& rhs) {
inline uint128& uint128::operator+=(const uint128& b) {
hi_ += b.hi_;
- uint64 lolo = lo_ + b.lo_;
+ arc_ui64 lolo = lo_ + b.lo_;
if (lolo < lo_)
++hi_;
lo_ = lolo;
@@ -335,19 +335,19 @@ inline uint128& uint128::operator-=(const uint128& b) {
}
inline uint128& uint128::operator*=(const uint128& b) {
- uint64 a96 = hi_ >> 32;
- uint64 a64 = hi_ & 0xffffffffu;
- uint64 a32 = lo_ >> 32;
- uint64 a00 = lo_ & 0xffffffffu;
- uint64 b96 = b.hi_ >> 32;
- uint64 b64 = b.hi_ & 0xffffffffu;
- uint64 b32 = b.lo_ >> 32;
- uint64 b00 = b.lo_ & 0xffffffffu;
+ arc_ui64 a96 = hi_ >> 32;
+ arc_ui64 a64 = hi_ & 0xffffffffu;
+ arc_ui64 a32 = lo_ >> 32;
+ arc_ui64 a00 = lo_ & 0xffffffffu;
+ arc_ui64 b96 = b.hi_ >> 32;
+ arc_ui64 b64 = b.hi_ & 0xffffffffu;
+ arc_ui64 b32 = b.lo_ >> 32;
+ arc_ui64 b00 = b.lo_ & 0xffffffffu;
// multiply [a96 .. a00] x [b96 .. b00]
// terms higher than c96 disappear off the high side
// terms c96 and c64 are safe to ignore carry bit
- uint64 c96 = a96 * b00 + a64 * b32 + a32 * b64 + a00 * b96;
- uint64 c64 = a64 * b00 + a32 * b32 + a00 * b64;
+ arc_ui64 c96 = a96 * b00 + a64 * b32 + a32 * b64 + a00 * b96;
+ arc_ui64 c64 = a64 * b00 + a32 * b32 + a00 * b64;
this->hi_ = (c96 << 32) + c64;
this->lo_ = 0;
// add terms after this one at a time to capture carry
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/port.h b/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
index c5159b19fc..bf1dcd20d9 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
@@ -169,68 +169,68 @@ void __sanitizer_unaligned_store64(void *p, arc_ui64 v);
} // extern "C"
#endif // __cplusplus
-inline uint16 GOOGLE_UNALIGNED_LOAD16(const void *p) {
+inline uint16_t GOOGLE_UNALIGNED_LOAD16(const void *p) {
return __sanitizer_unaligned_load16(p);
}
-inline uint32 GOOGLE_UNALIGNED_LOAD32(const void *p) {
+inline arc_ui32 GOOGLE_UNALIGNED_LOAD32(const void *p) {
return __sanitizer_unaligned_load32(p);
}
-inline uint64 GOOGLE_UNALIGNED_LOAD64(const void *p) {
+inline arc_ui64 GOOGLE_UNALIGNED_LOAD64(const void *p) {
return __sanitizer_unaligned_load64(p);
}
-inline void GOOGLE_UNALIGNED_STORE16(void *p, uint16 v) {
+inline void GOOGLE_UNALIGNED_STORE16(void *p, uint16_t v) {
__sanitizer_unaligned_store16(p, v);
}
-inline void GOOGLE_UNALIGNED_STORE32(void *p, uint32 v) {
+inline void GOOGLE_UNALIGNED_STORE32(void *p, arc_ui32 v) {
__sanitizer_unaligned_store32(p, v);
}
-inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) {
+inline void GOOGLE_UNALIGNED_STORE64(void *p, arc_ui64 v) {
__sanitizer_unaligned_store64(p, v);
}
#elif defined(GOOGLE_PROTOBUF_USE_UNALIGNED) && GOOGLE_PROTOBUF_USE_UNALIGNED
-#define GOOGLE_UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
-#define GOOGLE_UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
-#define GOOGLE_UNALIGNED_LOAD64(_p) (*reinterpret_cast<const uint64 *>(_p))
+#define GOOGLE_UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16_t *>(_p))
+#define GOOGLE_UNALIGNED_LOAD32(_p) (*reinterpret_cast<const arc_ui32 *>(_p))
+#define GOOGLE_UNALIGNED_LOAD64(_p) (*reinterpret_cast<const arc_ui64 *>(_p))
-#define GOOGLE_UNALIGNED_STORE16(_p, _val) (*reinterpret_cast<uint16 *>(_p) = (_val))
-#define GOOGLE_UNALIGNED_STORE32(_p, _val) (*reinterpret_cast<uint32 *>(_p) = (_val))
-#define GOOGLE_UNALIGNED_STORE64(_p, _val) (*reinterpret_cast<uint64 *>(_p) = (_val))
+#define GOOGLE_UNALIGNED_STORE16(_p, _val) (*reinterpret_cast<uint16_t *>(_p) = (_val))
+#define GOOGLE_UNALIGNED_STORE32(_p, _val) (*reinterpret_cast<arc_ui32 *>(_p) = (_val))
+#define GOOGLE_UNALIGNED_STORE64(_p, _val) (*reinterpret_cast<arc_ui64 *>(_p) = (_val))
#else
-inline uint16 GOOGLE_UNALIGNED_LOAD16(const void *p) {
- uint16 t;
+inline uint16_t GOOGLE_UNALIGNED_LOAD16(const void *p) {
+ uint16_t t;
memcpy(&t, p, sizeof t);
return t;
}
-inline uint32 GOOGLE_UNALIGNED_LOAD32(const void *p) {
- uint32 t;
+inline arc_ui32 GOOGLE_UNALIGNED_LOAD32(const void *p) {
+ arc_ui32 t;
memcpy(&t, p, sizeof t);
return t;
}
-inline uint64 GOOGLE_UNALIGNED_LOAD64(const void *p) {
- uint64 t;
+inline arc_ui64 GOOGLE_UNALIGNED_LOAD64(const void *p) {
+ arc_ui64 t;
memcpy(&t, p, sizeof t);
return t;
}
-inline void GOOGLE_UNALIGNED_STORE16(void *p, uint16 v) {
+inline void GOOGLE_UNALIGNED_STORE16(void *p, uint16_t v) {
memcpy(p, &v, sizeof v);
}
-inline void GOOGLE_UNALIGNED_STORE32(void *p, uint32 v) {
+inline void GOOGLE_UNALIGNED_STORE32(void *p, arc_ui32 v) {
memcpy(p, &v, sizeof v);
}
-inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) {
+inline void GOOGLE_UNALIGNED_STORE64(void *p, arc_ui64 v) {
memcpy(p, &v, sizeof v);
}
#endif
@@ -257,14 +257,14 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) {
#elif !defined(__linux__) && !defined(__ANDROID__) && !defined(__CYGWIN__)
#ifndef bswap_16
-static inline uint16 bswap_16(uint16 x) {
- return static_cast<uint16>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));
+static inline uint16_t bswap_16(uint16_t x) {
+ return static_cast<uint16_t>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));
}
#define bswap_16(x) bswap_16(x)
#endif
#ifndef bswap_32
-static inline uint32 bswap_32(uint32 x) {
+static inline arc_ui32 bswap_32(arc_ui32 x) {
return (((x & 0xFF) << 24) |
((x & 0xFF00) << 8) |
((x & 0xFF0000) >> 8) |
@@ -274,7 +274,7 @@ static inline uint32 bswap_32(uint32 x) {
#endif
#ifndef bswap_64
-static inline uint64 bswap_64(uint64 x) {
+static inline arc_ui64 bswap_64(arc_ui64 x) {
return (((x & arc_ui64{0xFFu}) << 56) | ((x & arc_ui64{0xFF00u}) << 40) |
((x & arc_ui64{0xFF0000u}) << 24) |
((x & arc_ui64{0xFF000000u}) << 8) |
@@ -293,9 +293,9 @@ static inline uint64 bswap_64(uint64 x) {
class Bits {
public:
- static uint32 Log2FloorNonZero(uint32 n) {
+ static arc_ui32 Log2FloorNonZero(arc_ui32 n) {
#if defined(__GNUC__)
- return 31 ^ static_cast<uint32>(__builtin_clz(n));
+ return 31 ^ static_cast<arc_ui32>(__builtin_clz(n));
#elif defined(_MSC_VER)
unsigned long where;
_BitScanReverse(&where, n);
@@ -305,7 +305,7 @@ class Bits {
#endif
}
- static uint32 Log2FloorNonZero64(uint64 n) {
+ static arc_ui32 Log2FloorNonZero64(arc_ui64 n) {
// Older versions of clang run into an instruction-selection failure when
// it encounters __builtin_clzll:
// https://bugs.chromium.org/p/nativeclient/issues/detail?id=4395
@@ -313,7 +313,7 @@ class Bits {
// To work around this, when we build with those we use the portable
// implementation instead.
#if defined(__GNUC__) && !defined(GOOGLE_PROTOBUF_USE_PORTABLE_LOG2)
- return 63 ^ static_cast<uint32>(__builtin_clzll(n));
+ return 63 ^ static_cast<arc_ui32>(__builtin_clzll(n));
#elif defined(_MSC_VER) && defined(_M_X64)
unsigned long where;
_BitScanReverse64(&where, n);
@@ -323,14 +323,14 @@ class Bits {
#endif
}
private:
- static int Log2FloorNonZero_Portable(uint32 n) {
+ static int Log2FloorNonZero_Portable(arc_ui32 n) {
if (n == 0)
return -1;
int log = 0;
- uint32 value = n;
+ arc_ui32 value = n;
for (int i = 4; i >= 0; --i) {
int shift = (1 << i);
- uint32 x = value >> shift;
+ arc_ui32 x = value >> shift;
if (x != 0) {
value = x;
log += shift;
@@ -340,11 +340,11 @@ class Bits {
return log;
}
- static int Log2FloorNonZero64_Portable(uint64 n) {
- const uint32 topbits = static_cast<uint32>(n >> 32);
+ static int Log2FloorNonZero64_Portable(arc_ui64 n) {
+ const arc_ui32 topbits = static_cast<arc_ui32>(n >> 32);
if (topbits == 0) {
// Top bits are zero, so scan in bottom bits
- return static_cast<int>(Log2FloorNonZero(static_cast<uint32>(n)));
+ return static_cast<int>(Log2FloorNonZero(static_cast<arc_ui32>(n)));
} else {
return 32 + static_cast<int>(Log2FloorNonZero(topbits));
}
@@ -353,60 +353,60 @@ class Bits {
// ===================================================================
// from google3/util/endian/endian.h
-PROTOBUF_EXPORT uint32 ghtonl(uint32 x);
+PROTOBUF_EXPORT arc_ui32 ghtonl(arc_ui32 x);
class BigEndian {
public:
#ifdef PROTOBUF_LITTLE_ENDIAN
- static uint16 FromHost16(uint16 x) { return bswap_16(x); }
- static uint16 ToHost16(uint16 x) { return bswap_16(x); }
+ static uint16_t FromHost16(uint16_t x) { return bswap_16(x); }
+ static uint16_t ToHost16(uint16_t x) { return bswap_16(x); }
- static uint32 FromHost32(uint32 x) { return bswap_32(x); }
- static uint32 ToHost32(uint32 x) { return bswap_32(x); }
+ static arc_ui32 FromHost32(arc_ui32 x) { return bswap_32(x); }
+ static arc_ui32 ToHost32(arc_ui32 x) { return bswap_32(x); }
- static uint64 FromHost64(uint64 x) { return bswap_64(x); }
- static uint64 ToHost64(uint64 x) { return bswap_64(x); }
+ static arc_ui64 FromHost64(arc_ui64 x) { return bswap_64(x); }
+ static arc_ui64 ToHost64(arc_ui64 x) { return bswap_64(x); }
static bool IsLittleEndian() { return true; }
#else
- static uint16 FromHost16(uint16 x) { return x; }
- static uint16 ToHost16(uint16 x) { return x; }
+ static uint16_t FromHost16(uint16_t x) { return x; }
+ static uint16_t ToHost16(uint16_t x) { return x; }
- static uint32 FromHost32(uint32 x) { return x; }
- static uint32 ToHost32(uint32 x) { return x; }
+ static arc_ui32 FromHost32(arc_ui32 x) { return x; }
+ static arc_ui32 ToHost32(arc_ui32 x) { return x; }
- static uint64 FromHost64(uint64 x) { return x; }
- static uint64 ToHost64(uint64 x) { return x; }
+ static arc_ui64 FromHost64(arc_ui64 x) { return x; }
+ static arc_ui64 ToHost64(arc_ui64 x) { return x; }
static bool IsLittleEndian() { return false; }
#endif /* ENDIAN */
// Functions to do unaligned loads and stores in big-endian order.
- static uint16 Load16(const void *p) {
+ static uint16_t Load16(const void *p) {
return ToHost16(GOOGLE_UNALIGNED_LOAD16(p));
}
- static void Store16(void *p, uint16 v) {
+ static void Store16(void *p, uint16_t v) {
GOOGLE_UNALIGNED_STORE16(p, FromHost16(v));
}
- static uint32 Load32(const void *p) {
+ static arc_ui32 Load32(const void *p) {
return ToHost32(GOOGLE_UNALIGNED_LOAD32(p));
}
- static void Store32(void *p, uint32 v) {
+ static void Store32(void *p, arc_ui32 v) {
GOOGLE_UNALIGNED_STORE32(p, FromHost32(v));
}
- static uint64 Load64(const void *p) {
+ static arc_ui64 Load64(const void *p) {
return ToHost64(GOOGLE_UNALIGNED_LOAD64(p));
}
- static void Store64(void *p, uint64 v) {
+ static void Store64(void *p, arc_ui64 v) {
GOOGLE_UNALIGNED_STORE64(p, FromHost64(v));
}
};
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/structurally_valid.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/structurally_valid.cc
index 9a476c3b4c..5d5e48f44a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/structurally_valid.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/structurally_valid.cc
@@ -42,9 +42,9 @@ namespace internal {
// in making a string replacement, how many bytes to add 0..255, and the offset
// 0..64k-1 of the replacement string in remap_string.
struct RemapEntry {
- uint8 delete_bytes;
- uint8 add_bytes;
- uint16 bytes_offset;
+ uint8_t delete_bytes;
+ uint8_t add_bytes;
+ uint16_t bytes_offset;
};
// Exit type codes for state tables. All but the first get stuffed into
@@ -81,18 +81,18 @@ typedef enum {
// byte value and 6 for space-optimized tables subscripted by only six
// significant bits in UTF-8 continuation bytes.
typedef struct {
- const uint32 state0;
- const uint32 state0_size;
- const uint32 total_size;
+ const arc_ui32 state0;
+ const arc_ui32 state0_size;
+ const arc_ui32 total_size;
const int max_expand;
const int entry_shift;
const int bytes_per_entry;
- const uint32 losub;
- const uint32 hiadd;
- const uint8* state_table;
+ const arc_ui32 losub;
+ const arc_ui32 hiadd;
+ const uint8_t* state_table;
const RemapEntry* remap_base;
- const uint8* remap_string;
- const uint8* fast_state;
+ const uint8_t* remap_string;
+ const uint8_t* fast_state;
} UTF8StateMachineObj;
typedef UTF8StateMachineObj UTF8ScanObj;
@@ -122,7 +122,7 @@ static const unsigned int utf8acceptnonsurrogates_BYTES = 1;
static const unsigned int utf8acceptnonsurrogates_LOSUB = 0x20202020;
static const unsigned int utf8acceptnonsurrogates_HIADD = 0x00000000;
-static const uint8 utf8acceptnonsurrogates[] = {
+static const uint8_t utf8acceptnonsurrogates[] = {
// state[0] 0x000000 Byte 1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -376,11 +376,13 @@ static const UTF8ScanObj utf8acceptnonsurrogates_obj = {
// Return true if current Tbl pointer is within state0 range
// Note that unsigned compare checks both ends of range simultaneously
-static inline bool InStateZero(const UTF8ScanObj* st, const uint8* Tbl) {
- const uint8* Tbl0 = &st->state_table[st->state0];
- return (static_cast<uint32>(Tbl - Tbl0) < st->state0_size);
+static inline bool InStateZero(const UTF8ScanObj* st, const uint8_t* Tbl) {
+ const uint8_t* Tbl0 = &st->state_table[st->state0];
+ return (static_cast<arc_ui32>(Tbl - Tbl0) < st->state0_size);
}
+namespace {
+
// Scan a UTF-8 string based on state table.
// Always scan complete UTF-8 characters
// Set number of bytes scanned. Return reason for exiting
@@ -392,19 +394,19 @@ int UTF8GenericScan(const UTF8ScanObj* st,
if (str_length == 0) return kExitOK;
int eshift = st->entry_shift;
- const uint8* isrc = reinterpret_cast<const uint8*>(str);
- const uint8* src = isrc;
- const uint8* srclimit = isrc + str_length;
- const uint8* srclimit8 = str_length < 7 ? isrc : srclimit - 7;
- const uint8* Tbl_0 = &st->state_table[st->state0];
+ const uint8_t* isrc = reinterpret_cast<const uint8_t*>(str);
+ const uint8_t* src = isrc;
+ const uint8_t* srclimit = isrc + str_length;
+ const uint8_t* srclimit8 = str_length < 7 ? isrc : srclimit - 7;
+ const uint8_t* Tbl_0 = &st->state_table[st->state0];
DoAgain:
// Do state-table scan
int e = 0;
- uint8 c;
- const uint8* Tbl2 = &st->fast_state[0];
- const uint32 losub = st->losub;
- const uint32 hiadd = st->hiadd;
+ uint8_t c;
+ const uint8_t* Tbl2 = &st->fast_state[0];
+ const arc_ui32 losub = st->losub;
+ const arc_ui32 hiadd = st->hiadd;
// Check initial few bytes one at a time until 8-byte aligned
//----------------------------
while ((((uintptr_t)src & 0x07) != 0) &&
@@ -418,12 +420,12 @@ int UTF8GenericScan(const UTF8ScanObj* st,
// including slowing slightly on cr/lf/ht
//----------------------------
while (src < srclimit8) {
- uint32 s0123 = (reinterpret_cast<const uint32 *>(src))[0];
- uint32 s4567 = (reinterpret_cast<const uint32 *>(src))[1];
+ arc_ui32 s0123 = (reinterpret_cast<const arc_ui32 *>(src))[0];
+ arc_ui32 s4567 = (reinterpret_cast<const arc_ui32 *>(src))[1];
src += 8;
// This is a fast range check for all bytes in [lowsub..0x80-hiadd)
- uint32 temp = (s0123 - losub) | (s0123 + hiadd) |
- (s4567 - losub) | (s4567 + hiadd);
+ arc_ui32 temp = (s0123 - losub) | (s0123 + hiadd) |
+ (s4567 - losub) | (s4567 + hiadd);
if ((temp & 0x80808080) != 0) {
// We typically end up here on cr/lf/ht; src was incremented
int e0123 = (Tbl2[src[-8]] | Tbl2[src[-7]]) |
@@ -446,7 +448,7 @@ int UTF8GenericScan(const UTF8ScanObj* st,
// Byte-at-a-time scan
//----------------------------
- const uint8* Tbl = Tbl_0;
+ const uint8_t* Tbl = Tbl_0;
while (src < srclimit) {
c = *src;
e = Tbl[c];
@@ -500,10 +502,10 @@ int UTF8GenericScanFastAscii(const UTF8ScanObj* st,
*bytes_consumed = 0;
if (str_length == 0) return kExitOK;
- const uint8* isrc = reinterpret_cast<const uint8*>(str);
- const uint8* src = isrc;
- const uint8* srclimit = isrc + str_length;
- const uint8* srclimit8 = str_length < 7 ? isrc : srclimit - 7;
+ const uint8_t* isrc = reinterpret_cast<const uint8_t*>(str);
+ const uint8_t* src = isrc;
+ const uint8_t* srclimit = isrc + str_length;
+ const uint8_t* srclimit8 = str_length < 7 ? isrc : srclimit - 7;
int n;
int rest_consumed;
int exit_reason;
@@ -515,8 +517,9 @@ int UTF8GenericScanFastAscii(const UTF8ScanObj* st,
}
if (((uintptr_t)src & 0x07) == 0) {
while ((src < srclimit8) &&
- (((reinterpret_cast<const uint32*>(src)[0] |
- reinterpret_cast<const uint32*>(src)[1]) & 0x80808080) == 0)) {
+ (((reinterpret_cast<const arc_ui32*>(src)[0] |
+ reinterpret_cast<const arc_ui32*>(src)[1]) &
+ 0x80808080) == 0)) {
src += 8;
}
}
@@ -539,7 +542,6 @@ int UTF8GenericScanFastAscii(const UTF8ScanObj* st,
// UTF-8 strings. Since UTF-8 validation is only used for debugging
// anyway, we simply always return success if initialization hasn't
// occurred yet.
-namespace {
bool module_initialized_ = false;
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
index 68efd15e1e..fe35e97c4a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
@@ -498,13 +498,13 @@ int CEscapeInternal(const char* src, int src_len, char* dest,
// Note that if we emit \xNN and the src character after that is a hex
// digit then that digit must be escaped too to prevent it being
// interpreted as part of the character code by C.
- if ((!utf8_safe || static_cast<uint8>(*src) < 0x80) &&
+ if ((!utf8_safe || static_cast<uint8_t>(*src) < 0x80) &&
(!isprint(*src) ||
(last_hex_escape && isxdigit(*src)))) {
if (dest_len - used < 4) // need space for 4 letter escape
return -1;
sprintf(dest + used, (use_hex ? "\\x%02x" : "\\%03o"),
- static_cast<uint8>(*src));
+ static_cast<uint8_t>(*src));
is_hex_escape = use_hex;
used += 4;
} else {
@@ -628,39 +628,39 @@ TProtoStringType CHexEscape(const TProtoStringType &src) {
// platforms, including errno preservation in error-free calls.
// ----------------------------------------------------------------------
-int32 strto32_adaptor(const char *nptr, char **endptr, int base) {
+arc_i32 strto32_adaptor(const char *nptr, char **endptr, int base) {
const int saved_errno = errno;
errno = 0;
const long result = strtol(nptr, endptr, base);
if (errno == ERANGE && result == LONG_MIN) {
- return kint32min;
+ return std::numeric_limits<arc_i32>::min();
} else if (errno == ERANGE && result == LONG_MAX) {
- return kint32max;
- } else if (errno == 0 && result < kint32min) {
+ return std::numeric_limits<arc_i32>::max();
+ } else if (errno == 0 && result < std::numeric_limits<arc_i32>::min()) {
errno = ERANGE;
- return kint32min;
- } else if (errno == 0 && result > kint32max) {
+ return std::numeric_limits<arc_i32>::min();
+ } else if (errno == 0 && result > std::numeric_limits<arc_i32>::max()) {
errno = ERANGE;
- return kint32max;
+ return std::numeric_limits<arc_i32>::max();
}
if (errno == 0)
errno = saved_errno;
- return static_cast<int32>(result);
+ return static_cast<arc_i32>(result);
}
-uint32 strtou32_adaptor(const char *nptr, char **endptr, int base) {
+arc_ui32 strtou32_adaptor(const char *nptr, char **endptr, int base) {
const int saved_errno = errno;
errno = 0;
const unsigned long result = strtoul(nptr, endptr, base);
if (errno == ERANGE && result == ULONG_MAX) {
- return kuint32max;
- } else if (errno == 0 && result > kuint32max) {
+ return std::numeric_limits<arc_ui32>::max();
+ } else if (errno == 0 && result > std::numeric_limits<arc_ui32>::max()) {
errno = ERANGE;
- return kuint32max;
+ return std::numeric_limits<arc_ui32>::max();
}
if (errno == 0)
errno = saved_errno;
- return static_cast<uint32>(result);
+ return static_cast<arc_ui32>(result);
}
inline bool safe_parse_sign(TProtoStringType *text /*inout*/,
@@ -800,7 +800,7 @@ bool safe_uint_internal(TProtoStringType text, IntType *value_p) {
// null character. Also used by FastInt64ToBufferLeft.
static const int kFastInt64ToBufferOffset = 21;
-char *FastInt64ToBuffer(int64 i, char* buffer) {
+char *FastInt64ToBuffer(arc_i64 i, char* buffer) {
// We could collapse the positive and negative sections, but that
// would be slightly slower for positive numbers...
// 22 bytes is enough to store -2**64, -18446744073709551616.
@@ -845,7 +845,7 @@ static const int kFastInt32ToBufferOffset = 11;
// Yes, this is a duplicate of FastInt64ToBuffer. But, we need this for the
// compiler to generate 32 bit arithmetic instructions. It's much faster, at
// least with 32 bit binaries.
-char *FastInt32ToBuffer(int32 i, char* buffer) {
+char *FastInt32ToBuffer(arc_i32 i, char* buffer) {
// We could collapse the positive and negative sections, but that
// would be slightly slower for positive numbers...
// 12 bytes is enough to store -2**32, -4294967296.
@@ -896,7 +896,7 @@ char *FastHexToBuffer(int i, char* buffer) {
return p + 1;
}
-char *InternalFastHexToBuffer(uint64 value, char* buffer, int num_byte) {
+char *InternalFastHexToBuffer(arc_ui64 value, char* buffer, int num_byte) {
static const char *hexdigits = "0123456789abcdef";
buffer[num_byte] = '\0';
for (int i = num_byte - 1; i >= 0; i--) {
@@ -906,18 +906,18 @@ char *InternalFastHexToBuffer(uint64 value, char* buffer, int num_byte) {
// platforms, we use 64-bit '&' directly.
buffer[i] = hexdigits[value & 0xf];
#else
- buffer[i] = hexdigits[uint32(value) & 0xf];
+ buffer[i] = hexdigits[arc_ui32(value) & 0xf];
#endif
value >>= 4;
}
return buffer;
}
-char *FastHex64ToBuffer(uint64 value, char* buffer) {
+char *FastHex64ToBuffer(arc_ui64 value, char* buffer) {
return InternalFastHexToBuffer(value, buffer, 16);
}
-char *FastHex32ToBuffer(uint32 value, char* buffer) {
+char *FastHex32ToBuffer(arc_ui32 value, char* buffer) {
return InternalFastHexToBuffer(value, buffer, 8);
}
@@ -960,8 +960,8 @@ static const char two_ASCII_digits[100][2] = {
{'9','5'}, {'9','6'}, {'9','7'}, {'9','8'}, {'9','9'}
};
-char* FastUInt32ToBufferLeft(uint32 u, char* buffer) {
- uint32 digits;
+char* FastUInt32ToBufferLeft(arc_ui32 u, char* buffer) {
+ arc_ui32 digits;
const char *ASCII_digits = nullptr;
// The idea of this implementation is to trim the number of divides to as few
// as possible by using multiplication and subtraction rather than mod (%),
@@ -1042,8 +1042,8 @@ done:
goto sublt100_000_000;
}
-char* FastInt32ToBufferLeft(int32 i, char* buffer) {
- uint32 u = 0;
+char* FastInt32ToBufferLeft(arc_i32 i, char* buffer) {
+ arc_ui32 u = 0;
if (i < 0) {
*buffer++ = '-';
u -= i;
@@ -1053,14 +1053,14 @@ char* FastInt32ToBufferLeft(int32 i, char* buffer) {
return FastUInt32ToBufferLeft(u, buffer);
}
-char* FastUInt64ToBufferLeft(uint64 u64, char* buffer) {
+char* FastUInt64ToBufferLeft(arc_ui64 u64, char* buffer) {
int digits;
const char *ASCII_digits = nullptr;
- uint32 u = static_cast<uint32>(u64);
+ arc_ui32 u = static_cast<arc_ui32>(u64);
if (u == u64) return FastUInt32ToBufferLeft(u, buffer);
- uint64 top_11_digits = u64 / 1000000000;
+ arc_ui64 top_11_digits = u64 / 1000000000;
buffer = FastUInt64ToBufferLeft(top_11_digits, buffer);
u = u64 - (top_11_digits * 1000000000);
@@ -1095,8 +1095,8 @@ char* FastUInt64ToBufferLeft(uint64 u64, char* buffer) {
return buffer;
}
-char* FastInt64ToBufferLeft(int64 i, char* buffer) {
- uint64 u = 0;
+char* FastInt64ToBufferLeft(arc_i64 i, char* buffer) {
+ arc_ui64 u = 0;
if (i < 0) {
*buffer++ = '-';
u -= i;
@@ -1341,19 +1341,19 @@ bool safe_strtod(const char* str, double* value) {
return *str != '\0' && *endptr == '\0';
}
-bool safe_strto32(const TProtoStringType &str, int32 *value) {
+bool safe_strto32(const TProtoStringType &str, arc_i32 *value) {
return safe_int_internal(str, value);
}
-bool safe_strtou32(const TProtoStringType &str, uint32 *value) {
+bool safe_strtou32(const TProtoStringType &str, arc_ui32 *value) {
return safe_uint_internal(str, value);
}
-bool safe_strto64(const TProtoStringType &str, int64 *value) {
+bool safe_strto64(const TProtoStringType &str, arc_i64 *value) {
return safe_int_internal(str, value);
}
-bool safe_strtou64(const TProtoStringType &str, uint64 *value) {
+bool safe_strtou64(const TProtoStringType &str, arc_ui64 *value) {
return safe_uint_internal(str, value);
}
@@ -1400,12 +1400,12 @@ namespace strings {
AlphaNum::AlphaNum(strings::Hex hex) {
char *const end = &digits[kFastToBufferSize];
char *writer = end;
- uint64 value = hex.value;
- uint64 width = hex.spec;
+ arc_ui64 value = hex.value;
+ arc_ui64 width = hex.spec;
// We accomplish minimum width by OR'ing in 0x10000 to the user's value,
// where 0x10000 is the smallest hex number that is as wide as the user
// asked for.
- uint64 mask = (static_cast<uint64>(1) << ((width - 1) * 4)) | value;
+ arc_ui64 mask = (static_cast<arc_ui64>(1) << ((width - 1) * 4)) | value;
static const char hexdigits[] = "0123456789abcdef";
do {
*--writer = hexdigits[value & 0xF];
@@ -2104,7 +2104,7 @@ int Base64EscapeInternal(const unsigned char *src, int szsrc,
// Three bytes of data encodes to four characters of ciphertext.
// So we can pump through three-byte chunks atomically.
while (cur_src < limit_src - 3) { // keep going as long as we have >= 32 bits
- uint32 in = BigEndian::Load32(cur_src) >> 8;
+ arc_ui32 in = BigEndian::Load32(cur_src) >> 8;
cur_dest[0] = base64[in >> 18];
in &= 0x3FFFF;
@@ -2130,7 +2130,7 @@ int Base64EscapeInternal(const unsigned char *src, int szsrc,
// One byte left: this encodes to two characters, and (optionally)
// two pad characters to round out the four-character cipherblock.
if ((szdest -= 2) < 0) return 0;
- uint32 in = cur_src[0];
+ arc_ui32 in = cur_src[0];
cur_dest[0] = base64[in >> 2];
in &= 0x3;
cur_dest[1] = base64[in << 4];
@@ -2147,7 +2147,7 @@ int Base64EscapeInternal(const unsigned char *src, int szsrc,
// Two bytes left: this encodes to three characters, and (optionally)
// one pad character to round out the four-character cipherblock.
if ((szdest -= 3) < 0) return 0;
- uint32 in = BigEndian::Load16(cur_src);
+ arc_ui32 in = BigEndian::Load16(cur_src);
cur_dest[0] = base64[in >> 10];
in &= 0x3FF;
cur_dest[1] = base64[in >> 4];
@@ -2166,7 +2166,7 @@ int Base64EscapeInternal(const unsigned char *src, int szsrc,
// the loop because the loop above always reads 4 bytes, and the fourth
// byte is past the end of the input.
if ((szdest -= 4) < 0) return 0;
- uint32 in = (cur_src[0] << 16) + BigEndian::Load16(cur_src + 1);
+ arc_ui32 in = (cur_src[0] << 16) + BigEndian::Load16(cur_src + 1);
cur_dest[0] = base64[in >> 18];
in &= 0x3FFFF;
cur_dest[1] = base64[in >> 12];
@@ -2243,8 +2243,8 @@ void WebSafeBase64EscapeWithPadding(StringPiece src, TProtoStringType *dest) {
// Helper to append a Unicode code point to a string as UTF8, without bringing
// in any external dependencies.
-int EncodeAsUTF8Char(uint32 code_point, char* output) {
- uint32 tmp = 0;
+int EncodeAsUTF8Char(arc_ui32 code_point, char* output) {
+ arc_ui32 tmp = 0;
int len = 0;
if (code_point <= 0x7f) {
tmp = code_point;
@@ -2296,7 +2296,7 @@ int UTF8FirstLetterNumBytes(const char* src, int len) {
if (len == 0) {
return 0;
}
- return kUTF8LenTbl[*reinterpret_cast<const uint8*>(src)];
+ return kUTF8LenTbl[*reinterpret_cast<const uint8_t*>(src)];
}
// ----------------------------------------------------------------------
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
index ad08ad8988..2022914e2d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
@@ -347,20 +347,20 @@ PROTOBUF_EXPORT TProtoStringType CHexEscape(const TProtoStringType& src);
// platforms, so using these is safer, from the point of view of
// overflow behavior, than using the standard libc functions.
// ----------------------------------------------------------------------
-PROTOBUF_EXPORT int32 strto32_adaptor(const char* nptr, char** endptr,
- int base);
-PROTOBUF_EXPORT uint32 strtou32_adaptor(const char* nptr, char** endptr,
+PROTOBUF_EXPORT arc_i32 strto32_adaptor(const char* nptr, char** endptr,
int base);
+PROTOBUF_EXPORT arc_ui32 strtou32_adaptor(const char* nptr, char** endptr,
+ int base);
-inline int32 strto32(const char *nptr, char **endptr, int base) {
- if (sizeof(int32) == sizeof(long))
+inline arc_i32 strto32(const char *nptr, char **endptr, int base) {
+ if (sizeof(arc_i32) == sizeof(long))
return strtol(nptr, endptr, base);
else
return strto32_adaptor(nptr, endptr, base);
}
-inline uint32 strtou32(const char *nptr, char **endptr, int base) {
- if (sizeof(uint32) == sizeof(unsigned long))
+inline arc_ui32 strtou32(const char *nptr, char **endptr, int base) {
+ if (sizeof(arc_ui32) == sizeof(unsigned long))
return strtoul(nptr, endptr, base);
else
return strtou32_adaptor(nptr, endptr, base);
@@ -368,15 +368,15 @@ inline uint32 strtou32(const char *nptr, char **endptr, int base) {
// For now, long long is 64-bit on all the platforms we care about, so these
// functions can simply pass the call to strto[u]ll.
-inline int64 strto64(const char *nptr, char **endptr, int base) {
- static_assert(sizeof(int64) == sizeof(long long),
- "sizeof_int64_is_not_sizeof_long_long");
+inline arc_i64 strto64(const char *nptr, char **endptr, int base) {
+ static_assert(sizeof(arc_i64) == sizeof(long long),
+ "sizeof arc_i64 is not sizeof long long");
return strtoll(nptr, endptr, base);
}
-inline uint64 strtou64(const char *nptr, char **endptr, int base) {
- static_assert(sizeof(uint64) == sizeof(unsigned long long),
- "sizeof_uint64_is_not_sizeof_long_long");
+inline arc_ui64 strtou64(const char *nptr, char **endptr, int base) {
+ static_assert(sizeof(arc_ui64) == sizeof(unsigned long long),
+ "sizeof arc_ui64 is not sizeof unsigned long long");
return strtoull(nptr, endptr, base);
}
@@ -391,33 +391,33 @@ inline uint64 strtou64(const char *nptr, char **endptr, int base) {
// ----------------------------------------------------------------------
PROTOBUF_EXPORT bool safe_strtob(StringPiece str, bool* value);
-PROTOBUF_EXPORT bool safe_strto32(const TProtoStringType& str, int32* value);
-PROTOBUF_EXPORT bool safe_strtou32(const TProtoStringType& str, uint32* value);
-inline bool safe_strto32(const char* str, int32* value) {
+PROTOBUF_EXPORT bool safe_strto32(const TProtoStringType& str, arc_i32* value);
+PROTOBUF_EXPORT bool safe_strtou32(const TProtoStringType& str, arc_ui32* value);
+inline bool safe_strto32(const char* str, arc_i32* value) {
return safe_strto32(TProtoStringType(str), value);
}
-inline bool safe_strto32(StringPiece str, int32* value) {
+inline bool safe_strto32(StringPiece str, arc_i32* value) {
return safe_strto32(str.ToString(), value);
}
-inline bool safe_strtou32(const char* str, uint32* value) {
+inline bool safe_strtou32(const char* str, arc_ui32* value) {
return safe_strtou32(TProtoStringType(str), value);
}
-inline bool safe_strtou32(StringPiece str, uint32* value) {
+inline bool safe_strtou32(StringPiece str, arc_ui32* value) {
return safe_strtou32(str.ToString(), value);
}
-PROTOBUF_EXPORT bool safe_strto64(const TProtoStringType& str, int64* value);
-PROTOBUF_EXPORT bool safe_strtou64(const TProtoStringType& str, uint64* value);
-inline bool safe_strto64(const char* str, int64* value) {
+PROTOBUF_EXPORT bool safe_strto64(const TProtoStringType& str, arc_i64* value);
+PROTOBUF_EXPORT bool safe_strtou64(const TProtoStringType& str, arc_ui64* value);
+inline bool safe_strto64(const char* str, arc_i64* value) {
return safe_strto64(TProtoStringType(str), value);
}
-inline bool safe_strto64(StringPiece str, int64* value) {
+inline bool safe_strto64(StringPiece str, arc_i64* value) {
return safe_strto64(str.ToString(), value);
}
-inline bool safe_strtou64(const char* str, uint64* value) {
+inline bool safe_strtou64(const char* str, arc_ui64* value) {
return safe_strtou64(TProtoStringType(str), value);
}
-inline bool safe_strtou64(StringPiece str, uint64* value) {
+inline bool safe_strtou64(StringPiece str, arc_ui64* value) {
return safe_strtou64(str.ToString(), value);
}
@@ -462,13 +462,13 @@ inline bool safe_strtod(StringPiece str, double* value) {
// DoubleToBuffer() and FloatToBuffer().
static const int kFastToBufferSize = 32;
-PROTOBUF_EXPORT char* FastInt32ToBuffer(int32 i, char* buffer);
-PROTOBUF_EXPORT char* FastInt64ToBuffer(int64 i, char* buffer);
-char* FastUInt32ToBuffer(uint32 i, char* buffer); // inline below
-char* FastUInt64ToBuffer(uint64 i, char* buffer); // inline below
+PROTOBUF_EXPORT char* FastInt32ToBuffer(arc_i32 i, char* buffer);
+PROTOBUF_EXPORT char* FastInt64ToBuffer(arc_i64 i, char* buffer);
+char* FastUInt32ToBuffer(arc_ui32 i, char* buffer); // inline below
+char* FastUInt64ToBuffer(arc_ui64 i, char* buffer); // inline below
PROTOBUF_EXPORT char* FastHexToBuffer(int i, char* buffer);
-PROTOBUF_EXPORT char* FastHex64ToBuffer(uint64 i, char* buffer);
-PROTOBUF_EXPORT char* FastHex32ToBuffer(uint32 i, char* buffer);
+PROTOBUF_EXPORT char* FastHex64ToBuffer(arc_ui64 i, char* buffer);
+PROTOBUF_EXPORT char* FastHex32ToBuffer(arc_ui32 i, char* buffer);
// at least 22 bytes long
inline char* FastIntToBuffer(int i, char* buffer) {
@@ -504,17 +504,17 @@ inline char* FastULongToBuffer(unsigned long i, char* buffer) {
// terminating the string).
// ----------------------------------------------------------------------
-PROTOBUF_EXPORT char* FastInt32ToBufferLeft(int32 i, char* buffer);
-PROTOBUF_EXPORT char* FastUInt32ToBufferLeft(uint32 i, char* buffer);
-PROTOBUF_EXPORT char* FastInt64ToBufferLeft(int64 i, char* buffer);
-PROTOBUF_EXPORT char* FastUInt64ToBufferLeft(uint64 i, char* buffer);
+PROTOBUF_EXPORT char* FastInt32ToBufferLeft(arc_i32 i, char* buffer);
+PROTOBUF_EXPORT char* FastUInt32ToBufferLeft(arc_ui32 i, char* buffer);
+PROTOBUF_EXPORT char* FastInt64ToBufferLeft(arc_i64 i, char* buffer);
+PROTOBUF_EXPORT char* FastUInt64ToBufferLeft(arc_ui64 i, char* buffer);
// Just define these in terms of the above.
-inline char* FastUInt32ToBuffer(uint32 i, char* buffer) {
+inline char* FastUInt32ToBuffer(arc_ui32 i, char* buffer) {
FastUInt32ToBufferLeft(i, buffer);
return buffer;
}
-inline char* FastUInt64ToBuffer(uint64 i, char* buffer) {
+inline char* FastUInt64ToBuffer(arc_ui64 i, char* buffer) {
FastUInt64ToBufferLeft(i, buffer);
return buffer;
}
@@ -587,7 +587,7 @@ enum PadSpec {
};
struct Hex {
- uint64 value;
+ arc_ui64 value;
enum PadSpec spec;
template <class Int>
explicit Hex(Int v, PadSpec s = NO_PAD)
@@ -599,10 +599,10 @@ struct Hex {
sizeof(v) == 1 || sizeof(v) == 2 || sizeof(v) == 4 || sizeof(v) == 8,
"Unknown integer type");
#endif
- value = sizeof(v) == 1 ? static_cast<uint8>(v)
- : sizeof(v) == 2 ? static_cast<uint16>(v)
- : sizeof(v) == 4 ? static_cast<uint32>(v)
- : static_cast<uint64>(v);
+ value = sizeof(v) == 1 ? static_cast<uint8_t>(v)
+ : sizeof(v) == 2 ? static_cast<uint16_t>(v)
+ : sizeof(v) == 4 ? static_cast<arc_ui32>(v)
+ : static_cast<arc_ui64>(v);
}
};
@@ -781,7 +781,7 @@ TProtoStringType Join(const Range& components, const char* delim) {
// ToHex()
// Return a lower-case hex string representation of the given integer.
// ----------------------------------------------------------------------
-PROTOBUF_EXPORT TProtoStringType ToHex(uint64 num);
+PROTOBUF_EXPORT TProtoStringType ToHex(arc_ui64 num);
// ----------------------------------------------------------------------
// GlobalReplaceSubstring()
@@ -855,7 +855,7 @@ PROTOBUF_EXPORT void Base64Escape(const unsigned char* src, int szsrc,
PROTOBUF_EXPORT void WebSafeBase64Escape(const unsigned char* src, int szsrc,
TProtoStringType* dest, bool do_padding);
-inline bool IsValidCodePoint(uint32 code_point) {
+inline bool IsValidCodePoint(arc_ui32 code_point) {
return code_point < 0xD800 ||
(code_point >= 0xE000 && code_point <= 0x10FFFF);
}
@@ -867,7 +867,7 @@ static const int UTFmax = 4;
// in any external dependencies. The output buffer must be as least 4 bytes
// large.
// ----------------------------------------------------------------------
-PROTOBUF_EXPORT int EncodeAsUTF8Char(uint32 code_point, char* output);
+PROTOBUF_EXPORT int EncodeAsUTF8Char(arc_ui32 code_point, char* output);
// ----------------------------------------------------------------------
// UTF8FirstLetterNumBytes()
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/time.cc b/contrib/libs/protobuf/src/google/protobuf/stubs/time.cc
index b450deb5bd..a882e58698 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/time.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/time.cc
@@ -10,23 +10,23 @@ namespace protobuf {
namespace internal {
namespace {
-static const int64 kSecondsPerMinute = 60;
-static const int64 kSecondsPerHour = 3600;
-static const int64 kSecondsPerDay = kSecondsPerHour * 24;
-static const int64 kSecondsPer400Years =
+static const arc_i64 kSecondsPerMinute = 60;
+static const arc_i64 kSecondsPerHour = 3600;
+static const arc_i64 kSecondsPerDay = kSecondsPerHour * 24;
+static const arc_i64 kSecondsPer400Years =
kSecondsPerDay * (400 * 365 + 400 / 4 - 3);
// Seconds from 0001-01-01T00:00:00 to 1970-01-01T:00:00:00
-static const int64 kSecondsFromEraToEpoch = 62135596800LL;
+static const arc_i64 kSecondsFromEraToEpoch = 62135596800LL;
// The range of timestamp values we support.
-static const int64 kMinTime = -62135596800LL; // 0001-01-01T00:00:00
-static const int64 kMaxTime = 253402300799LL; // 9999-12-31T23:59:59
+static const arc_i64 kMinTime = -62135596800LL; // 0001-01-01T00:00:00
+static const arc_i64 kMaxTime = 253402300799LL; // 9999-12-31T23:59:59
static const int kNanosPerMillisecond = 1000000;
static const int kNanosPerMicrosecond = 1000;
// Count the seconds from the given year (start at Jan 1, 00:00) to 100 years
// after.
-int64 SecondsPer100Years(int year) {
+arc_i64 SecondsPer100Years(int year) {
if (year % 400 == 0 || year % 400 > 300) {
return kSecondsPerDay * (100 * 365 + 100 / 4);
} else {
@@ -36,7 +36,7 @@ int64 SecondsPer100Years(int year) {
// Count the seconds from the given year (start at Jan 1, 00:00) to 4 years
// after.
-int64 SecondsPer4Years(int year) {
+arc_i64 SecondsPer4Years(int year) {
if ((year % 100 == 0 || year % 100 > 96) &&
!(year % 400 == 0 || year % 400 > 396)) {
// No leap years.
@@ -51,7 +51,7 @@ bool IsLeapYear(int year) {
return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}
-int64 SecondsPerYear(int year) {
+arc_i64 SecondsPerYear(int year) {
return kSecondsPerDay * (IsLeapYear(year) ? 366 : 365);
}
@@ -59,7 +59,7 @@ static const int kDaysInMonth[13] = {
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
-int64 SecondsPerMonth(int month, bool leap) {
+arc_i64 SecondsPerMonth(int month, bool leap) {
if (month == 2 && leap) {
return kSecondsPerDay * (kDaysInMonth[month] + 1);
}
@@ -88,8 +88,8 @@ bool ValidateDateTime(const DateTime& time) {
// Count the number of seconds elapsed from 0001-01-01T00:00:00 to the given
// time.
-int64 SecondsSinceCommonEra(const DateTime& time) {
- int64 result = 0;
+arc_i64 SecondsSinceCommonEra(const DateTime& time) {
+ arc_i64 result = 0;
// Years should be between 1 and 9999.
assert(time.year >= 1 && time.year <= 9999);
int year = 1;
@@ -130,7 +130,7 @@ int64 SecondsSinceCommonEra(const DateTime& time) {
// Format nanoseconds with either 3, 6, or 9 digits depending on the required
// precision to represent the exact value.
-TProtoStringType FormatNanos(int32 nanos) {
+TProtoStringType FormatNanos(arc_i32 nanos) {
if (nanos % kNanosPerMillisecond == 0) {
return StringPrintf("%03d", nanos / kNanosPerMillisecond);
} else if (nanos % kNanosPerMicrosecond == 0) {
@@ -167,7 +167,7 @@ const char* ParseInt(const char* data, int width, int min_value,
// Consumes the fractional parts of a second into nanos. For example,
// "010" will be parsed to 10000000 nanos.
-const char* ParseNanos(const char* data, int32* nanos) {
+const char* ParseNanos(const char* data, arc_i32* nanos) {
if (!ascii_isdigit(*data)) {
return nullptr;
}
@@ -190,7 +190,7 @@ const char* ParseNanos(const char* data, int32* nanos) {
return data;
}
-const char* ParseTimezoneOffset(const char* data, int64* offset) {
+const char* ParseTimezoneOffset(const char* data, arc_i64* offset) {
// Accept format "HH:MM". E.g., "08:00"
int hour;
if ((data = ParseInt(data, 2, 0, 23, &hour)) == nullptr) {
@@ -208,7 +208,7 @@ const char* ParseTimezoneOffset(const char* data, int64* offset) {
}
} // namespace
-bool SecondsToDateTime(int64 seconds, DateTime* time) {
+bool SecondsToDateTime(arc_i64 seconds, DateTime* time) {
if (seconds < kMinTime || seconds > kMaxTime) {
return false;
}
@@ -253,7 +253,7 @@ bool SecondsToDateTime(int64 seconds, DateTime* time) {
return true;
}
-bool DateTimeToSeconds(const DateTime& time, int64* seconds) {
+bool DateTimeToSeconds(const DateTime& time, arc_i64* seconds) {
if (!ValidateDateTime(time)) {
return false;
}
@@ -261,14 +261,14 @@ bool DateTimeToSeconds(const DateTime& time, int64* seconds) {
return true;
}
-void GetCurrentTime(int64* seconds, int32* nanos) {
+void GetCurrentTime(arc_i64* seconds, arc_i32* nanos) {
// TODO(xiaofeng): Improve the accuracy of this implementation (or just
// remove this method from protobuf).
*seconds = time(nullptr);
*nanos = 0;
}
-TProtoStringType FormatTime(int64 seconds, int32 nanos) {
+TProtoStringType FormatTime(arc_i64 seconds, arc_i32 nanos) {
DateTime time;
if (nanos < 0 || nanos > 999999999 || !SecondsToDateTime(seconds, &time)) {
return "InvalidTime";
@@ -282,7 +282,7 @@ TProtoStringType FormatTime(int64 seconds, int32 nanos) {
return result + "Z";
}
-bool ParseTime(const TProtoStringType& value, int64* seconds, int32* nanos) {
+bool ParseTime(const TProtoStringType& value, arc_i64* seconds, arc_i32* nanos) {
DateTime time;
const char* data = value.c_str();
// We only accept:
@@ -341,14 +341,14 @@ bool ParseTime(const TProtoStringType& value, int64* seconds, int32* nanos) {
++data;
} else if (*data == '+') {
++data;
- int64 offset;
+ arc_i64 offset;
if ((data = ParseTimezoneOffset(data, &offset)) == nullptr) {
return false;
}
*seconds -= offset;
} else if (*data == '-') {
++data;
- int64 offset;
+ arc_i64 offset;
if ((data = ParseTimezoneOffset(data, &offset)) == nullptr) {
return false;
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/stubs/time.h b/contrib/libs/protobuf/src/google/protobuf/stubs/time.h
index eb58dbf159..97a162cee4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/stubs/time.h
+++ b/contrib/libs/protobuf/src/google/protobuf/stubs/time.h
@@ -30,6 +30,8 @@
#ifndef GOOGLE_PROTOBUF_STUBS_TIME_H_
#define GOOGLE_PROTOBUF_STUBS_TIME_H_
+#include <cstdint>
+
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/port_def.inc>
@@ -51,12 +53,12 @@ struct DateTime {
// negative to represent time before 1970-01-01) to DateTime. Returns false
// if the timestamp is not in the range between 0001-01-01T00:00:00 and
// 9999-12-31T23:59:59.
-bool PROTOBUF_EXPORT SecondsToDateTime(int64 seconds, DateTime* time);
+bool PROTOBUF_EXPORT SecondsToDateTime(arc_i64 seconds, DateTime* time);
// Converts DateTime to a timestamp (seconds since 1970-01-01T00:00:00).
// Returns false if the DateTime is not valid or is not in the valid range.
-bool PROTOBUF_EXPORT DateTimeToSeconds(const DateTime& time, int64* seconds);
+bool PROTOBUF_EXPORT DateTimeToSeconds(const DateTime& time, arc_i64* seconds);
-void PROTOBUF_EXPORT GetCurrentTime(int64* seconds, int32* nanos);
+void PROTOBUF_EXPORT GetCurrentTime(arc_i64* seconds, arc_i32* nanos);
// Formats a time string in RFC3339 format.
//
@@ -65,11 +67,11 @@ void PROTOBUF_EXPORT GetCurrentTime(int64* seconds, int32* nanos);
// value.
//
// Note that "nanos" must in the range of [0, 999999999].
-TProtoStringType PROTOBUF_EXPORT FormatTime(int64 seconds, int32 nanos);
+TProtoStringType PROTOBUF_EXPORT FormatTime(arc_i64 seconds, arc_i32 nanos);
// Parses a time string. This method accepts RFC3339 date/time string with UTC
// offset. For example, "2015-05-20T13:29:35.120-08:00".
-bool PROTOBUF_EXPORT ParseTime(const TProtoStringType& value, int64* seconds,
- int32* nanos);
+bool PROTOBUF_EXPORT ParseTime(const TProtoStringType& value, arc_i64* seconds,
+ arc_i32* nanos);
} // namespace internal
} // namespace protobuf
diff --git a/contrib/libs/protobuf/src/google/protobuf/text_format.cc b/contrib/libs/protobuf/src/google/protobuf/text_format.cc
index 706b58d8c7..cfd1975489 100644
--- a/contrib/libs/protobuf/src/google/protobuf/text_format.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/text_format.cc
@@ -42,6 +42,7 @@
#include <climits>
#include <cmath>
#include <limits>
+#include <utility>
#include <vector>
#include <google/protobuf/io/coded_stream.h>
@@ -65,8 +66,6 @@
// Must be included last.
#include <google/protobuf/port_def.inc>
-#define DEBUG_STRING_SILENT_MARKER "\t "
-
namespace google {
namespace protobuf {
@@ -85,7 +84,10 @@ inline bool IsOctNumber(const TProtoStringType& str) {
} // namespace
namespace internal {
-// Controls insertion of DEBUG_STRING_SILENT_MARKER.
+const char kDebugStringSilentMarker[] = "";
+const char kDebugStringSilentMarkerForDetection[] = "\t ";
+
+// Controls insertion of kDebugStringSilentMarker.
PROTOBUF_EXPORT std::atomic<bool> enable_debug_text_format_marker;
} // namespace internal
@@ -244,8 +246,8 @@ class TextFormat::Parser::ParserImpl {
public:
// Determines if repeated values for non-repeated fields and
// oneofs are permitted, e.g., the string "foo: 1 foo: 2" for a
- // required/optional field named "foo", or "baz: 1 qux: 2"
- // where "baz" and "qux" are members of the same oneof.
+ // required/optional field named "foo", or "baz: 1 bar: 2"
+ // where "baz" and "bar" are members of the same oneof.
enum SingularOverwritePolicy {
ALLOW_SINGULAR_OVERWRITES = 0, // the last value is retained
FORBID_SINGULAR_OVERWRITES = 1, // an error is issued
@@ -455,8 +457,9 @@ class TextFormat::Parser::ParserImpl {
}
}
reflection->SetString(message, any_type_url_field,
- prefix_and_full_type_name);
- reflection->SetString(message, any_value_field, serialized_value);
+ std::move(prefix_and_full_type_name));
+ reflection->SetString(message, any_value_field,
+ std::move(serialized_value));
return true;
}
if (TryConsume("[")) {
@@ -809,7 +812,7 @@ class TextFormat::Parser::ParserImpl {
case FieldDescriptor::CPPTYPE_STRING: {
TProtoStringType value;
DO(ConsumeString(&value));
- SET_FIELD(String, value);
+ SET_FIELD(String, std::move(value));
break;
}
@@ -1286,7 +1289,8 @@ class TextFormat::Parser::ParserImpl {
bool TryConsumeWhitespace() {
had_silent_marker_ = false;
if (LookingAtType(io::Tokenizer::TYPE_WHITESPACE)) {
- if (tokenizer_.current().text == " " DEBUG_STRING_SILENT_MARKER) {
+ if (tokenizer_.current().text ==
+ StrCat(" ", internal::kDebugStringSilentMarkerForDetection)) {
had_silent_marker_ = true;
}
tokenizer_.Next();
@@ -1426,7 +1430,7 @@ class TextFormat::Printer::TextGenerator
void PrintMaybeWithMarker(StringPiece text) {
Print(text.data(), text.size());
if (ConsumeInsertSilentMarker()) {
- PrintLiteral(DEBUG_STRING_SILENT_MARKER);
+ PrintLiteral(internal::kDebugStringSilentMarker);
}
}
@@ -1434,7 +1438,7 @@ class TextFormat::Printer::TextGenerator
StringPiece text_tail) {
Print(text_head.data(), text_head.size());
if (ConsumeInsertSilentMarker()) {
- PrintLiteral(DEBUG_STRING_SILENT_MARKER);
+ PrintLiteral(internal::kDebugStringSilentMarker);
}
Print(text_tail.data(), text_tail.size());
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/text_format.h b/contrib/libs/protobuf/src/google/protobuf/text_format.h
index 17abe31ac6..287555767e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/text_format.h
+++ b/contrib/libs/protobuf/src/google/protobuf/text_format.h
@@ -60,6 +60,11 @@
namespace google {
namespace protobuf {
+namespace internal {
+PROTOBUF_EXPORT extern const char kDebugStringSilentMarker[1];
+PROTOBUF_EXPORT extern const char kDebugStringSilentMarkerForDetection[3];
+} // namespace internal
+
namespace io {
class ErrorCollector; // tokenizer.h
}
@@ -456,16 +461,15 @@ class PROTOBUF_EXPORT TextFormat {
};
// Parses a text-format protocol message from the given input stream to
- // the given message object. This function parses the human-readable format
- // written by Print(). Returns true on success. The message is cleared first,
- // even if the function fails -- See Merge() to avoid this behavior.
+ // the given message object. This function parses the human-readable
+ // serialization format written by Print(). Returns true on success. The
+ // message is cleared first, even if the function fails -- See Merge() to
+ // avoid this behavior.
//
// Example input: "user {\n id: 123 extra { gender: MALE language: 'en' }\n}"
//
- // One use for this function is parsing handwritten strings in test code.
- // Another use is to parse the output from google::protobuf::Message::DebugString()
- // (or ShortDebugString()), because these functions output using
- // google::protobuf::TextFormat::Print().
+ // One common use for this function is parsing handwritten strings in test
+ // code.
//
// If you would like to read a protocol buffer serialized in the
// (non-human-readable) binary wire format, see
diff --git a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
index 5edd305857..53d479307d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
@@ -22,9 +22,10 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Timestamp::Timestamp(
- ::_pbi::ConstantInitialized)
- : seconds_(arc_i64{0})
- , nanos_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.seconds_)*/arc_i64{0}
+ , /*decltype(_impl_.nanos_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct TimestampDefaultTypeInternal {
PROTOBUF_CONSTEXPR TimestampDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -46,8 +47,8 @@ const arc_ui32 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROT
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, seconds_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, nanos_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _impl_.seconds_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _impl_.nanos_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Timestamp)},
@@ -91,23 +92,33 @@ class Timestamp::_Internal {
Timestamp::Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp)
}
Timestamp::Timestamp(const Timestamp& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Timestamp* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.seconds_){}
+ , decltype(_impl_.nanos_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&seconds_, &from.seconds_,
- static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+ ::memcpy(&_impl_.seconds_, &from._impl_.seconds_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.nanos_) -
+ reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp)
}
-inline void Timestamp::SharedCtor() {
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&seconds_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+inline void Timestamp::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.seconds_){arc_i64{0}}
+ , decltype(_impl_.nanos_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
Timestamp::~Timestamp() {
@@ -124,7 +135,7 @@ inline void Timestamp::SharedDtor() {
}
void Timestamp::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Timestamp::Clear() {
@@ -133,9 +144,9 @@ void Timestamp::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- ::memset(&seconds_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
+ ::memset(&_impl_.seconds_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.nanos_) -
+ reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -148,7 +159,7 @@ const char* Timestamp::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx
// int64 seconds = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -156,7 +167,7 @@ const char* Timestamp::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx
// int32 nanos = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -228,35 +239,31 @@ size_t Timestamp::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_nanos());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Timestamp::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Timestamp::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Timestamp::GetClassData() const { return &_class_data_; }
-void Timestamp::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Timestamp *>(to)->MergeFrom(
- static_cast<const Timestamp &>(from));
-}
-
-void Timestamp::MergeFrom(const Timestamp& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp)
- GOOGLE_DCHECK_NE(&from, this);
+void Timestamp::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Timestamp*>(&to_msg);
+ auto& from = static_cast<const Timestamp&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_seconds() != 0) {
- _internal_set_seconds(from._internal_seconds());
+ _this->_internal_set_seconds(from._internal_seconds());
}
if (from._internal_nanos() != 0) {
- _internal_set_nanos(from._internal_nanos());
+ _this->_internal_set_nanos(from._internal_nanos());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Timestamp::CopyFrom(const Timestamp& from) {
@@ -274,11 +281,11 @@ void Timestamp::InternalSwap(Timestamp* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Timestamp, nanos_)
- + sizeof(Timestamp::nanos_)
- - PROTOBUF_FIELD_OFFSET(Timestamp, seconds_)>(
- reinterpret_cast<char*>(&seconds_),
- reinterpret_cast<char*>(&other->seconds_));
+ PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_)
+ + sizeof(Timestamp::_impl_.nanos_)
+ - PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_)>(
+ reinterpret_cast<char*>(&_impl_.seconds_),
+ reinterpret_cast<char*>(&other->_impl_.seconds_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Timestamp::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h
index 59af8ec76f..5afc0a6912 100644
--- a/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -136,9 +136,11 @@ class PROTOBUF_EXPORT Timestamp final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Timestamp& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Timestamp& from);
+ void MergeFrom( const Timestamp& from) {
+ Timestamp::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -147,10 +149,10 @@ class PROTOBUF_EXPORT Timestamp final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Timestamp* other);
@@ -203,9 +205,12 @@ class PROTOBUF_EXPORT Timestamp final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- arc_i64 seconds_;
- arc_i32 nanos_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ arc_i64 seconds_;
+ arc_i32 nanos_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ftimestamp_2eproto;
};
// ===================================================================
@@ -221,10 +226,10 @@ class PROTOBUF_EXPORT Timestamp final :
// int64 seconds = 1;
inline void Timestamp::clear_seconds() {
- seconds_ = arc_i64{0};
+ _impl_.seconds_ = arc_i64{0};
}
inline arc_i64 Timestamp::_internal_seconds() const {
- return seconds_;
+ return _impl_.seconds_;
}
inline arc_i64 Timestamp::seconds() const {
// @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds)
@@ -232,7 +237,7 @@ inline arc_i64 Timestamp::seconds() const {
}
inline void Timestamp::_internal_set_seconds(arc_i64 value) {
- seconds_ = value;
+ _impl_.seconds_ = value;
}
inline void Timestamp::set_seconds(arc_i64 value) {
_internal_set_seconds(value);
@@ -241,10 +246,10 @@ inline void Timestamp::set_seconds(arc_i64 value) {
// int32 nanos = 2;
inline void Timestamp::clear_nanos() {
- nanos_ = 0;
+ _impl_.nanos_ = 0;
}
inline arc_i32 Timestamp::_internal_nanos() const {
- return nanos_;
+ return _impl_.nanos_;
}
inline arc_i32 Timestamp::nanos() const {
// @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos)
@@ -252,7 +257,7 @@ inline arc_i32 Timestamp::nanos() const {
}
inline void Timestamp::_internal_set_nanos(arc_i32 value) {
- nanos_ = value;
+ _impl_.nanos_ = value;
}
inline void Timestamp::set_nanos(arc_i32 value) {
_internal_set_nanos(value);
diff --git a/contrib/libs/protobuf/src/google/protobuf/type.pb.cc b/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
index 4c1363a8ef..1d31d0c56d 100644
--- a/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
@@ -22,14 +22,14 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Type::Type(
- ::_pbi::ConstantInitialized)
- : fields_()
- , oneofs_()
- , options_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , source_context_(nullptr)
- , syntax_(0)
-{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.fields_)*/{}
+ , /*decltype(_impl_.oneofs_)*/{}
+ , /*decltype(_impl_.options_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.source_context_)*/nullptr
+ , /*decltype(_impl_.syntax_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct TypeDefaultTypeInternal {
PROTOBUF_CONSTEXPR TypeDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -40,19 +40,18 @@ struct TypeDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_;
PROTOBUF_CONSTEXPR Field::Field(
- ::_pbi::ConstantInitialized)
- : options_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , type_url_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , json_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , default_value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , kind_(0)
-
- , cardinality_(0)
-
- , number_(0)
- , oneof_index_(0)
- , packed_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.options_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.type_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.json_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.default_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.kind_)*/0
+ , /*decltype(_impl_.cardinality_)*/0
+ , /*decltype(_impl_.number_)*/0
+ , /*decltype(_impl_.oneof_index_)*/0
+ , /*decltype(_impl_.packed_)*/false
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct FieldDefaultTypeInternal {
PROTOBUF_CONSTEXPR FieldDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -63,13 +62,13 @@ struct FieldDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDefaultTypeInternal _Field_default_instance_;
PROTOBUF_CONSTEXPR Enum::Enum(
- ::_pbi::ConstantInitialized)
- : enumvalue_()
- , options_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , source_context_(nullptr)
- , syntax_(0)
-{}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.enumvalue_)*/{}
+ , /*decltype(_impl_.options_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.source_context_)*/nullptr
+ , /*decltype(_impl_.syntax_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct EnumDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -80,10 +79,11 @@ struct EnumDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDefaultTypeInternal _Enum_default_instance_;
PROTOBUF_CONSTEXPR EnumValue::EnumValue(
- ::_pbi::ConstantInitialized)
- : options_()
- , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , number_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.options_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.number_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct EnumValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -94,9 +94,10 @@ struct EnumValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDefaultTypeInternal _EnumValue_default_instance_;
PROTOBUF_CONSTEXPR Option::Option(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , value_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.value_)*/nullptr
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct OptionDefaultTypeInternal {
PROTOBUF_CONSTEXPR OptionDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -118,56 +119,56 @@ const arc_ui32 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, fields_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, oneofs_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, source_context_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, syntax_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.fields_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.oneofs_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.source_context_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.syntax_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, kind_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, cardinality_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, number_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, type_url_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, oneof_index_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, packed_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, json_name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, default_value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.kind_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.cardinality_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.number_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.type_url_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.oneof_index_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.packed_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.json_name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.default_value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, enumvalue_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, options_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, source_context_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, syntax_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.enumvalue_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.source_context_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.syntax_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, number_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, options_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _impl_.number_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _impl_.options_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _impl_.value_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Type)},
@@ -351,55 +352,65 @@ class Type::_Internal {
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
Type::_Internal::source_context(const Type* msg) {
- return *msg->source_context_;
+ return *msg->_impl_.source_context_;
}
void Type::clear_source_context() {
- if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
+ if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
+ delete _impl_.source_context_;
}
- source_context_ = nullptr;
+ _impl_.source_context_ = nullptr;
}
Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- fields_(arena),
- oneofs_(arena),
- options_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
}
Type::Type(const Type& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- fields_(from.fields_),
- oneofs_(from.oneofs_),
- options_(from.options_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Type* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.fields_){from._impl_.fields_}
+ , decltype(_impl_.oneofs_){from._impl_.oneofs_}
+ , decltype(_impl_.options_){from._impl_.options_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.source_context_){nullptr}
+ , decltype(_impl_.syntax_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_source_context()) {
- source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
- } else {
- source_context_ = nullptr;
+ _this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_);
}
- syntax_ = from.syntax_;
+ _this->_impl_.syntax_ = from._impl_.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
}
-inline void Type::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
+inline void Type::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.fields_){arena}
+ , decltype(_impl_.oneofs_){arena}
+ , decltype(_impl_.options_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.source_context_){nullptr}
+ , decltype(_impl_.syntax_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Type::~Type() {
@@ -413,12 +424,15 @@ Type::~Type() {
inline void Type::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete source_context_;
+ _impl_.fields_.~RepeatedPtrField();
+ _impl_.oneofs_.~RepeatedPtrField();
+ _impl_.options_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.source_context_;
}
void Type::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Type::Clear() {
@@ -427,15 +441,15 @@ void Type::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- fields_.Clear();
- oneofs_.Clear();
- options_.Clear();
- name_.ClearToEmpty();
- if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
+ _impl_.fields_.Clear();
+ _impl_.oneofs_.Clear();
+ _impl_.options_.Clear();
+ _impl_.name_.ClearToEmpty();
+ if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
+ delete _impl_.source_context_;
}
- source_context_ = nullptr;
- syntax_ = 0;
+ _impl_.source_context_ = nullptr;
+ _impl_.syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -610,22 +624,22 @@ size_t Type::ByteSizeLong() const {
// repeated .google.protobuf.Field fields = 2;
total_size += 1UL * this->_internal_fields_size();
- for (const auto& msg : this->fields_) {
+ for (const auto& msg : this->_impl_.fields_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated string oneofs = 3;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(oneofs_.size());
- for (int i = 0, n = oneofs_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.oneofs_.size());
+ for (int i = 0, n = _impl_.oneofs_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- oneofs_.Get(i));
+ _impl_.oneofs_.Get(i));
}
// repeated .google.protobuf.Option options = 4;
total_size += 1UL * this->_internal_options_size();
- for (const auto& msg : this->options_) {
+ for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -641,7 +655,7 @@ size_t Type::ByteSizeLong() const {
if (this->_internal_has_source_context()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *source_context_);
+ *_impl_.source_context_);
}
// .google.protobuf.Syntax syntax = 6;
@@ -650,41 +664,38 @@ size_t Type::ByteSizeLong() const {
::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Type::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Type::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Type::GetClassData() const { return &_class_data_; }
-void Type::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Type *>(to)->MergeFrom(
- static_cast<const Type &>(from));
-}
-
-void Type::MergeFrom(const Type& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
- GOOGLE_DCHECK_NE(&from, this);
+void Type::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Type*>(&to_msg);
+ auto& from = static_cast<const Type&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- fields_.MergeFrom(from.fields_);
- oneofs_.MergeFrom(from.oneofs_);
- options_.MergeFrom(from.options_);
+ _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
+ _this->_impl_.oneofs_.MergeFrom(from._impl_.oneofs_);
+ _this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (from._internal_has_source_context()) {
- _internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
+ _this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(
+ from._internal_source_context());
}
if (from._internal_syntax() != 0) {
- _internal_set_syntax(from._internal_syntax());
+ _this->_internal_set_syntax(from._internal_syntax());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Type::CopyFrom(const Type& from) {
@@ -703,19 +714,19 @@ void Type::InternalSwap(Type* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- fields_.InternalSwap(&other->fields_);
- oneofs_.InternalSwap(&other->oneofs_);
- options_.InternalSwap(&other->options_);
+ _impl_.fields_.InternalSwap(&other->_impl_.fields_);
+ _impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_);
+ _impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Type, syntax_)
- + sizeof(Type::syntax_)
- - PROTOBUF_FIELD_OFFSET(Type, source_context_)>(
- reinterpret_cast<char*>(&source_context_),
- reinterpret_cast<char*>(&other->source_context_));
+ PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_)
+ + sizeof(Type::_impl_.syntax_)
+ - PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_)>(
+ reinterpret_cast<char*>(&_impl_.source_context_),
+ reinterpret_cast<char*>(&other->_impl_.source_context_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Type::GetMetadata() const {
@@ -732,74 +743,98 @@ class Field::_Internal {
Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- options_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
}
Field::Field(const Field& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- options_(from.options_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Field* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.options_){from._impl_.options_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.type_url_){}
+ , decltype(_impl_.json_name_){}
+ , decltype(_impl_.default_value_){}
+ , decltype(_impl_.kind_){}
+ , decltype(_impl_.cardinality_){}
+ , decltype(_impl_.number_){}
+ , decltype(_impl_.oneof_index_){}
+ , decltype(_impl_.packed_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- type_url_.InitDefault();
+ _impl_.type_url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_url_.Set("", GetArenaForAllocation());
+ _impl_.type_url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_type_url().empty()) {
- type_url_.Set(from._internal_type_url(),
- GetArenaForAllocation());
+ _this->_impl_.type_url_.Set(from._internal_type_url(),
+ _this->GetArenaForAllocation());
}
- json_name_.InitDefault();
+ _impl_.json_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- json_name_.Set("", GetArenaForAllocation());
+ _impl_.json_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_json_name().empty()) {
- json_name_.Set(from._internal_json_name(),
- GetArenaForAllocation());
+ _this->_impl_.json_name_.Set(from._internal_json_name(),
+ _this->GetArenaForAllocation());
}
- default_value_.InitDefault();
+ _impl_.default_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- default_value_.Set("", GetArenaForAllocation());
+ _impl_.default_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_default_value().empty()) {
- default_value_.Set(from._internal_default_value(),
- GetArenaForAllocation());
+ _this->_impl_.default_value_.Set(from._internal_default_value(),
+ _this->GetArenaForAllocation());
}
- ::memcpy(&kind_, &from.kind_,
- static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
- reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
+ ::memcpy(&_impl_.kind_, &from._impl_.kind_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.packed_) -
+ reinterpret_cast<char*>(&_impl_.kind_)) + sizeof(_impl_.packed_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
}
-inline void Field::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-type_url_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_url_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-json_name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- json_name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-default_value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- default_value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&kind_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
- reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
+inline void Field::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.options_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.type_url_){}
+ , decltype(_impl_.json_name_){}
+ , decltype(_impl_.default_value_){}
+ , decltype(_impl_.kind_){0}
+ , decltype(_impl_.cardinality_){0}
+ , decltype(_impl_.number_){0}
+ , decltype(_impl_.oneof_index_){0}
+ , decltype(_impl_.packed_){false}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.type_url_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.type_url_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.json_name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.json_name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.default_value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.default_value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Field::~Field() {
@@ -813,14 +848,15 @@ Field::~Field() {
inline void Field::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- type_url_.Destroy();
- json_name_.Destroy();
- default_value_.Destroy();
+ _impl_.options_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ _impl_.type_url_.Destroy();
+ _impl_.json_name_.Destroy();
+ _impl_.default_value_.Destroy();
}
void Field::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Field::Clear() {
@@ -829,14 +865,14 @@ void Field::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- options_.Clear();
- name_.ClearToEmpty();
- type_url_.ClearToEmpty();
- json_name_.ClearToEmpty();
- default_value_.ClearToEmpty();
- ::memset(&kind_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&packed_) -
- reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
+ _impl_.options_.Clear();
+ _impl_.name_.ClearToEmpty();
+ _impl_.type_url_.ClearToEmpty();
+ _impl_.json_name_.ClearToEmpty();
+ _impl_.default_value_.ClearToEmpty();
+ ::memset(&_impl_.kind_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.packed_) -
+ reinterpret_cast<char*>(&_impl_.kind_)) + sizeof(_impl_.packed_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -867,7 +903,7 @@ const char* Field::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
// int32 number = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
- number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -895,7 +931,7 @@ const char* Field::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
// int32 oneof_index = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
- oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -903,7 +939,7 @@ const char* Field::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
// bool packed = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
- packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -1068,7 +1104,7 @@ size_t Field::ByteSizeLong() const {
// repeated .google.protobuf.Option options = 9;
total_size += 1UL * this->_internal_options_size();
- for (const auto& msg : this->options_) {
+ for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -1128,57 +1164,53 @@ size_t Field::ByteSizeLong() const {
total_size += 1 + 1;
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Field::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Field::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Field::GetClassData() const { return &_class_data_; }
-void Field::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Field *>(to)->MergeFrom(
- static_cast<const Field &>(from));
-}
-
-void Field::MergeFrom(const Field& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
- GOOGLE_DCHECK_NE(&from, this);
+void Field::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Field*>(&to_msg);
+ auto& from = static_cast<const Field&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- options_.MergeFrom(from.options_);
+ _this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (!from._internal_type_url().empty()) {
- _internal_set_type_url(from._internal_type_url());
+ _this->_internal_set_type_url(from._internal_type_url());
}
if (!from._internal_json_name().empty()) {
- _internal_set_json_name(from._internal_json_name());
+ _this->_internal_set_json_name(from._internal_json_name());
}
if (!from._internal_default_value().empty()) {
- _internal_set_default_value(from._internal_default_value());
+ _this->_internal_set_default_value(from._internal_default_value());
}
if (from._internal_kind() != 0) {
- _internal_set_kind(from._internal_kind());
+ _this->_internal_set_kind(from._internal_kind());
}
if (from._internal_cardinality() != 0) {
- _internal_set_cardinality(from._internal_cardinality());
+ _this->_internal_set_cardinality(from._internal_cardinality());
}
if (from._internal_number() != 0) {
- _internal_set_number(from._internal_number());
+ _this->_internal_set_number(from._internal_number());
}
if (from._internal_oneof_index() != 0) {
- _internal_set_oneof_index(from._internal_oneof_index());
+ _this->_internal_set_oneof_index(from._internal_oneof_index());
}
if (from._internal_packed() != 0) {
- _internal_set_packed(from._internal_packed());
+ _this->_internal_set_packed(from._internal_packed());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Field::CopyFrom(const Field& from) {
@@ -1197,29 +1229,29 @@ void Field::InternalSwap(Field* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- options_.InternalSwap(&other->options_);
+ _impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &type_url_, lhs_arena,
- &other->type_url_, rhs_arena
+ &_impl_.type_url_, lhs_arena,
+ &other->_impl_.type_url_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &json_name_, lhs_arena,
- &other->json_name_, rhs_arena
+ &_impl_.json_name_, lhs_arena,
+ &other->_impl_.json_name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &default_value_, lhs_arena,
- &other->default_value_, rhs_arena
+ &_impl_.default_value_, lhs_arena,
+ &other->_impl_.default_value_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Field, packed_)
- + sizeof(Field::packed_)
- - PROTOBUF_FIELD_OFFSET(Field, kind_)>(
- reinterpret_cast<char*>(&kind_),
- reinterpret_cast<char*>(&other->kind_));
+ PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_)
+ + sizeof(Field::_impl_.packed_)
+ - PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_)>(
+ reinterpret_cast<char*>(&_impl_.kind_),
+ reinterpret_cast<char*>(&other->_impl_.kind_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Field::GetMetadata() const {
@@ -1237,53 +1269,63 @@ class Enum::_Internal {
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
Enum::_Internal::source_context(const Enum* msg) {
- return *msg->source_context_;
+ return *msg->_impl_.source_context_;
}
void Enum::clear_source_context() {
- if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
+ if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
+ delete _impl_.source_context_;
}
- source_context_ = nullptr;
+ _impl_.source_context_ = nullptr;
}
Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- enumvalue_(arena),
- options_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
}
Enum::Enum(const Enum& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- enumvalue_(from.enumvalue_),
- options_(from.options_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Enum* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.enumvalue_){from._impl_.enumvalue_}
+ , decltype(_impl_.options_){from._impl_.options_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.source_context_){nullptr}
+ , decltype(_impl_.syntax_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_source_context()) {
- source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
- } else {
- source_context_ = nullptr;
+ _this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_);
}
- syntax_ = from.syntax_;
+ _this->_impl_.syntax_ = from._impl_.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
}
-inline void Enum::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
- reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
+inline void Enum::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.enumvalue_){arena}
+ , decltype(_impl_.options_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.source_context_){nullptr}
+ , decltype(_impl_.syntax_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Enum::~Enum() {
@@ -1297,12 +1339,14 @@ Enum::~Enum() {
inline void Enum::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete source_context_;
+ _impl_.enumvalue_.~RepeatedPtrField();
+ _impl_.options_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.source_context_;
}
void Enum::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Enum::Clear() {
@@ -1311,14 +1355,14 @@ void Enum::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- enumvalue_.Clear();
- options_.Clear();
- name_.ClearToEmpty();
- if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
- delete source_context_;
+ _impl_.enumvalue_.Clear();
+ _impl_.options_.Clear();
+ _impl_.name_.ClearToEmpty();
+ if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
+ delete _impl_.source_context_;
}
- source_context_ = nullptr;
- syntax_ = 0;
+ _impl_.source_context_ = nullptr;
+ _impl_.syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1468,14 +1512,14 @@ size_t Enum::ByteSizeLong() const {
// repeated .google.protobuf.EnumValue enumvalue = 2;
total_size += 1UL * this->_internal_enumvalue_size();
- for (const auto& msg : this->enumvalue_) {
+ for (const auto& msg : this->_impl_.enumvalue_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
- for (const auto& msg : this->options_) {
+ for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -1491,7 +1535,7 @@ size_t Enum::ByteSizeLong() const {
if (this->_internal_has_source_context()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *source_context_);
+ *_impl_.source_context_);
}
// .google.protobuf.Syntax syntax = 5;
@@ -1500,40 +1544,37 @@ size_t Enum::ByteSizeLong() const {
::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Enum::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Enum::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Enum::GetClassData() const { return &_class_data_; }
-void Enum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Enum *>(to)->MergeFrom(
- static_cast<const Enum &>(from));
-}
-
-void Enum::MergeFrom(const Enum& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
- GOOGLE_DCHECK_NE(&from, this);
+void Enum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Enum*>(&to_msg);
+ auto& from = static_cast<const Enum&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- enumvalue_.MergeFrom(from.enumvalue_);
- options_.MergeFrom(from.options_);
+ _this->_impl_.enumvalue_.MergeFrom(from._impl_.enumvalue_);
+ _this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (from._internal_has_source_context()) {
- _internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
+ _this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(
+ from._internal_source_context());
}
if (from._internal_syntax() != 0) {
- _internal_set_syntax(from._internal_syntax());
+ _this->_internal_set_syntax(from._internal_syntax());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Enum::CopyFrom(const Enum& from) {
@@ -1552,18 +1593,18 @@ void Enum::InternalSwap(Enum* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- enumvalue_.InternalSwap(&other->enumvalue_);
- options_.InternalSwap(&other->options_);
+ _impl_.enumvalue_.InternalSwap(&other->_impl_.enumvalue_);
+ _impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Enum, syntax_)
- + sizeof(Enum::syntax_)
- - PROTOBUF_FIELD_OFFSET(Enum, source_context_)>(
- reinterpret_cast<char*>(&source_context_),
- reinterpret_cast<char*>(&other->source_context_));
+ PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_)
+ + sizeof(Enum::_impl_.syntax_)
+ - PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_)>(
+ reinterpret_cast<char*>(&_impl_.source_context_),
+ reinterpret_cast<char*>(&other->_impl_.source_context_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Enum::GetMetadata() const {
@@ -1580,33 +1621,46 @@ class EnumValue::_Internal {
EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- options_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
}
EnumValue::EnumValue(const EnumValue& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- options_(from.options_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ EnumValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.options_){from._impl_.options_}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.number_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- number_ = from.number_;
+ _this->_impl_.number_ = from._impl_.number_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
}
-inline void EnumValue::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-number_ = 0;
+inline void EnumValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.options_){arena}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.number_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
EnumValue::~EnumValue() {
@@ -1620,11 +1674,12 @@ EnumValue::~EnumValue() {
inline void EnumValue::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
+ _impl_.options_.~RepeatedPtrField();
+ _impl_.name_.Destroy();
}
void EnumValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void EnumValue::Clear() {
@@ -1633,9 +1688,9 @@ void EnumValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- options_.Clear();
- name_.ClearToEmpty();
- number_ = 0;
+ _impl_.options_.Clear();
+ _impl_.name_.ClearToEmpty();
+ _impl_.number_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1658,7 +1713,7 @@ const char* EnumValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx
// int32 number = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -1747,7 +1802,7 @@ size_t EnumValue::ByteSizeLong() const {
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
- for (const auto& msg : this->options_) {
+ for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
@@ -1764,36 +1819,32 @@ size_t EnumValue::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumValue::GetClassData() const { return &_class_data_; }
-void EnumValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<EnumValue *>(to)->MergeFrom(
- static_cast<const EnumValue &>(from));
-}
-
-void EnumValue::MergeFrom(const EnumValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
- GOOGLE_DCHECK_NE(&from, this);
+void EnumValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<EnumValue*>(&to_msg);
+ auto& from = static_cast<const EnumValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- options_.MergeFrom(from.options_);
+ _this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (from._internal_number() != 0) {
- _internal_set_number(from._internal_number());
+ _this->_internal_set_number(from._internal_number());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumValue::CopyFrom(const EnumValue& from) {
@@ -1812,12 +1863,12 @@ void EnumValue::InternalSwap(EnumValue* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- options_.InternalSwap(&other->options_);
+ _impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
- swap(number_, other->number_);
+ swap(_impl_.number_, other->_impl_.number_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValue::GetMetadata() const {
@@ -1835,45 +1886,56 @@ class Option::_Internal {
const ::PROTOBUF_NAMESPACE_ID::Any&
Option::_Internal::value(const Option* msg) {
- return *msg->value_;
+ return *msg->_impl_.value_;
}
void Option::clear_value() {
- if (GetArenaForAllocation() == nullptr && value_ != nullptr) {
- delete value_;
+ if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) {
+ delete _impl_.value_;
}
- value_ = nullptr;
+ _impl_.value_ = nullptr;
}
Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
}
Option::Option(const Option& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Option* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.name_){}
+ , decltype(_impl_.value_){nullptr}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_value()) {
- value_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from.value_);
- } else {
- value_ = nullptr;
+ _this->_impl_.value_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from._impl_.value_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
}
-inline void Option::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-value_ = nullptr;
+inline void Option::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.name_){}
+ , decltype(_impl_.value_){nullptr}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Option::~Option() {
@@ -1887,12 +1949,12 @@ Option::~Option() {
inline void Option::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- if (this != internal_default_instance()) delete value_;
+ _impl_.name_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.value_;
}
void Option::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Option::Clear() {
@@ -1901,11 +1963,11 @@ void Option::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- name_.ClearToEmpty();
- if (GetArenaForAllocation() == nullptr && value_ != nullptr) {
- delete value_;
+ _impl_.name_.ClearToEmpty();
+ if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) {
+ delete _impl_.value_;
}
- value_ = nullptr;
+ _impl_.value_ = nullptr;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2006,38 +2068,35 @@ size_t Option::ByteSizeLong() const {
if (this->_internal_has_value()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *value_);
+ *_impl_.value_);
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Option::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Option::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Option::GetClassData() const { return &_class_data_; }
-void Option::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Option *>(to)->MergeFrom(
- static_cast<const Option &>(from));
-}
-
-void Option::MergeFrom(const Option& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
- GOOGLE_DCHECK_NE(&from, this);
+void Option::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Option*>(&to_msg);
+ auto& from = static_cast<const Option&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (from._internal_has_value()) {
- _internal_mutable_value()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_value());
+ _this->_internal_mutable_value()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(
+ from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Option::CopyFrom(const Option& from) {
@@ -2057,10 +2116,10 @@ void Option::InternalSwap(Option* other) {
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Option::GetMetadata() const {
diff --git a/contrib/libs/protobuf/src/google/protobuf/type.pb.h b/contrib/libs/protobuf/src/google/protobuf/type.pb.h
index 233395d293..7a5cd94bc7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/type.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/type.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -249,9 +249,11 @@ class PROTOBUF_EXPORT Type final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Type& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Type& from);
+ void MergeFrom( const Type& from) {
+ Type::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -260,10 +262,10 @@ class PROTOBUF_EXPORT Type final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Type* other);
@@ -403,13 +405,16 @@ class PROTOBUF_EXPORT Type final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field > fields_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> oneofs_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
- int syntax_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field > fields_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> oneofs_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
+ int syntax_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
};
// -------------------------------------------------------------------
@@ -494,9 +499,11 @@ class PROTOBUF_EXPORT Field final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Field& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Field& from);
+ void MergeFrom( const Field& from) {
+ Field::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -505,10 +512,10 @@ class PROTOBUF_EXPORT Field final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Field* other);
@@ -768,17 +775,20 @@ class PROTOBUF_EXPORT Field final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_;
- int kind_;
- int cardinality_;
- arc_i32 number_;
- arc_i32 oneof_index_;
- bool packed_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_;
+ int kind_;
+ int cardinality_;
+ arc_i32 number_;
+ arc_i32 oneof_index_;
+ bool packed_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
};
// -------------------------------------------------------------------
@@ -863,9 +873,11 @@ class PROTOBUF_EXPORT Enum final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Enum& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Enum& from);
+ void MergeFrom( const Enum& from) {
+ Enum::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -874,10 +886,10 @@ class PROTOBUF_EXPORT Enum final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Enum* other);
@@ -992,12 +1004,15 @@ class PROTOBUF_EXPORT Enum final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue > enumvalue_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
- int syntax_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue > enumvalue_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_;
+ int syntax_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
};
// -------------------------------------------------------------------
@@ -1082,9 +1097,11 @@ class PROTOBUF_EXPORT EnumValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const EnumValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const EnumValue& from);
+ void MergeFrom( const EnumValue& from) {
+ EnumValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1093,10 +1110,10 @@ class PROTOBUF_EXPORT EnumValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(EnumValue* other);
@@ -1173,10 +1190,13 @@ class PROTOBUF_EXPORT EnumValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- arc_i32 number_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ arc_i32 number_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
};
// -------------------------------------------------------------------
@@ -1261,9 +1281,11 @@ class PROTOBUF_EXPORT Option final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Option& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Option& from);
+ void MergeFrom( const Option& from) {
+ Option::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1272,10 +1294,10 @@ class PROTOBUF_EXPORT Option final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Option* other);
@@ -1342,9 +1364,12 @@ class PROTOBUF_EXPORT Option final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::Any* value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::Any* value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto;
};
// ===================================================================
@@ -1360,7 +1385,7 @@ class PROTOBUF_EXPORT Option final :
// string name = 1;
inline void Type::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Type::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.name)
@@ -1370,7 +1395,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Type::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Type.name)
}
inline TProtoStringType* Type::mutable_name() {
@@ -1379,19 +1404,19 @@ inline TProtoStringType* Type::mutable_name() {
return _s;
}
inline const TProtoStringType& Type::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Type::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Type::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Type::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Type.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Type::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -1399,10 +1424,10 @@ inline void Type::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name)
@@ -1410,32 +1435,32 @@ inline void Type::set_allocated_name(TProtoStringType* name) {
// repeated .google.protobuf.Field fields = 2;
inline int Type::_internal_fields_size() const {
- return fields_.size();
+ return _impl_.fields_.size();
}
inline int Type::fields_size() const {
return _internal_fields_size();
}
inline void Type::clear_fields() {
- fields_.Clear();
+ _impl_.fields_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Field* Type::mutable_fields(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields)
- return fields_.Mutable(index);
+ return _impl_.fields_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field >*
Type::mutable_fields() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields)
- return &fields_;
+ return &_impl_.fields_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Field& Type::_internal_fields(int index) const {
- return fields_.Get(index);
+ return _impl_.fields_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Field& Type::fields(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.fields)
return _internal_fields(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Field* Type::_internal_add_fields() {
- return fields_.Add();
+ return _impl_.fields_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Field* Type::add_fields() {
::PROTOBUF_NAMESPACE_ID::Field* _add = _internal_add_fields();
@@ -1445,18 +1470,18 @@ inline ::PROTOBUF_NAMESPACE_ID::Field* Type::add_fields() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Field >&
Type::fields() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
- return fields_;
+ return _impl_.fields_;
}
// repeated string oneofs = 3;
inline int Type::_internal_oneofs_size() const {
- return oneofs_.size();
+ return _impl_.oneofs_.size();
}
inline int Type::oneofs_size() const {
return _internal_oneofs_size();
}
inline void Type::clear_oneofs() {
- oneofs_.Clear();
+ _impl_.oneofs_.Clear();
}
inline TProtoStringType* Type::add_oneofs() {
TProtoStringType* _s = _internal_add_oneofs();
@@ -1464,7 +1489,7 @@ inline TProtoStringType* Type::add_oneofs() {
return _s;
}
inline const TProtoStringType& Type::_internal_oneofs(int index) const {
- return oneofs_.Get(index);
+ return _impl_.oneofs_.Get(index);
}
inline const TProtoStringType& Type::oneofs(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs)
@@ -1472,85 +1497,85 @@ inline const TProtoStringType& Type::oneofs(int index) const {
}
inline TProtoStringType* Type::mutable_oneofs(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs)
- return oneofs_.Mutable(index);
+ return _impl_.oneofs_.Mutable(index);
}
inline void Type::set_oneofs(int index, const TProtoStringType& value) {
- oneofs_.Mutable(index)->assign(value);
+ _impl_.oneofs_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
}
inline void Type::set_oneofs(int index, TProtoStringType&& value) {
- oneofs_.Mutable(index)->assign(std::move(value));
+ _impl_.oneofs_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
}
inline void Type::set_oneofs(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- oneofs_.Mutable(index)->assign(value);
+ _impl_.oneofs_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
}
inline void Type::set_oneofs(int index, const char* value, size_t size) {
- oneofs_.Mutable(index)->assign(
+ _impl_.oneofs_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs)
}
inline TProtoStringType* Type::_internal_add_oneofs() {
- return oneofs_.Add();
+ return _impl_.oneofs_.Add();
}
inline void Type::add_oneofs(const TProtoStringType& value) {
- oneofs_.Add()->assign(value);
+ _impl_.oneofs_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
}
inline void Type::add_oneofs(TProtoStringType&& value) {
- oneofs_.Add(std::move(value));
+ _impl_.oneofs_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
}
inline void Type::add_oneofs(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- oneofs_.Add()->assign(value);
+ _impl_.oneofs_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
}
inline void Type::add_oneofs(const char* value, size_t size) {
- oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
Type::oneofs() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs)
- return oneofs_;
+ return _impl_.oneofs_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
Type::mutable_oneofs() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs)
- return &oneofs_;
+ return &_impl_.oneofs_;
}
// repeated .google.protobuf.Option options = 4;
inline int Type::_internal_options_size() const {
- return options_.size();
+ return _impl_.options_.size();
}
inline int Type::options_size() const {
return _internal_options_size();
}
inline void Type::clear_options() {
- options_.Clear();
+ _impl_.options_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Type::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.options)
- return options_.Mutable(index);
+ return _impl_.options_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
Type::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options)
- return &options_;
+ return &_impl_.options_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Type::_internal_options(int index) const {
- return options_.Get(index);
+ return _impl_.options_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Type::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.options)
return _internal_options(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Type::_internal_add_options() {
- return options_.Add();
+ return _impl_.options_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Type::add_options() {
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
@@ -1560,18 +1585,18 @@ inline ::PROTOBUF_NAMESPACE_ID::Option* Type::add_options() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
Type::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.options)
- return options_;
+ return _impl_.options_;
}
// .google.protobuf.SourceContext source_context = 5;
inline bool Type::_internal_has_source_context() const {
- return this != internal_default_instance() && source_context_ != nullptr;
+ return this != internal_default_instance() && _impl_.source_context_ != nullptr;
}
inline bool Type::has_source_context() const {
return _internal_has_source_context();
}
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Type::_internal_source_context() const {
- const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
+ const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = _impl_.source_context_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceContext&>(
::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
}
@@ -1582,9 +1607,9 @@ inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Type::source_context() cons
inline void Type::unsafe_arena_set_allocated_source_context(
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_context_);
}
- source_context_ = source_context;
+ _impl_.source_context_ = source_context;
if (source_context) {
} else {
@@ -1594,8 +1619,8 @@ inline void Type::unsafe_arena_set_allocated_source_context(
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::release_source_context() {
- ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
- source_context_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = _impl_.source_context_;
+ _impl_.source_context_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -1610,17 +1635,17 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::release_source_context() {
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::unsafe_arena_release_source_context() {
// @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
- ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
- source_context_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = _impl_.source_context_;
+ _impl_.source_context_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::_internal_mutable_source_context() {
- if (source_context_ == nullptr) {
+ if (_impl_.source_context_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
- source_context_ = p;
+ _impl_.source_context_ = p;
}
- return source_context_;
+ return _impl_.source_context_;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() {
::PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
@@ -1630,7 +1655,7 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() {
inline void Type::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
+ delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_context_);
}
if (source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -1644,16 +1669,16 @@ inline void Type::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceCo
} else {
}
- source_context_ = source_context;
+ _impl_.source_context_ = source_context;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_context)
}
// .google.protobuf.Syntax syntax = 6;
inline void Type::clear_syntax() {
- syntax_ = 0;
+ _impl_.syntax_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Type::_internal_syntax() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(_impl_.syntax_);
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Type::syntax() const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.syntax)
@@ -1661,7 +1686,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Syntax Type::syntax() const {
}
inline void Type::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
- syntax_ = value;
+ _impl_.syntax_ = value;
}
inline void Type::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
_internal_set_syntax(value);
@@ -1674,10 +1699,10 @@ inline void Type::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
// .google.protobuf.Field.Kind kind = 1;
inline void Field::clear_kind() {
- kind_ = 0;
+ _impl_.kind_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::Field_Kind Field::_internal_kind() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::Field_Kind >(kind_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::Field_Kind >(_impl_.kind_);
}
inline ::PROTOBUF_NAMESPACE_ID::Field_Kind Field::kind() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.kind)
@@ -1685,7 +1710,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Field_Kind Field::kind() const {
}
inline void Field::_internal_set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value) {
- kind_ = value;
+ _impl_.kind_ = value;
}
inline void Field::set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value) {
_internal_set_kind(value);
@@ -1694,10 +1719,10 @@ inline void Field::set_kind(::PROTOBUF_NAMESPACE_ID::Field_Kind value) {
// .google.protobuf.Field.Cardinality cardinality = 2;
inline void Field::clear_cardinality() {
- cardinality_ = 0;
+ _impl_.cardinality_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::_internal_cardinality() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::Field_Cardinality >(cardinality_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::Field_Cardinality >(_impl_.cardinality_);
}
inline ::PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::cardinality() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality)
@@ -1705,7 +1730,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::cardinality() const {
}
inline void Field::_internal_set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality value) {
- cardinality_ = value;
+ _impl_.cardinality_ = value;
}
inline void Field::set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality value) {
_internal_set_cardinality(value);
@@ -1714,10 +1739,10 @@ inline void Field::set_cardinality(::PROTOBUF_NAMESPACE_ID::Field_Cardinality va
// int32 number = 3;
inline void Field::clear_number() {
- number_ = 0;
+ _impl_.number_ = 0;
}
inline arc_i32 Field::_internal_number() const {
- return number_;
+ return _impl_.number_;
}
inline arc_i32 Field::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.number)
@@ -1725,7 +1750,7 @@ inline arc_i32 Field::number() const {
}
inline void Field::_internal_set_number(arc_i32 value) {
- number_ = value;
+ _impl_.number_ = value;
}
inline void Field::set_number(arc_i32 value) {
_internal_set_number(value);
@@ -1734,7 +1759,7 @@ inline void Field::set_number(arc_i32 value) {
// string name = 4;
inline void Field::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Field::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.name)
@@ -1744,7 +1769,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Field::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Field.name)
}
inline TProtoStringType* Field::mutable_name() {
@@ -1753,19 +1778,19 @@ inline TProtoStringType* Field::mutable_name() {
return _s;
}
inline const TProtoStringType& Field::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Field::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Field::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Field::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Field.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Field::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -1773,10 +1798,10 @@ inline void Field::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
@@ -1784,7 +1809,7 @@ inline void Field::set_allocated_name(TProtoStringType* name) {
// string type_url = 6;
inline void Field::clear_type_url() {
- type_url_.ClearToEmpty();
+ _impl_.type_url_.ClearToEmpty();
}
inline const TProtoStringType& Field::type_url() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.type_url)
@@ -1794,7 +1819,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Field::set_type_url(ArgT0&& arg0, ArgT... args) {
- type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.type_url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Field.type_url)
}
inline TProtoStringType* Field::mutable_type_url() {
@@ -1803,19 +1828,19 @@ inline TProtoStringType* Field::mutable_type_url() {
return _s;
}
inline const TProtoStringType& Field::_internal_type_url() const {
- return type_url_.Get();
+ return _impl_.type_url_.Get();
}
inline void Field::_internal_set_type_url(const TProtoStringType& value) {
- type_url_.Set(value, GetArenaForAllocation());
+ _impl_.type_url_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Field::_internal_mutable_type_url() {
- return type_url_.Mutable(GetArenaForAllocation());
+ return _impl_.type_url_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Field::release_type_url() {
// @@protoc_insertion_point(field_release:google.protobuf.Field.type_url)
- return type_url_.Release();
+ return _impl_.type_url_.Release();
}
inline void Field::set_allocated_type_url(TProtoStringType* type_url) {
if (type_url != nullptr) {
@@ -1823,10 +1848,10 @@ inline void Field::set_allocated_type_url(TProtoStringType* type_url) {
} else {
}
- type_url_.SetAllocated(type_url, GetArenaForAllocation());
+ _impl_.type_url_.SetAllocated(type_url, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (type_url_.IsDefault()) {
- type_url_.Set("", GetArenaForAllocation());
+ if (_impl_.type_url_.IsDefault()) {
+ _impl_.type_url_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
@@ -1834,10 +1859,10 @@ inline void Field::set_allocated_type_url(TProtoStringType* type_url) {
// int32 oneof_index = 7;
inline void Field::clear_oneof_index() {
- oneof_index_ = 0;
+ _impl_.oneof_index_ = 0;
}
inline arc_i32 Field::_internal_oneof_index() const {
- return oneof_index_;
+ return _impl_.oneof_index_;
}
inline arc_i32 Field::oneof_index() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index)
@@ -1845,7 +1870,7 @@ inline arc_i32 Field::oneof_index() const {
}
inline void Field::_internal_set_oneof_index(arc_i32 value) {
- oneof_index_ = value;
+ _impl_.oneof_index_ = value;
}
inline void Field::set_oneof_index(arc_i32 value) {
_internal_set_oneof_index(value);
@@ -1854,10 +1879,10 @@ inline void Field::set_oneof_index(arc_i32 value) {
// bool packed = 8;
inline void Field::clear_packed() {
- packed_ = false;
+ _impl_.packed_ = false;
}
inline bool Field::_internal_packed() const {
- return packed_;
+ return _impl_.packed_;
}
inline bool Field::packed() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.packed)
@@ -1865,7 +1890,7 @@ inline bool Field::packed() const {
}
inline void Field::_internal_set_packed(bool value) {
- packed_ = value;
+ _impl_.packed_ = value;
}
inline void Field::set_packed(bool value) {
_internal_set_packed(value);
@@ -1874,32 +1899,32 @@ inline void Field::set_packed(bool value) {
// repeated .google.protobuf.Option options = 9;
inline int Field::_internal_options_size() const {
- return options_.size();
+ return _impl_.options_.size();
}
inline int Field::options_size() const {
return _internal_options_size();
}
inline void Field::clear_options() {
- options_.Clear();
+ _impl_.options_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Field::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Field.options)
- return options_.Mutable(index);
+ return _impl_.options_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
Field::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options)
- return &options_;
+ return &_impl_.options_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Field::_internal_options(int index) const {
- return options_.Get(index);
+ return _impl_.options_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Field::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.options)
return _internal_options(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Field::_internal_add_options() {
- return options_.Add();
+ return _impl_.options_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Field::add_options() {
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
@@ -1909,12 +1934,12 @@ inline ::PROTOBUF_NAMESPACE_ID::Option* Field::add_options() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
Field::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Field.options)
- return options_;
+ return _impl_.options_;
}
// string json_name = 10;
inline void Field::clear_json_name() {
- json_name_.ClearToEmpty();
+ _impl_.json_name_.ClearToEmpty();
}
inline const TProtoStringType& Field::json_name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.json_name)
@@ -1924,7 +1949,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Field::set_json_name(ArgT0&& arg0, ArgT... args) {
- json_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.json_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Field.json_name)
}
inline TProtoStringType* Field::mutable_json_name() {
@@ -1933,19 +1958,19 @@ inline TProtoStringType* Field::mutable_json_name() {
return _s;
}
inline const TProtoStringType& Field::_internal_json_name() const {
- return json_name_.Get();
+ return _impl_.json_name_.Get();
}
inline void Field::_internal_set_json_name(const TProtoStringType& value) {
- json_name_.Set(value, GetArenaForAllocation());
+ _impl_.json_name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Field::_internal_mutable_json_name() {
- return json_name_.Mutable(GetArenaForAllocation());
+ return _impl_.json_name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Field::release_json_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Field.json_name)
- return json_name_.Release();
+ return _impl_.json_name_.Release();
}
inline void Field::set_allocated_json_name(TProtoStringType* json_name) {
if (json_name != nullptr) {
@@ -1953,10 +1978,10 @@ inline void Field::set_allocated_json_name(TProtoStringType* json_name) {
} else {
}
- json_name_.SetAllocated(json_name, GetArenaForAllocation());
+ _impl_.json_name_.SetAllocated(json_name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (json_name_.IsDefault()) {
- json_name_.Set("", GetArenaForAllocation());
+ if (_impl_.json_name_.IsDefault()) {
+ _impl_.json_name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
@@ -1964,7 +1989,7 @@ inline void Field::set_allocated_json_name(TProtoStringType* json_name) {
// string default_value = 11;
inline void Field::clear_default_value() {
- default_value_.ClearToEmpty();
+ _impl_.default_value_.ClearToEmpty();
}
inline const TProtoStringType& Field::default_value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Field.default_value)
@@ -1974,7 +1999,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Field::set_default_value(ArgT0&& arg0, ArgT... args) {
- default_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.default_value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Field.default_value)
}
inline TProtoStringType* Field::mutable_default_value() {
@@ -1983,19 +2008,19 @@ inline TProtoStringType* Field::mutable_default_value() {
return _s;
}
inline const TProtoStringType& Field::_internal_default_value() const {
- return default_value_.Get();
+ return _impl_.default_value_.Get();
}
inline void Field::_internal_set_default_value(const TProtoStringType& value) {
- default_value_.Set(value, GetArenaForAllocation());
+ _impl_.default_value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Field::_internal_mutable_default_value() {
- return default_value_.Mutable(GetArenaForAllocation());
+ return _impl_.default_value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Field::release_default_value() {
// @@protoc_insertion_point(field_release:google.protobuf.Field.default_value)
- return default_value_.Release();
+ return _impl_.default_value_.Release();
}
inline void Field::set_allocated_default_value(TProtoStringType* default_value) {
if (default_value != nullptr) {
@@ -2003,10 +2028,10 @@ inline void Field::set_allocated_default_value(TProtoStringType* default_value)
} else {
}
- default_value_.SetAllocated(default_value, GetArenaForAllocation());
+ _impl_.default_value_.SetAllocated(default_value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (default_value_.IsDefault()) {
- default_value_.Set("", GetArenaForAllocation());
+ if (_impl_.default_value_.IsDefault()) {
+ _impl_.default_value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value)
@@ -2018,7 +2043,7 @@ inline void Field::set_allocated_default_value(TProtoStringType* default_value)
// string name = 1;
inline void Enum::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Enum::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.name)
@@ -2028,7 +2053,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Enum::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Enum.name)
}
inline TProtoStringType* Enum::mutable_name() {
@@ -2037,19 +2062,19 @@ inline TProtoStringType* Enum::mutable_name() {
return _s;
}
inline const TProtoStringType& Enum::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Enum::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Enum::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Enum::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Enum.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Enum::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -2057,10 +2082,10 @@ inline void Enum::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name)
@@ -2068,32 +2093,32 @@ inline void Enum::set_allocated_name(TProtoStringType* name) {
// repeated .google.protobuf.EnumValue enumvalue = 2;
inline int Enum::_internal_enumvalue_size() const {
- return enumvalue_.size();
+ return _impl_.enumvalue_.size();
}
inline int Enum::enumvalue_size() const {
return _internal_enumvalue_size();
}
inline void Enum::clear_enumvalue() {
- enumvalue_.Clear();
+ _impl_.enumvalue_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::mutable_enumvalue(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue)
- return enumvalue_.Mutable(index);
+ return _impl_.enumvalue_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue >*
Enum::mutable_enumvalue() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue)
- return &enumvalue_;
+ return &_impl_.enumvalue_;
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumValue& Enum::_internal_enumvalue(int index) const {
- return enumvalue_.Get(index);
+ return _impl_.enumvalue_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::EnumValue& Enum::enumvalue(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue)
return _internal_enumvalue(index);
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::_internal_add_enumvalue() {
- return enumvalue_.Add();
+ return _impl_.enumvalue_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::add_enumvalue() {
::PROTOBUF_NAMESPACE_ID::EnumValue* _add = _internal_add_enumvalue();
@@ -2103,37 +2128,37 @@ inline ::PROTOBUF_NAMESPACE_ID::EnumValue* Enum::add_enumvalue() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue >&
Enum::enumvalue() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
- return enumvalue_;
+ return _impl_.enumvalue_;
}
// repeated .google.protobuf.Option options = 3;
inline int Enum::_internal_options_size() const {
- return options_.size();
+ return _impl_.options_.size();
}
inline int Enum::options_size() const {
return _internal_options_size();
}
inline void Enum::clear_options() {
- options_.Clear();
+ _impl_.options_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options)
- return options_.Mutable(index);
+ return _impl_.options_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
Enum::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options)
- return &options_;
+ return &_impl_.options_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Enum::_internal_options(int index) const {
- return options_.Get(index);
+ return _impl_.options_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& Enum::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.options)
return _internal_options(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::_internal_add_options() {
- return options_.Add();
+ return _impl_.options_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::add_options() {
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
@@ -2143,18 +2168,18 @@ inline ::PROTOBUF_NAMESPACE_ID::Option* Enum::add_options() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
Enum::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
- return options_;
+ return _impl_.options_;
}
// .google.protobuf.SourceContext source_context = 4;
inline bool Enum::_internal_has_source_context() const {
- return this != internal_default_instance() && source_context_ != nullptr;
+ return this != internal_default_instance() && _impl_.source_context_ != nullptr;
}
inline bool Enum::has_source_context() const {
return _internal_has_source_context();
}
inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Enum::_internal_source_context() const {
- const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_;
+ const ::PROTOBUF_NAMESPACE_ID::SourceContext* p = _impl_.source_context_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::SourceContext&>(
::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_);
}
@@ -2165,9 +2190,9 @@ inline const ::PROTOBUF_NAMESPACE_ID::SourceContext& Enum::source_context() cons
inline void Enum::unsafe_arena_set_allocated_source_context(
::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_context_);
}
- source_context_ = source_context;
+ _impl_.source_context_ = source_context;
if (source_context) {
} else {
@@ -2177,8 +2202,8 @@ inline void Enum::unsafe_arena_set_allocated_source_context(
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::release_source_context() {
- ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
- source_context_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = _impl_.source_context_;
+ _impl_.source_context_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -2193,17 +2218,17 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::release_source_context() {
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::unsafe_arena_release_source_context() {
// @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
- ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_;
- source_context_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::SourceContext* temp = _impl_.source_context_;
+ _impl_.source_context_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::_internal_mutable_source_context() {
- if (source_context_ == nullptr) {
+ if (_impl_.source_context_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(GetArenaForAllocation());
- source_context_ = p;
+ _impl_.source_context_ = p;
}
- return source_context_;
+ return _impl_.source_context_;
}
inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() {
::PROTOBUF_NAMESPACE_ID::SourceContext* _msg = _internal_mutable_source_context();
@@ -2213,7 +2238,7 @@ inline ::PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() {
inline void Enum::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_);
+ delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.source_context_);
}
if (source_context) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -2227,16 +2252,16 @@ inline void Enum::set_allocated_source_context(::PROTOBUF_NAMESPACE_ID::SourceCo
} else {
}
- source_context_ = source_context;
+ _impl_.source_context_ = source_context;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_context)
}
// .google.protobuf.Syntax syntax = 5;
inline void Enum::clear_syntax() {
- syntax_ = 0;
+ _impl_.syntax_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Enum::_internal_syntax() const {
- return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(syntax_);
+ return static_cast< ::PROTOBUF_NAMESPACE_ID::Syntax >(_impl_.syntax_);
}
inline ::PROTOBUF_NAMESPACE_ID::Syntax Enum::syntax() const {
// @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax)
@@ -2244,7 +2269,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Syntax Enum::syntax() const {
}
inline void Enum::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
- syntax_ = value;
+ _impl_.syntax_ = value;
}
inline void Enum::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
_internal_set_syntax(value);
@@ -2257,7 +2282,7 @@ inline void Enum::set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) {
// string name = 1;
inline void EnumValue::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& EnumValue::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name)
@@ -2267,7 +2292,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void EnumValue::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name)
}
inline TProtoStringType* EnumValue::mutable_name() {
@@ -2276,19 +2301,19 @@ inline TProtoStringType* EnumValue::mutable_name() {
return _s;
}
inline const TProtoStringType& EnumValue::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void EnumValue::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* EnumValue::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* EnumValue::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void EnumValue::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -2296,10 +2321,10 @@ inline void EnumValue::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
@@ -2307,10 +2332,10 @@ inline void EnumValue::set_allocated_name(TProtoStringType* name) {
// int32 number = 2;
inline void EnumValue::clear_number() {
- number_ = 0;
+ _impl_.number_ = 0;
}
inline arc_i32 EnumValue::_internal_number() const {
- return number_;
+ return _impl_.number_;
}
inline arc_i32 EnumValue::number() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number)
@@ -2318,7 +2343,7 @@ inline arc_i32 EnumValue::number() const {
}
inline void EnumValue::_internal_set_number(arc_i32 value) {
- number_ = value;
+ _impl_.number_ = value;
}
inline void EnumValue::set_number(arc_i32 value) {
_internal_set_number(value);
@@ -2327,32 +2352,32 @@ inline void EnumValue::set_number(arc_i32 value) {
// repeated .google.protobuf.Option options = 3;
inline int EnumValue::_internal_options_size() const {
- return options_.size();
+ return _impl_.options_.size();
}
inline int EnumValue::options_size() const {
return _internal_options_size();
}
inline void EnumValue::clear_options() {
- options_.Clear();
+ _impl_.options_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::mutable_options(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options)
- return options_.Mutable(index);
+ return _impl_.options_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >*
EnumValue::mutable_options() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options)
- return &options_;
+ return &_impl_.options_;
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& EnumValue::_internal_options(int index) const {
- return options_.Get(index);
+ return _impl_.options_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::Option& EnumValue::options(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options)
return _internal_options(index);
}
inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::_internal_add_options() {
- return options_.Add();
+ return _impl_.options_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::add_options() {
::PROTOBUF_NAMESPACE_ID::Option* _add = _internal_add_options();
@@ -2362,7 +2387,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Option* EnumValue::add_options() {
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option >&
EnumValue::options() const {
// @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
- return options_;
+ return _impl_.options_;
}
// -------------------------------------------------------------------
@@ -2371,7 +2396,7 @@ EnumValue::options() const {
// string name = 1;
inline void Option::clear_name() {
- name_.ClearToEmpty();
+ _impl_.name_.ClearToEmpty();
}
inline const TProtoStringType& Option::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.Option.name)
@@ -2381,7 +2406,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Option::set_name(ArgT0&& arg0, ArgT... args) {
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.Option.name)
}
inline TProtoStringType* Option::mutable_name() {
@@ -2390,19 +2415,19 @@ inline TProtoStringType* Option::mutable_name() {
return _s;
}
inline const TProtoStringType& Option::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void Option::_internal_set_name(const TProtoStringType& value) {
- name_.Set(value, GetArenaForAllocation());
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Option::_internal_mutable_name() {
- return name_.Mutable(GetArenaForAllocation());
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Option::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.Option.name)
- return name_.Release();
+ return _impl_.name_.Release();
}
inline void Option::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
@@ -2410,10 +2435,10 @@ inline void Option::set_allocated_name(TProtoStringType* name) {
} else {
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
@@ -2421,13 +2446,13 @@ inline void Option::set_allocated_name(TProtoStringType* name) {
// .google.protobuf.Any value = 2;
inline bool Option::_internal_has_value() const {
- return this != internal_default_instance() && value_ != nullptr;
+ return this != internal_default_instance() && _impl_.value_ != nullptr;
}
inline bool Option::has_value() const {
return _internal_has_value();
}
inline const ::PROTOBUF_NAMESPACE_ID::Any& Option::_internal_value() const {
- const ::PROTOBUF_NAMESPACE_ID::Any* p = value_;
+ const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.value_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Any&>(
::PROTOBUF_NAMESPACE_ID::_Any_default_instance_);
}
@@ -2438,9 +2463,9 @@ inline const ::PROTOBUF_NAMESPACE_ID::Any& Option::value() const {
inline void Option::unsafe_arena_set_allocated_value(
::PROTOBUF_NAMESPACE_ID::Any* value) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.value_);
}
- value_ = value;
+ _impl_.value_ = value;
if (value) {
} else {
@@ -2450,8 +2475,8 @@ inline void Option::unsafe_arena_set_allocated_value(
}
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::release_value() {
- ::PROTOBUF_NAMESPACE_ID::Any* temp = value_;
- value_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.value_;
+ _impl_.value_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -2466,17 +2491,17 @@ inline ::PROTOBUF_NAMESPACE_ID::Any* Option::release_value() {
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::unsafe_arena_release_value() {
// @@protoc_insertion_point(field_release:google.protobuf.Option.value)
- ::PROTOBUF_NAMESPACE_ID::Any* temp = value_;
- value_ = nullptr;
+ ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.value_;
+ _impl_.value_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::_internal_mutable_value() {
- if (value_ == nullptr) {
+ if (_impl_.value_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation());
- value_ = p;
+ _impl_.value_ = p;
}
- return value_;
+ return _impl_.value_;
}
inline ::PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() {
::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_value();
@@ -2486,7 +2511,7 @@ inline ::PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() {
inline void Option::set_allocated_value(::PROTOBUF_NAMESPACE_ID::Any* value) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_);
+ delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.value_);
}
if (value) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -2500,7 +2525,7 @@ inline void Option::set_allocated_value(::PROTOBUF_NAMESPACE_ID::Any* value) {
} else {
}
- value_ = value;
+ _impl_.value_ = value;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value)
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc b/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
index 2d5d94990d..837fc8bfa6 100644
--- a/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
@@ -111,7 +111,7 @@ void UnknownFieldSet::MergeToInternalMetadata(
size_t UnknownFieldSet::SpaceUsedExcludingSelfLong() const {
if (fields_.empty()) return 0;
- size_t total_size = sizeof(fields_) + sizeof(UnknownField) * fields_.size();
+ size_t total_size = sizeof(UnknownField) * fields_.capacity();
for (const UnknownField& field : fields_) {
switch (field.type()) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
index 80cab309be..d481be474e 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
@@ -64,13 +64,13 @@ bool ParseDelimitedFromZeroCopyStream(MessageLite* message,
bool ParseDelimitedFromCodedStream(MessageLite* message,
io::CodedInputStream* input,
bool* clean_eof) {
- if (clean_eof != NULL) *clean_eof = false;
+ if (clean_eof != nullptr) *clean_eof = false;
int start = input->CurrentPosition();
// Read the size.
- uint32 size;
+ arc_ui32 size;
if (!input->ReadVarint32(&size)) {
- if (clean_eof != NULL) *clean_eof = input->CurrentPosition() == start;
+ if (clean_eof != nullptr) *clean_eof = input->CurrentPosition() == start;
return false;
}
@@ -79,7 +79,7 @@ bool ParseDelimitedFromCodedStream(MessageLite* message,
int position_after_size = input->CurrentPosition();
// Tell the stream not to read beyond that size.
- io::CodedInputStream::Limit limit = input->PushLimit(size);
+ io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(size));
// Parse the message.
if (!message->MergeFromCodedStream(input)) return false;
@@ -105,11 +105,12 @@ bool SerializeDelimitedToCodedStream(const MessageLite& message,
size_t size = message.ByteSizeLong();
if (size > INT_MAX) return false;
- output->WriteVarint32(size);
+ output->WriteVarint32(static_cast<arc_ui32>(size));
// Write the content.
- uint8* buffer = output->GetDirectBufferForNBytesAndAdvance(size);
- if (buffer != NULL) {
+ uint8_t* buffer =
+ output->GetDirectBufferForNBytesAndAdvance(static_cast<int>(size));
+ if (buffer != nullptr) {
// Optimization: The message fits in one buffer, so use the faster
// direct-to-array serialization path.
message.SerializeWithCachedSizesToArray(buffer);
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc
index 9c615a083f..1ae65eb21f 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/datapiece.cc
@@ -100,6 +100,24 @@ util::StatusOr<float> DoubleToFloat(double before) {
return static_cast<float>(before);
} else if (before > std::numeric_limits<float>::max() ||
before < -std::numeric_limits<float>::max()) {
+ // Some doubles are larger than the largest float, but after
+ // rounding they will be equal to the largest float.
+ // We can't just attempt the conversion because that has UB if
+ // the value really is out-of-range.
+ // Here we take advantage that 1/2-ing a large floating point
+ // will not lose precision.
+ double half_before = before * 0.5;
+ if (half_before < std::numeric_limits<float>::max() &&
+ half_before > -std::numeric_limits<float>::max()) {
+ const float half_fmax = std::numeric_limits<float>::max() * 0.5f;
+ // If after being cut in half, the value is less than the largest float,
+ // then it's safe to convert it to float. Importantly, this conversion
+ // rounds in the same way that the original does.
+ float half_after = static_cast<float>(half_before);
+ if (half_after <= half_fmax && half_after >= -half_fmax) {
+ return half_after + half_after;
+ }
+ }
// Double value outside of the range of float.
return util::InvalidArgumentError(DoubleAsString(before));
} else {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc
index 769099c503..af86e78943 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc
@@ -503,7 +503,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject(
// stream, we write those values.
if (master_type_.name() == kStructType) {
// Struct has a map<string, Value> field called "fields".
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
// "fields": [
Push("fields", Item::MAP, true, true);
return this;
@@ -514,7 +514,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject(
// object within that type is a struct type. So start a struct.
//
// The struct field in Value type is named "struct_value"
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
// Also start the map field "fields" within the struct.
// "struct_value": {
// "fields": [
@@ -703,7 +703,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartList(
// we have to start the "list_value" within google.protobuf.Value.
//
// See
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto
//
// Render
// "<name>": {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc
index 1ce88be784..401adc94a7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/json_util.cc
@@ -31,9 +31,12 @@
#include <google/protobuf/util/json_util.h>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/stubs/status.h>
+#include <google/protobuf/stubs/bytestream.h>
+#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/stubs/once.h>
#include <google/protobuf/util/internal/default_value_objectwriter.h>
#include <google/protobuf/util/internal/error_listener.h>
#include <google/protobuf/util/internal/json_objectwriter.h>
@@ -42,9 +45,6 @@
#include <google/protobuf/util/internal/protostream_objectwriter.h>
#include <google/protobuf/util/type_resolver.h>
#include <google/protobuf/util/type_resolver_util.h>
-#include <google/protobuf/stubs/bytestream.h>
-#include <google/protobuf/stubs/status.h>
-#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/status_macros.h>
// clang-format off
@@ -64,7 +64,7 @@ ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink() {
void ZeroCopyStreamByteSink::Append(const char* bytes, size_t len) {
while (true) {
- if (len <= buffer_size_) {
+ if (len <= buffer_size_) { // NOLINT
memcpy(buffer_, bytes, len);
buffer_ = static_cast<char*>(buffer_) + len;
buffer_size_ -= len;
@@ -226,7 +226,9 @@ TProtoStringType GetTypeUrl(const Message& message) {
message.GetDescriptor()->full_name();
}
-void DeleteGeneratedTypeResolver() { delete generated_type_resolver_; }
+void DeleteGeneratedTypeResolver() { // NOLINT
+ delete generated_type_resolver_;
+}
void InitGeneratedTypeResolver() {
generated_type_resolver_ = NewTypeResolverForDescriptorPool(
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/json_util.h b/contrib/libs/protobuf/src/google/protobuf/util/json_util.h
index 35b977d2fc..d4085d04cf 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/json_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/json_util.h
@@ -33,11 +33,11 @@
#ifndef GOOGLE_PROTOBUF_UTIL_JSON_UTIL_H__
#define GOOGLE_PROTOBUF_UTIL_JSON_UTIL_H__
-#include <google/protobuf/message.h>
-#include <google/protobuf/util/type_resolver.h>
#include <google/protobuf/stubs/bytestream.h>
#include <google/protobuf/stubs/status.h>
#include <google/protobuf/stubs/strutil.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/util/type_resolver.h>
// Must be included last.
#include <google/protobuf/port_def.inc>
@@ -62,8 +62,7 @@ struct JsonParseOptions {
bool case_insensitive_enum_parsing;
JsonParseOptions()
- : ignore_unknown_fields(false),
- case_insensitive_enum_parsing(false) {}
+ : ignore_unknown_fields(false), case_insensitive_enum_parsing(false) {}
};
struct JsonPrintOptions {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h
index b28aa61d18..fbd5da7897 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.h
@@ -223,16 +223,16 @@ class PROTOBUF_EXPORT MessageDifferencer {
// itself and the second will be the actual field in the embedded message
// that was added/deleted/modified.
// Fields will be reported in PostTraversalOrder.
- // For example, given following proto, if both baz and quux are changed.
+ // For example, given following proto, if both baz and mooo are changed.
// foo {
// bar {
// baz: 1
- // quux: 2
+ // mooo: 2
// }
// }
// ReportModified will be invoked with following order:
- // 1. foo.bar.baz or foo.bar.quux
- // 2. foo.bar.quux or foo.bar.baz
+ // 1. foo.bar.baz or foo.bar.mooo
+ // 2. foo.bar.mooo or foo.bar.baz
// 2. foo.bar
// 3. foo
class PROTOBUF_EXPORT Reporter {
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc b/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
index 854e8590a6..a686e911da 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
@@ -116,15 +116,15 @@ TProtoStringType FormatNanos(arc_i32 nanos) {
}
}
-TProtoStringType FormatTime(int64 seconds, int32 nanos) {
+TProtoStringType FormatTime(arc_i64 seconds, arc_i32 nanos) {
return ::google::protobuf::internal::FormatTime(seconds, nanos);
}
-bool ParseTime(const TProtoStringType& value, int64* seconds, int32* nanos) {
+bool ParseTime(const TProtoStringType& value, arc_i64* seconds, arc_i32* nanos) {
return ::google::protobuf::internal::ParseTime(value, seconds, nanos);
}
-void CurrentTime(int64* seconds, int32* nanos) {
+void CurrentTime(arc_i64* seconds, arc_i32* nanos) {
return ::google::protobuf::internal::GetCurrentTime(seconds, nanos);
}
@@ -207,7 +207,7 @@ bool TimeUtil::FromString(const TProtoStringType& value, Duration* duration) {
return false;
}
bool negative = (value[0] == '-');
- int sign_length = (negative ? 1 : 0);
+ size_t sign_length = (negative ? 1 : 0);
// Parse the duration value as two integers rather than a float value
// to avoid precision loss.
TProtoStringType seconds_part, nanos_part;
@@ -228,7 +228,7 @@ bool TimeUtil::FromString(const TProtoStringType& value, Duration* duration) {
if (end != nanos_part.c_str() + nanos_part.length()) {
return false;
}
- nanos = nanos * Pow(10, 9 - nanos_part.length());
+ nanos = nanos * Pow(10, static_cast<int>(9 - nanos_part.length()));
if (negative) {
// If a Duration is negative, both seconds and nanos should be negative.
seconds = -seconds;
@@ -434,9 +434,12 @@ Duration& operator*=(Duration& d, arc_i64 r) { // NOLINT
}
Duration& operator*=(Duration& d, double r) { // NOLINT
- double result = (d.seconds() * 1.0 + 1.0 * d.nanos() / kNanosPerSecond) * r;
+ double result =
+ (static_cast<double>(d.seconds()) + d.nanos() * (1.0 / kNanosPerSecond)) *
+ r;
arc_i64 seconds = static_cast<arc_i64>(result);
- arc_i32 nanos = static_cast<arc_i32>((result - seconds) * kNanosPerSecond);
+ arc_i32 nanos = static_cast<arc_i32>((result - static_cast<double>(seconds)) *
+ kNanosPerSecond);
// Note that we normalize here not just because nanos can have a different
// sign from seconds but also that nanos can be any arbitrary value when
// overflow happens (i.e., the result is a much larger value than what
diff --git a/contrib/libs/protobuf/src/google/protobuf/util/time_util.h b/contrib/libs/protobuf/src/google/protobuf/util/time_util.h
index e85e3c2b47..fcf70d1e5a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/util/time_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/util/time_util.h
@@ -40,8 +40,8 @@
#ifdef _MSC_VER
#ifdef _XBOX_ONE
struct timeval {
- int64 tv_sec; /* seconds */
- int64 tv_usec; /* and microseconds */
+ arc_i64 tv_sec; /* seconds */
+ arc_i64 tv_usec; /* and microseconds */
};
#else
#include <winsock2.h>
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format.cc b/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
index a90df7e4c1..82b181bae4 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
@@ -657,11 +657,9 @@ struct WireFormat::MessageSetParser {
const char* _InternalParse(const char* ptr, internal::ParseContext* ctx) {
// Parse a MessageSetItem
auto metadata = reflection->MutableInternalMetadata(msg);
- enum class State { kNoTag, kHasType, kHasPayload, kDone };
- State state = State::kNoTag;
-
TProtoStringType payload;
arc_ui32 type_id = 0;
+ bool payload_read = false;
while (!ctx->Done(&ptr)) {
// We use 64 bit tags in order to allow typeid's that span the whole
// range of 32 bit numbers.
@@ -670,11 +668,8 @@ struct WireFormat::MessageSetParser {
arc_ui64 tmp;
ptr = ParseBigVarint(ptr, &tmp);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- if (state == State::kNoTag) {
- type_id = tmp;
- state = State::kHasType;
- } else if (state == State::kHasPayload) {
- type_id = tmp;
+ type_id = tmp;
+ if (payload_read) {
const FieldDescriptor* field;
if (ctx->data().pool == nullptr) {
field = reflection->FindKnownExtensionByNumber(type_id);
@@ -701,17 +696,17 @@ struct WireFormat::MessageSetParser {
GOOGLE_PROTOBUF_PARSER_ASSERT(value->_InternalParse(p, &tmp_ctx) &&
tmp_ctx.EndedAtLimit());
}
- state = State::kDone;
+ type_id = 0;
}
continue;
} else if (tag == WireFormatLite::kMessageSetMessageTag) {
- if (state == State::kNoTag) {
+ if (type_id == 0) {
arc_i32 size = ReadSize(&ptr);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ptr = ctx->ReadString(ptr, size, &payload);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- state = State::kHasPayload;
- } else if (state == State::kHasType) {
+ payload_read = true;
+ } else {
// We're now parsing the payload
const FieldDescriptor* field = nullptr;
if (descriptor->IsExtensionNumber(type_id)) {
@@ -725,12 +720,7 @@ struct WireFormat::MessageSetParser {
ptr = WireFormat::_InternalParseAndMergeField(
msg, ptr, ctx, static_cast<arc_ui64>(type_id) * 8 + 2, reflection,
field);
- state = State::kDone;
- } else {
- arc_i32 size = ReadSize(&ptr);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ptr = ctx->Skip(ptr, size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
+ type_id = 0;
}
} else {
// An unknown field in MessageSetItem.
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format.h b/contrib/libs/protobuf/src/google/protobuf/wire_format.h
index 9b088a9ed9..0be9ca22f7 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format.h
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format.h
@@ -40,8 +40,6 @@
#define GOOGLE_PROTOBUF_WIRE_FORMAT_H__
-#include <string>
-
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/stubs/casts.h>
diff --git a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h
index 5166f3e9c8..d18870f60a 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h
+++ b/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.h
@@ -41,6 +41,7 @@
#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__
+#include <limits>
#include <string>
#include <google/protobuf/stubs/common.h>
@@ -1826,9 +1827,6 @@ bool ParseMessageSetItemImpl(io::CodedInputStream* input, MS ms) {
// we can parse it later.
TProtoStringType message_data;
- enum class State { kNoTag, kHasType, kHasPayload, kDone };
- State state = State::kNoTag;
-
while (true) {
const arc_ui32 tag = input->ReadTagNoLastTag();
if (tag == 0) return false;
@@ -1837,34 +1835,26 @@ bool ParseMessageSetItemImpl(io::CodedInputStream* input, MS ms) {
case WireFormatLite::kMessageSetTypeIdTag: {
arc_ui32 type_id;
if (!input->ReadVarint32(&type_id)) return false;
- if (state == State::kNoTag) {
- last_type_id = type_id;
- state = State::kHasType;
- } else if (state == State::kHasPayload) {
+ last_type_id = type_id;
+
+ if (!message_data.empty()) {
// We saw some message data before the type_id. Have to parse it
// now.
io::CodedInputStream sub_input(
reinterpret_cast<const uint8_t*>(message_data.data()),
static_cast<int>(message_data.size()));
sub_input.SetRecursionLimit(input->RecursionBudget());
- if (!ms.ParseField(type_id, &sub_input)) {
+ if (!ms.ParseField(last_type_id, &sub_input)) {
return false;
}
message_data.clear();
- state = State::kDone;
}
break;
}
case WireFormatLite::kMessageSetMessageTag: {
- if (state == State::kHasType) {
- // Already saw type_id, so we can parse this directly.
- if (!ms.ParseField(last_type_id, input)) {
- return false;
- }
- state = State::kDone;
- } else if (state == State::kNoTag) {
+ if (last_type_id == 0) {
// We haven't seen a type_id yet. Append this data to message_data.
arc_ui32 length;
if (!input->ReadVarint32(&length)) return false;
@@ -1875,9 +1865,11 @@ bool ParseMessageSetItemImpl(io::CodedInputStream* input, MS ms) {
auto ptr = reinterpret_cast<uint8_t*>(&message_data[0]);
ptr = io::CodedOutputStream::WriteVarint32ToArray(length, ptr);
if (!input->ReadRaw(ptr, length)) return false;
- state = State::kHasPayload;
} else {
- if (!ms.SkipField(tag, input)) return false;
+ // Already saw type_id, so we can parse this directly.
+ if (!ms.ParseField(last_type_id, input)) {
+ return false;
+ }
}
break;
diff --git a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
index a1d8c6a761..ebd26d300c 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
@@ -22,8 +22,9 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR DoubleValue::DoubleValue(
- ::_pbi::ConstantInitialized)
- : value_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct DoubleValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR DoubleValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -34,8 +35,9 @@ struct DoubleValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DoubleValueDefaultTypeInternal _DoubleValue_default_instance_;
PROTOBUF_CONSTEXPR FloatValue::FloatValue(
- ::_pbi::ConstantInitialized)
- : value_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct FloatValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR FloatValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -46,8 +48,9 @@ struct FloatValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FloatValueDefaultTypeInternal _FloatValue_default_instance_;
PROTOBUF_CONSTEXPR Int64Value::Int64Value(
- ::_pbi::ConstantInitialized)
- : value_(arc_i64{0}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/arc_i64{0}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct Int64ValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR Int64ValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -58,8 +61,9 @@ struct Int64ValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int64ValueDefaultTypeInternal _Int64Value_default_instance_;
PROTOBUF_CONSTEXPR UInt64Value::UInt64Value(
- ::_pbi::ConstantInitialized)
- : value_(arc_ui64{0u}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/arc_ui64{0u}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct UInt64ValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR UInt64ValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -70,8 +74,9 @@ struct UInt64ValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UInt64ValueDefaultTypeInternal _UInt64Value_default_instance_;
PROTOBUF_CONSTEXPR Int32Value::Int32Value(
- ::_pbi::ConstantInitialized)
- : value_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/0
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct Int32ValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR Int32ValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -82,8 +87,9 @@ struct Int32ValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int32ValueDefaultTypeInternal _Int32Value_default_instance_;
PROTOBUF_CONSTEXPR UInt32Value::UInt32Value(
- ::_pbi::ConstantInitialized)
- : value_(0u){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/0u
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct UInt32ValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR UInt32ValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -94,8 +100,9 @@ struct UInt32ValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UInt32ValueDefaultTypeInternal _UInt32Value_default_instance_;
PROTOBUF_CONSTEXPR BoolValue::BoolValue(
- ::_pbi::ConstantInitialized)
- : value_(false){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/false
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct BoolValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR BoolValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -106,8 +113,9 @@ struct BoolValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoolValueDefaultTypeInternal _BoolValue_default_instance_;
PROTOBUF_CONSTEXPR StringValue::StringValue(
- ::_pbi::ConstantInitialized)
- : value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct StringValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR StringValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -118,8 +126,9 @@ struct StringValueDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StringValueDefaultTypeInternal _StringValue_default_instance_;
PROTOBUF_CONSTEXPR BytesValue::BytesValue(
- ::_pbi::ConstantInitialized)
- : value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_._cached_size_)*/{}} {}
struct BytesValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR BytesValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -141,63 +150,63 @@ const arc_ui32 TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets[] PROTO
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DoubleValue, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::DoubleValue, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FloatValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FloatValue, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FloatValue, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int64Value, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int64Value, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int64Value, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt64Value, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt64Value, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt64Value, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int32Value, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int32Value, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Int32Value, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt32Value, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt32Value, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::UInt32Value, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BoolValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BoolValue, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BoolValue, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::StringValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::StringValue, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::StringValue, _impl_.value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BytesValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BytesValue, value_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::BytesValue, _impl_.value_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::DoubleValue)},
@@ -263,18 +272,29 @@ class DoubleValue::_Internal {
DoubleValue::DoubleValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.DoubleValue)
}
DoubleValue::DoubleValue(const DoubleValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ DoubleValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue)
}
-inline void DoubleValue::SharedCtor() {
-value_ = 0;
+inline void DoubleValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
DoubleValue::~DoubleValue() {
@@ -291,7 +311,7 @@ inline void DoubleValue::SharedDtor() {
}
void DoubleValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void DoubleValue::Clear() {
@@ -300,7 +320,7 @@ void DoubleValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = 0;
+ _impl_.value_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -313,7 +333,7 @@ const char* DoubleValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
// double value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
ptr += sizeof(double);
} else
goto handle_unusual;
@@ -382,25 +402,21 @@ size_t DoubleValue::ByteSizeLong() const {
total_size += 1 + 8;
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DoubleValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
DoubleValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DoubleValue::GetClassData() const { return &_class_data_; }
-void DoubleValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<DoubleValue *>(to)->MergeFrom(
- static_cast<const DoubleValue &>(from));
-}
-
-void DoubleValue::MergeFrom(const DoubleValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DoubleValue)
- GOOGLE_DCHECK_NE(&from, this);
+void DoubleValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<DoubleValue*>(&to_msg);
+ auto& from = static_cast<const DoubleValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DoubleValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
@@ -409,9 +425,9 @@ void DoubleValue::MergeFrom(const DoubleValue& from) {
arc_ui64 raw_value;
memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
if (raw_value != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DoubleValue::CopyFrom(const DoubleValue& from) {
@@ -428,7 +444,7 @@ bool DoubleValue::IsInitialized() const {
void DoubleValue::InternalSwap(DoubleValue* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DoubleValue::GetMetadata() const {
@@ -446,18 +462,29 @@ class FloatValue::_Internal {
FloatValue::FloatValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.FloatValue)
}
FloatValue::FloatValue(const FloatValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ FloatValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue)
}
-inline void FloatValue::SharedCtor() {
-value_ = 0;
+inline void FloatValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
FloatValue::~FloatValue() {
@@ -474,7 +501,7 @@ inline void FloatValue::SharedDtor() {
}
void FloatValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void FloatValue::Clear() {
@@ -483,7 +510,7 @@ void FloatValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = 0;
+ _impl_.value_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -496,7 +523,7 @@ const char* FloatValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ct
// float value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
@@ -565,25 +592,21 @@ size_t FloatValue::ByteSizeLong() const {
total_size += 1 + 4;
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FloatValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
FloatValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FloatValue::GetClassData() const { return &_class_data_; }
-void FloatValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<FloatValue *>(to)->MergeFrom(
- static_cast<const FloatValue &>(from));
-}
-
-void FloatValue::MergeFrom(const FloatValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FloatValue)
- GOOGLE_DCHECK_NE(&from, this);
+void FloatValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<FloatValue*>(&to_msg);
+ auto& from = static_cast<const FloatValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FloatValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
@@ -592,9 +615,9 @@ void FloatValue::MergeFrom(const FloatValue& from) {
arc_ui32 raw_value;
memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
if (raw_value != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FloatValue::CopyFrom(const FloatValue& from) {
@@ -611,7 +634,7 @@ bool FloatValue::IsInitialized() const {
void FloatValue::InternalSwap(FloatValue* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FloatValue::GetMetadata() const {
@@ -629,18 +652,29 @@ class Int64Value::_Internal {
Int64Value::Int64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Int64Value)
}
Int64Value::Int64Value(const Int64Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Int64Value* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value)
}
-inline void Int64Value::SharedCtor() {
-value_ = arc_i64{0};
+inline void Int64Value::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){arc_i64{0}}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
Int64Value::~Int64Value() {
@@ -657,7 +691,7 @@ inline void Int64Value::SharedDtor() {
}
void Int64Value::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Int64Value::Clear() {
@@ -666,7 +700,7 @@ void Int64Value::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = arc_i64{0};
+ _impl_.value_ = arc_i64{0};
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -679,7 +713,7 @@ const char* Int64Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* ct
// int64 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -740,32 +774,28 @@ size_t Int64Value::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Int64Value::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Int64Value::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Int64Value::GetClassData() const { return &_class_data_; }
-void Int64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Int64Value *>(to)->MergeFrom(
- static_cast<const Int64Value &>(from));
-}
-
-void Int64Value::MergeFrom(const Int64Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int64Value)
- GOOGLE_DCHECK_NE(&from, this);
+void Int64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Int64Value*>(&to_msg);
+ auto& from = static_cast<const Int64Value&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int64Value)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Int64Value::CopyFrom(const Int64Value& from) {
@@ -782,7 +812,7 @@ bool Int64Value::IsInitialized() const {
void Int64Value::InternalSwap(Int64Value* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Int64Value::GetMetadata() const {
@@ -800,18 +830,29 @@ class UInt64Value::_Internal {
UInt64Value::UInt64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.UInt64Value)
}
UInt64Value::UInt64Value(const UInt64Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ UInt64Value* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value)
}
-inline void UInt64Value::SharedCtor() {
-value_ = arc_ui64{0u};
+inline void UInt64Value::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){arc_ui64{0u}}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
UInt64Value::~UInt64Value() {
@@ -828,7 +869,7 @@ inline void UInt64Value::SharedDtor() {
}
void UInt64Value::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void UInt64Value::Clear() {
@@ -837,7 +878,7 @@ void UInt64Value::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = arc_ui64{0u};
+ _impl_.value_ = arc_ui64{0u};
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -850,7 +891,7 @@ const char* UInt64Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
// uint64 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -911,32 +952,28 @@ size_t UInt64Value::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UInt64Value::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
UInt64Value::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UInt64Value::GetClassData() const { return &_class_data_; }
-void UInt64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<UInt64Value *>(to)->MergeFrom(
- static_cast<const UInt64Value &>(from));
-}
-
-void UInt64Value::MergeFrom(const UInt64Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt64Value)
- GOOGLE_DCHECK_NE(&from, this);
+void UInt64Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<UInt64Value*>(&to_msg);
+ auto& from = static_cast<const UInt64Value&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt64Value)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void UInt64Value::CopyFrom(const UInt64Value& from) {
@@ -953,7 +990,7 @@ bool UInt64Value::IsInitialized() const {
void UInt64Value::InternalSwap(UInt64Value* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata UInt64Value::GetMetadata() const {
@@ -971,18 +1008,29 @@ class Int32Value::_Internal {
Int32Value::Int32Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Int32Value)
}
Int32Value::Int32Value(const Int32Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ Int32Value* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value)
}
-inline void Int32Value::SharedCtor() {
-value_ = 0;
+inline void Int32Value::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){0}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
Int32Value::~Int32Value() {
@@ -999,7 +1047,7 @@ inline void Int32Value::SharedDtor() {
}
void Int32Value::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Int32Value::Clear() {
@@ -1008,7 +1056,7 @@ void Int32Value::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = 0;
+ _impl_.value_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1021,7 +1069,7 @@ const char* Int32Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* ct
// int32 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -1082,32 +1130,28 @@ size_t Int32Value::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Int32Value::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Int32Value::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Int32Value::GetClassData() const { return &_class_data_; }
-void Int32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Int32Value *>(to)->MergeFrom(
- static_cast<const Int32Value &>(from));
-}
-
-void Int32Value::MergeFrom(const Int32Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int32Value)
- GOOGLE_DCHECK_NE(&from, this);
+void Int32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Int32Value*>(&to_msg);
+ auto& from = static_cast<const Int32Value&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int32Value)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Int32Value::CopyFrom(const Int32Value& from) {
@@ -1124,7 +1168,7 @@ bool Int32Value::IsInitialized() const {
void Int32Value::InternalSwap(Int32Value* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Int32Value::GetMetadata() const {
@@ -1142,18 +1186,29 @@ class UInt32Value::_Internal {
UInt32Value::UInt32Value(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.UInt32Value)
}
UInt32Value::UInt32Value(const UInt32Value& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ UInt32Value* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
}
-inline void UInt32Value::SharedCtor() {
-value_ = 0u;
+inline void UInt32Value::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){0u}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
UInt32Value::~UInt32Value() {
@@ -1170,7 +1225,7 @@ inline void UInt32Value::SharedDtor() {
}
void UInt32Value::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void UInt32Value::Clear() {
@@ -1179,7 +1234,7 @@ void UInt32Value::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = 0u;
+ _impl_.value_ = 0u;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1192,7 +1247,7 @@ const char* UInt32Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
// uint32 value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -1253,32 +1308,28 @@ size_t UInt32Value::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UInt32Value::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
UInt32Value::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UInt32Value::GetClassData() const { return &_class_data_; }
-void UInt32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<UInt32Value *>(to)->MergeFrom(
- static_cast<const UInt32Value &>(from));
-}
-
-void UInt32Value::MergeFrom(const UInt32Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt32Value)
- GOOGLE_DCHECK_NE(&from, this);
+void UInt32Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<UInt32Value*>(&to_msg);
+ auto& from = static_cast<const UInt32Value&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt32Value)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void UInt32Value::CopyFrom(const UInt32Value& from) {
@@ -1295,7 +1346,7 @@ bool UInt32Value::IsInitialized() const {
void UInt32Value::InternalSwap(UInt32Value* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata UInt32Value::GetMetadata() const {
@@ -1313,18 +1364,29 @@ class BoolValue::_Internal {
BoolValue::BoolValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.BoolValue)
}
BoolValue::BoolValue(const BoolValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ BoolValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_ = from.value_;
+ _this->_impl_.value_ = from._impl_.value_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue)
}
-inline void BoolValue::SharedCtor() {
-value_ = false;
+inline void BoolValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){false}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
}
BoolValue::~BoolValue() {
@@ -1341,7 +1403,7 @@ inline void BoolValue::SharedDtor() {
}
void BoolValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void BoolValue::Clear() {
@@ -1350,7 +1412,7 @@ void BoolValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_ = false;
+ _impl_.value_ = false;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1363,7 +1425,7 @@ const char* BoolValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx
// bool value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -1424,32 +1486,28 @@ size_t BoolValue::ByteSizeLong() const {
total_size += 1 + 1;
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BoolValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
BoolValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BoolValue::GetClassData() const { return &_class_data_; }
-void BoolValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<BoolValue *>(to)->MergeFrom(
- static_cast<const BoolValue &>(from));
-}
-
-void BoolValue::MergeFrom(const BoolValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BoolValue)
- GOOGLE_DCHECK_NE(&from, this);
+void BoolValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<BoolValue*>(&to_msg);
+ auto& from = static_cast<const BoolValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BoolValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_value() != 0) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BoolValue::CopyFrom(const BoolValue& from) {
@@ -1466,7 +1524,7 @@ bool BoolValue::IsInitialized() const {
void BoolValue::InternalSwap(BoolValue* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(value_, other->value_);
+ swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BoolValue::GetMetadata() const {
@@ -1484,28 +1542,40 @@ class StringValue::_Internal {
StringValue::StringValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.StringValue)
}
StringValue::StringValue(const StringValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ StringValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_.InitDefault();
+ _impl_.value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set("", GetArenaForAllocation());
+ _impl_.value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_value().empty()) {
- value_.Set(from._internal_value(),
- GetArenaForAllocation());
+ _this->_impl_.value_.Set(from._internal_value(),
+ _this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue)
}
-inline void StringValue::SharedCtor() {
-value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+inline void StringValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
StringValue::~StringValue() {
@@ -1519,11 +1589,11 @@ StringValue::~StringValue() {
inline void StringValue::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- value_.Destroy();
+ _impl_.value_.Destroy();
}
void StringValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void StringValue::Clear() {
@@ -1532,7 +1602,7 @@ void StringValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_.ClearToEmpty();
+ _impl_.value_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1614,32 +1684,28 @@ size_t StringValue::ByteSizeLong() const {
this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StringValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
StringValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StringValue::GetClassData() const { return &_class_data_; }
-void StringValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<StringValue *>(to)->MergeFrom(
- static_cast<const StringValue &>(from));
-}
-
-void StringValue::MergeFrom(const StringValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.StringValue)
- GOOGLE_DCHECK_NE(&from, this);
+void StringValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<StringValue*>(&to_msg);
+ auto& from = static_cast<const StringValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.StringValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_value().empty()) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void StringValue::CopyFrom(const StringValue& from) {
@@ -1659,8 +1725,8 @@ void StringValue::InternalSwap(StringValue* other) {
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &value_, lhs_arena,
- &other->value_, rhs_arena
+ &_impl_.value_, lhs_arena,
+ &other->_impl_.value_, rhs_arena
);
}
@@ -1679,28 +1745,40 @@ class BytesValue::_Internal {
BytesValue::BytesValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.BytesValue)
}
BytesValue::BytesValue(const BytesValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
+ BytesValue* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- value_.InitDefault();
+ _impl_.value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set("", GetArenaForAllocation());
+ _impl_.value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_value().empty()) {
- value_.Set(from._internal_value(),
- GetArenaForAllocation());
+ _this->_impl_.value_.Set(from._internal_value(),
+ _this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue)
}
-inline void BytesValue::SharedCtor() {
-value_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+inline void BytesValue::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_.value_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ };
+ _impl_.value_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.value_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
BytesValue::~BytesValue() {
@@ -1714,11 +1792,11 @@ BytesValue::~BytesValue() {
inline void BytesValue::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- value_.Destroy();
+ _impl_.value_.Destroy();
}
void BytesValue::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void BytesValue::Clear() {
@@ -1727,7 +1805,7 @@ void BytesValue::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- value_.ClearToEmpty();
+ _impl_.value_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1804,32 +1882,28 @@ size_t BytesValue::ByteSizeLong() const {
this->_internal_value());
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BytesValue::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
BytesValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BytesValue::GetClassData() const { return &_class_data_; }
-void BytesValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<BytesValue *>(to)->MergeFrom(
- static_cast<const BytesValue &>(from));
-}
-
-void BytesValue::MergeFrom(const BytesValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BytesValue)
- GOOGLE_DCHECK_NE(&from, this);
+void BytesValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<BytesValue*>(&to_msg);
+ auto& from = static_cast<const BytesValue&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BytesValue)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_value().empty()) {
- _internal_set_value(from._internal_value());
+ _this->_internal_set_value(from._internal_value());
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BytesValue::CopyFrom(const BytesValue& from) {
@@ -1849,8 +1923,8 @@ void BytesValue::InternalSwap(BytesValue* other) {
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &value_, lhs_arena,
- &other->value_, rhs_arena
+ &_impl_.value_, lhs_arena,
+ &other->_impl_.value_, rhs_arena
);
}
diff --git a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h
index 82b7a0af56..422c20bf53 100644
--- a/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h
+++ b/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -168,9 +168,11 @@ class PROTOBUF_EXPORT DoubleValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const DoubleValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const DoubleValue& from);
+ void MergeFrom( const DoubleValue& from) {
+ DoubleValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -179,10 +181,10 @@ class PROTOBUF_EXPORT DoubleValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(DoubleValue* other);
@@ -225,8 +227,11 @@ class PROTOBUF_EXPORT DoubleValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- double value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ double value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -311,9 +316,11 @@ class PROTOBUF_EXPORT FloatValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const FloatValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const FloatValue& from);
+ void MergeFrom( const FloatValue& from) {
+ FloatValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -322,10 +329,10 @@ class PROTOBUF_EXPORT FloatValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(FloatValue* other);
@@ -368,8 +375,11 @@ class PROTOBUF_EXPORT FloatValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- float value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ float value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -454,9 +464,11 @@ class PROTOBUF_EXPORT Int64Value final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Int64Value& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Int64Value& from);
+ void MergeFrom( const Int64Value& from) {
+ Int64Value::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -465,10 +477,10 @@ class PROTOBUF_EXPORT Int64Value final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Int64Value* other);
@@ -511,8 +523,11 @@ class PROTOBUF_EXPORT Int64Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- arc_i64 value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ arc_i64 value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -597,9 +612,11 @@ class PROTOBUF_EXPORT UInt64Value final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const UInt64Value& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const UInt64Value& from);
+ void MergeFrom( const UInt64Value& from) {
+ UInt64Value::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -608,10 +625,10 @@ class PROTOBUF_EXPORT UInt64Value final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(UInt64Value* other);
@@ -654,8 +671,11 @@ class PROTOBUF_EXPORT UInt64Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- arc_ui64 value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ arc_ui64 value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -740,9 +760,11 @@ class PROTOBUF_EXPORT Int32Value final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Int32Value& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Int32Value& from);
+ void MergeFrom( const Int32Value& from) {
+ Int32Value::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -751,10 +773,10 @@ class PROTOBUF_EXPORT Int32Value final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Int32Value* other);
@@ -797,8 +819,11 @@ class PROTOBUF_EXPORT Int32Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- arc_i32 value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ arc_i32 value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -883,9 +908,11 @@ class PROTOBUF_EXPORT UInt32Value final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const UInt32Value& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const UInt32Value& from);
+ void MergeFrom( const UInt32Value& from) {
+ UInt32Value::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -894,10 +921,10 @@ class PROTOBUF_EXPORT UInt32Value final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(UInt32Value* other);
@@ -940,8 +967,11 @@ class PROTOBUF_EXPORT UInt32Value final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- arc_ui32 value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ arc_ui32 value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -1026,9 +1056,11 @@ class PROTOBUF_EXPORT BoolValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const BoolValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const BoolValue& from);
+ void MergeFrom( const BoolValue& from) {
+ BoolValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1037,10 +1069,10 @@ class PROTOBUF_EXPORT BoolValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(BoolValue* other);
@@ -1083,8 +1115,11 @@ class PROTOBUF_EXPORT BoolValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- bool value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ bool value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -1169,9 +1204,11 @@ class PROTOBUF_EXPORT StringValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const StringValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const StringValue& from);
+ void MergeFrom( const StringValue& from) {
+ StringValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1180,10 +1217,10 @@ class PROTOBUF_EXPORT StringValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(StringValue* other);
@@ -1231,8 +1268,11 @@ class PROTOBUF_EXPORT StringValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// -------------------------------------------------------------------
@@ -1317,9 +1357,11 @@ class PROTOBUF_EXPORT BytesValue final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const BytesValue& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const BytesValue& from);
+ void MergeFrom( const BytesValue& from) {
+ BytesValue::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -1328,10 +1370,10 @@ class PROTOBUF_EXPORT BytesValue final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(BytesValue* other);
@@ -1379,8 +1421,11 @@ class PROTOBUF_EXPORT BytesValue final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;
};
// ===================================================================
@@ -1396,10 +1441,10 @@ class PROTOBUF_EXPORT BytesValue final :
// double value = 1;
inline void DoubleValue::clear_value() {
- value_ = 0;
+ _impl_.value_ = 0;
}
inline double DoubleValue::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline double DoubleValue::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.DoubleValue.value)
@@ -1407,7 +1452,7 @@ inline double DoubleValue::value() const {
}
inline void DoubleValue::_internal_set_value(double value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void DoubleValue::set_value(double value) {
_internal_set_value(value);
@@ -1420,10 +1465,10 @@ inline void DoubleValue::set_value(double value) {
// float value = 1;
inline void FloatValue::clear_value() {
- value_ = 0;
+ _impl_.value_ = 0;
}
inline float FloatValue::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline float FloatValue::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.FloatValue.value)
@@ -1431,7 +1476,7 @@ inline float FloatValue::value() const {
}
inline void FloatValue::_internal_set_value(float value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void FloatValue::set_value(float value) {
_internal_set_value(value);
@@ -1444,10 +1489,10 @@ inline void FloatValue::set_value(float value) {
// int64 value = 1;
inline void Int64Value::clear_value() {
- value_ = arc_i64{0};
+ _impl_.value_ = arc_i64{0};
}
inline arc_i64 Int64Value::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline arc_i64 Int64Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Int64Value.value)
@@ -1455,7 +1500,7 @@ inline arc_i64 Int64Value::value() const {
}
inline void Int64Value::_internal_set_value(arc_i64 value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void Int64Value::set_value(arc_i64 value) {
_internal_set_value(value);
@@ -1468,10 +1513,10 @@ inline void Int64Value::set_value(arc_i64 value) {
// uint64 value = 1;
inline void UInt64Value::clear_value() {
- value_ = arc_ui64{0u};
+ _impl_.value_ = arc_ui64{0u};
}
inline arc_ui64 UInt64Value::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline arc_ui64 UInt64Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UInt64Value.value)
@@ -1479,7 +1524,7 @@ inline arc_ui64 UInt64Value::value() const {
}
inline void UInt64Value::_internal_set_value(arc_ui64 value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void UInt64Value::set_value(arc_ui64 value) {
_internal_set_value(value);
@@ -1492,10 +1537,10 @@ inline void UInt64Value::set_value(arc_ui64 value) {
// int32 value = 1;
inline void Int32Value::clear_value() {
- value_ = 0;
+ _impl_.value_ = 0;
}
inline arc_i32 Int32Value::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline arc_i32 Int32Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.Int32Value.value)
@@ -1503,7 +1548,7 @@ inline arc_i32 Int32Value::value() const {
}
inline void Int32Value::_internal_set_value(arc_i32 value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void Int32Value::set_value(arc_i32 value) {
_internal_set_value(value);
@@ -1516,10 +1561,10 @@ inline void Int32Value::set_value(arc_i32 value) {
// uint32 value = 1;
inline void UInt32Value::clear_value() {
- value_ = 0u;
+ _impl_.value_ = 0u;
}
inline arc_ui32 UInt32Value::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline arc_ui32 UInt32Value::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.UInt32Value.value)
@@ -1527,7 +1572,7 @@ inline arc_ui32 UInt32Value::value() const {
}
inline void UInt32Value::_internal_set_value(arc_ui32 value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void UInt32Value::set_value(arc_ui32 value) {
_internal_set_value(value);
@@ -1540,10 +1585,10 @@ inline void UInt32Value::set_value(arc_ui32 value) {
// bool value = 1;
inline void BoolValue::clear_value() {
- value_ = false;
+ _impl_.value_ = false;
}
inline bool BoolValue::_internal_value() const {
- return value_;
+ return _impl_.value_;
}
inline bool BoolValue::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.BoolValue.value)
@@ -1551,7 +1596,7 @@ inline bool BoolValue::value() const {
}
inline void BoolValue::_internal_set_value(bool value) {
- value_ = value;
+ _impl_.value_ = value;
}
inline void BoolValue::set_value(bool value) {
_internal_set_value(value);
@@ -1564,7 +1609,7 @@ inline void BoolValue::set_value(bool value) {
// string value = 1;
inline void StringValue::clear_value() {
- value_.ClearToEmpty();
+ _impl_.value_.ClearToEmpty();
}
inline const TProtoStringType& StringValue::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.StringValue.value)
@@ -1574,7 +1619,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void StringValue::set_value(ArgT0&& arg0, ArgT... args) {
- value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.value_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.StringValue.value)
}
inline TProtoStringType* StringValue::mutable_value() {
@@ -1583,19 +1628,19 @@ inline TProtoStringType* StringValue::mutable_value() {
return _s;
}
inline const TProtoStringType& StringValue::_internal_value() const {
- return value_.Get();
+ return _impl_.value_.Get();
}
inline void StringValue::_internal_set_value(const TProtoStringType& value) {
- value_.Set(value, GetArenaForAllocation());
+ _impl_.value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* StringValue::_internal_mutable_value() {
- return value_.Mutable(GetArenaForAllocation());
+ return _impl_.value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* StringValue::release_value() {
// @@protoc_insertion_point(field_release:google.protobuf.StringValue.value)
- return value_.Release();
+ return _impl_.value_.Release();
}
inline void StringValue::set_allocated_value(TProtoStringType* value) {
if (value != nullptr) {
@@ -1603,10 +1648,10 @@ inline void StringValue::set_allocated_value(TProtoStringType* value) {
} else {
}
- value_.SetAllocated(value, GetArenaForAllocation());
+ _impl_.value_.SetAllocated(value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (value_.IsDefault()) {
- value_.Set("", GetArenaForAllocation());
+ if (_impl_.value_.IsDefault()) {
+ _impl_.value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.StringValue.value)
@@ -1618,7 +1663,7 @@ inline void StringValue::set_allocated_value(TProtoStringType* value) {
// bytes value = 1;
inline void BytesValue::clear_value() {
- value_.ClearToEmpty();
+ _impl_.value_.ClearToEmpty();
}
inline const TProtoStringType& BytesValue::value() const {
// @@protoc_insertion_point(field_get:google.protobuf.BytesValue.value)
@@ -1628,7 +1673,7 @@ template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void BytesValue::set_value(ArgT0&& arg0, ArgT... args) {
- value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_.value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.BytesValue.value)
}
inline TProtoStringType* BytesValue::mutable_value() {
@@ -1637,19 +1682,19 @@ inline TProtoStringType* BytesValue::mutable_value() {
return _s;
}
inline const TProtoStringType& BytesValue::_internal_value() const {
- return value_.Get();
+ return _impl_.value_.Get();
}
inline void BytesValue::_internal_set_value(const TProtoStringType& value) {
- value_.Set(value, GetArenaForAllocation());
+ _impl_.value_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* BytesValue::_internal_mutable_value() {
- return value_.Mutable(GetArenaForAllocation());
+ return _impl_.value_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* BytesValue::release_value() {
// @@protoc_insertion_point(field_release:google.protobuf.BytesValue.value)
- return value_.Release();
+ return _impl_.value_.Release();
}
inline void BytesValue::set_allocated_value(TProtoStringType* value) {
if (value != nullptr) {
@@ -1657,10 +1702,10 @@ inline void BytesValue::set_allocated_value(TProtoStringType* value) {
} else {
}
- value_.SetAllocated(value, GetArenaForAllocation());
+ _impl_.value_.SetAllocated(value, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (value_.IsDefault()) {
- value_.Set("", GetArenaForAllocation());
+ if (_impl_.value_.IsDefault()) {
+ _impl_.value_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.BytesValue.value)
diff --git a/contrib/libs/protobuf/ya.make b/contrib/libs/protobuf/ya.make
index 8307c41a16..ec90ec4cd6 100644
--- a/contrib/libs/protobuf/ya.make
+++ b/contrib/libs/protobuf/ya.make
@@ -11,9 +11,9 @@ LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
PROVIDES(protobuf)
-VERSION(3.20.2)
+VERSION(3.21.3)
-ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.20.2.tar.gz)
+ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.21.3.tar.gz)
IF (OPENSOURCE_REPLACE_PROTOBUF AND EXPORT_CMAKE)
OPENSOURCE_EXPORT_REPLACEMENT(
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/code_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/code_generator.h
index 81f0ea748e..2bbd80d650 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/code_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/code_generator.h
@@ -189,9 +189,9 @@ typedef GeneratorContext OutputDirectory;
// Several code generators treat the parameter argument as holding a
// list of options separated by commas. This helper function parses
// a set of comma-delimited name/value pairs: e.g.,
-// "foo=bar,baz,qux=corge"
+// "foo=bar,baz,moo=corge"
// parses to the pairs:
-// ("foo", "bar"), ("baz", ""), ("qux", "corge")
+// ("foo", "bar"), ("baz", ""), ("moo", "corge")
PROTOC_EXPORT void ParseGeneratorParameter(
const TProtoStringType&, std::vector<std::pair<TProtoStringType, TProtoStringType> >*);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/command_line_interface.cc b/contrib/libs/protoc/src/google/protobuf/compiler/command_line_interface.cc
index e1cbfee896..3de6dc2f6d 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/command_line_interface.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/command_line_interface.cc
@@ -34,8 +34,6 @@
#include <google/protobuf/compiler/command_line_interface.h>
-#include <cstdint>
-
#include <google/protobuf/stubs/platform_macros.h>
#include <stdio.h>
@@ -70,20 +68,20 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/compiler/subprocess.h>
-#include <google/protobuf/compiler/zip_writer.h>
#include <google/protobuf/compiler/plugin.pb.h>
+#include <google/protobuf/stubs/strutil.h>
+#include <google/protobuf/stubs/stringprintf.h>
+#include <google/protobuf/stubs/substitute.h>
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/importer.h>
+#include <google/protobuf/compiler/zip_writer.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/dynamic_message.h>
#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/io/io_win32.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/dynamic_message.h>
#include <google/protobuf/text_format.h>
-#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/stubs/stringprintf.h>
-#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/io/io_win32.h>
#include <google/protobuf/stubs/map_util.h>
#include <google/protobuf/stubs/stl_util.h>
@@ -2251,6 +2249,10 @@ bool CommandLineInterface::GenerateDependencyManifestFile(
}
}
+ if (!descriptor_set_out_name_.empty()) {
+ output_filenames.push_back(descriptor_set_out_name_);
+ }
+
int fd;
do {
fd = open(dependency_out_name_.c_str(),
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.h
index f7735da12f..fe2ff1369a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.h
@@ -1,1026 +1 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-
-#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__
-#define GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__
-
-#include <algorithm>
-#include <cstdint>
-#include <iterator>
-#include <map>
-#include <string>
-
-#include <google/protobuf/compiler/scc.h>
-#include <google/protobuf/compiler/code_generator.h>
-#include <google/protobuf/compiler/cpp/cpp_names.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
-#include <google/protobuf/descriptor.pb.h>
-#include <google/protobuf/io/printer.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/port.h>
-#include <google/protobuf/stubs/strutil.h>
-
-// Must be included last.
-#include <google/protobuf/port_def.inc>
-
-namespace google {
-namespace protobuf {
-namespace compiler {
-namespace cpp {
-
-enum class ArenaDtorNeeds { kNone = 0, kOnDemand = 1, kRequired = 2 };
-
-inline TProtoStringType ProtobufNamespace(const Options& /* options */) {
- return "PROTOBUF_NAMESPACE_ID";
-}
-
-inline TProtoStringType MacroPrefix(const Options& /* options */) {
- return "GOOGLE_PROTOBUF";
-}
-
-inline TProtoStringType DeprecatedAttribute(const Options& /* options */,
- const FieldDescriptor* d) {
- return d->options().deprecated() ? "PROTOBUF_DEPRECATED " : "";
-}
-
-inline TProtoStringType DeprecatedAttribute(const Options& /* options */,
- const EnumValueDescriptor* d) {
- return d->options().deprecated() ? "PROTOBUF_DEPRECATED_ENUM " : "";
-}
-
-// Commonly-used separator comments. Thick is a line of '=', thin is a line
-// of '-'.
-extern const char kThickSeparator[];
-extern const char kThinSeparator[];
-
-void SetCommonVars(const Options& options,
- std::map<TProtoStringType, TProtoStringType>* variables);
-
-// Variables to access message data from the message scope.
-void SetCommonMessageDataVariables(
- std::map<TProtoStringType, TProtoStringType>* variables);
-
-void SetUnknownFieldsVariable(const Descriptor* descriptor,
- const Options& options,
- std::map<TProtoStringType, TProtoStringType>* variables);
-
-bool GetBootstrapBasename(const Options& options, const TProtoStringType& basename,
- TProtoStringType* bootstrap_basename);
-bool MaybeBootstrap(const Options& options, GeneratorContext* generator_context,
- bool bootstrap_flag, TProtoStringType* basename);
-bool IsBootstrapProto(const Options& options, const FileDescriptor* file);
-
-// Name space of the proto file. This namespace is such that the string
-// "<namespace>::some_name" is the correct fully qualified namespace.
-// This means if the package is empty the namespace is "", and otherwise
-// the namespace is "::foo::bar::...::baz" without trailing semi-colons.
-TProtoStringType Namespace(const FileDescriptor* d, const Options& options);
-TProtoStringType Namespace(const Descriptor* d, const Options& options);
-TProtoStringType Namespace(const FieldDescriptor* d, const Options& options);
-TProtoStringType Namespace(const EnumDescriptor* d, const Options& options);
-
-// Returns true if it's safe to reset "field" to zero.
-bool CanInitializeByZeroing(const FieldDescriptor* field);
-
-TProtoStringType ClassName(const Descriptor* descriptor);
-TProtoStringType ClassName(const EnumDescriptor* enum_descriptor);
-
-TProtoStringType QualifiedClassName(const Descriptor* d, const Options& options);
-TProtoStringType QualifiedClassName(const EnumDescriptor* d, const Options& options);
-
-TProtoStringType QualifiedClassName(const Descriptor* d);
-TProtoStringType QualifiedClassName(const EnumDescriptor* d);
-
-// DEPRECATED just use ClassName or QualifiedClassName, a boolean is very
-// unreadable at the callsite.
-// Returns the non-nested type name for the given type. If "qualified" is
-// true, prefix the type with the full namespace. For example, if you had:
-// package foo.bar;
-// message Baz { message Qux {} }
-// Then the qualified ClassName for Qux would be:
-// ::foo::bar::Baz_Qux
-// While the non-qualified version would be:
-// Baz_Qux
-inline TProtoStringType ClassName(const Descriptor* descriptor, bool qualified) {
- return qualified ? QualifiedClassName(descriptor, Options())
- : ClassName(descriptor);
-}
-
-inline TProtoStringType ClassName(const EnumDescriptor* descriptor, bool qualified) {
- return qualified ? QualifiedClassName(descriptor, Options())
- : ClassName(descriptor);
-}
-
-// Returns the extension name prefixed with the class name if nested but without
-// the package name.
-TProtoStringType ExtensionName(const FieldDescriptor* d);
-
-TProtoStringType QualifiedExtensionName(const FieldDescriptor* d,
- const Options& options);
-TProtoStringType QualifiedExtensionName(const FieldDescriptor* d);
-
-// Type name of default instance.
-TProtoStringType DefaultInstanceType(const Descriptor* descriptor,
- const Options& options);
-
-// Non-qualified name of the default_instance of this message.
-TProtoStringType DefaultInstanceName(const Descriptor* descriptor,
- const Options& options);
-
-// Non-qualified name of the default instance pointer. This is used only for
-// implicit weak fields, where we need an extra indirection.
-TProtoStringType DefaultInstancePtr(const Descriptor* descriptor,
- const Options& options);
-
-// Fully qualified name of the default_instance of this message.
-TProtoStringType QualifiedDefaultInstanceName(const Descriptor* descriptor,
- const Options& options);
-
-// Fully qualified name of the default instance pointer.
-TProtoStringType QualifiedDefaultInstancePtr(const Descriptor* descriptor,
- const Options& options);
-
-// DescriptorTable variable name.
-TProtoStringType DescriptorTableName(const FileDescriptor* file,
- const Options& options);
-
-// When declaring symbol externs from another file, this macro will supply the
-// dllexport needed for the target file, if any.
-TProtoStringType FileDllExport(const FileDescriptor* file, const Options& options);
-
-// Name of the base class: google::protobuf::Message or google::protobuf::MessageLite.
-TProtoStringType SuperClassName(const Descriptor* descriptor,
- const Options& options);
-
-// Adds an underscore if necessary to prevent conflicting with a keyword.
-TProtoStringType ResolveKeyword(const TProtoStringType& name);
-
-// Get the (unqualified) name that should be used for this field in C++ code.
-// The name is coerced to lower-case to emulate proto1 behavior. People
-// should be using lowercase-with-underscores style for proto field names
-// anyway, so normally this just returns field->name().
-TProtoStringType FieldName(const FieldDescriptor* field);
-
-// Returns the (unqualified) private member name for this field in C++ code.
-TProtoStringType FieldMemberName(const FieldDescriptor* field);
-
-// Returns an estimate of the compiler's alignment for the field. This
-// can't guarantee to be correct because the generated code could be compiled on
-// different systems with different alignment rules. The estimates below assume
-// 64-bit pointers.
-int EstimateAlignmentSize(const FieldDescriptor* field);
-
-// Get the unqualified name that should be used for a field's field
-// number constant.
-TProtoStringType FieldConstantName(const FieldDescriptor* field);
-
-// Returns the scope where the field was defined (for extensions, this is
-// different from the message type to which the field applies).
-inline const Descriptor* FieldScope(const FieldDescriptor* field) {
- return field->is_extension() ? field->extension_scope()
- : field->containing_type();
-}
-
-// Returns the fully-qualified type name field->message_type(). Usually this
-// is just ClassName(field->message_type(), true);
-TProtoStringType FieldMessageTypeName(const FieldDescriptor* field,
- const Options& options);
-
-// Get the C++ type name for a primitive type (e.g. "double", "::google::protobuf::int32", etc.).
-const char* PrimitiveTypeName(FieldDescriptor::CppType type);
-TProtoStringType PrimitiveTypeName(const Options& options,
- FieldDescriptor::CppType type);
-
-// Get the declared type name in CamelCase format, as is used e.g. for the
-// methods of WireFormat. For example, TYPE_INT32 becomes "Int32".
-const char* DeclaredTypeMethodName(FieldDescriptor::Type type);
-
-// Return the code that evaluates to the number when compiled.
-TProtoStringType Int32ToString(int number);
-
-// Get code that evaluates to the field's default value.
-TProtoStringType DefaultValue(const Options& options, const FieldDescriptor* field);
-
-// Compatibility function for callers outside proto2.
-TProtoStringType DefaultValue(const FieldDescriptor* field);
-
-// Convert a file name into a valid identifier.
-TProtoStringType FilenameIdentifier(const TProtoStringType& filename);
-
-// For each .proto file generates a unique name. To prevent collisions of
-// symbols in the global namespace
-TProtoStringType UniqueName(const TProtoStringType& name, const TProtoStringType& filename,
- const Options& options);
-inline TProtoStringType UniqueName(const TProtoStringType& name, const FileDescriptor* d,
- const Options& options) {
- return UniqueName(name, d->name(), options);
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name, const Descriptor* d,
- const Options& options) {
- return UniqueName(name, d->file(), options);
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name, const EnumDescriptor* d,
- const Options& options) {
- return UniqueName(name, d->file(), options);
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name,
- const ServiceDescriptor* d,
- const Options& options) {
- return UniqueName(name, d->file(), options);
-}
-
-// Versions for call sites that only support the internal runtime (like proto1
-// support).
-inline Options InternalRuntimeOptions() {
- Options options;
- options.opensource_runtime = false;
- return options;
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name,
- const TProtoStringType& filename) {
- return UniqueName(name, filename, InternalRuntimeOptions());
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name,
- const FileDescriptor* d) {
- return UniqueName(name, d->name(), InternalRuntimeOptions());
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name, const Descriptor* d) {
- return UniqueName(name, d->file(), InternalRuntimeOptions());
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name,
- const EnumDescriptor* d) {
- return UniqueName(name, d->file(), InternalRuntimeOptions());
-}
-inline TProtoStringType UniqueName(const TProtoStringType& name,
- const ServiceDescriptor* d) {
- return UniqueName(name, d->file(), InternalRuntimeOptions());
-}
-
-// Return the qualified C++ name for a file level symbol.
-TProtoStringType QualifiedFileLevelSymbol(const FileDescriptor* file,
- const TProtoStringType& name,
- const Options& options);
-
-// Escape C++ trigraphs by escaping question marks to \?
-TProtoStringType EscapeTrigraphs(const TProtoStringType& to_escape);
-
-// Escaped function name to eliminate naming conflict.
-TProtoStringType SafeFunctionName(const Descriptor* descriptor,
- const FieldDescriptor* field,
- const TProtoStringType& prefix);
-
-// Returns true if generated messages have public unknown fields accessors
-inline bool PublicUnknownFieldsAccessors(const Descriptor* message) {
- return message->file()->syntax() != FileDescriptor::SYNTAX_PROTO3;
-}
-
-// Returns the optimize mode for <file>, respecting <options.enforce_lite>.
-FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
- const Options& options);
-
-// Determines whether unknown fields will be stored in an UnknownFieldSet or
-// a string.
-inline bool UseUnknownFieldSet(const FileDescriptor* file,
- const Options& options) {
- return GetOptimizeFor(file, options) != FileOptions::LITE_RUNTIME;
-}
-
-inline bool IsWeak(const FieldDescriptor* field, const Options& options) {
- if (field->options().weak()) {
- GOOGLE_CHECK(!options.opensource_runtime);
- return true;
- }
- return false;
-}
-
-bool IsStringInlined(const FieldDescriptor* descriptor, const Options& options);
-
-// For a string field, returns the effective ctype. If the actual ctype is
-// not supported, returns the default of STRING.
-FieldOptions::CType EffectiveStringCType(const FieldDescriptor* field,
- const Options& options);
-
-inline bool IsCord(const FieldDescriptor* field, const Options& options) {
- return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING &&
- EffectiveStringCType(field, options) == FieldOptions::CORD;
-}
-
-inline bool IsString(const FieldDescriptor* field, const Options& options) {
- return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING &&
- EffectiveStringCType(field, options) == FieldOptions::STRING;
-}
-
-inline bool IsStringPiece(const FieldDescriptor* field,
- const Options& options) {
- return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING &&
- EffectiveStringCType(field, options) == FieldOptions::STRING_PIECE;
-}
-
-class MessageSCCAnalyzer;
-
-// Does the given FileDescriptor use lazy fields?
-bool HasLazyFields(const FileDescriptor* file, const Options& options,
- MessageSCCAnalyzer* scc_analyzer);
-
-// Is the given field a supported lazy field?
-bool IsLazy(const FieldDescriptor* field, const Options& options,
- MessageSCCAnalyzer* scc_analyzer);
-
-// Is this an explicit (non-profile driven) lazy field, as denoted by
-// lazy/unverified_lazy in the descriptor?
-inline bool IsExplicitLazy(const FieldDescriptor* field) {
- return field->options().lazy() || field->options().unverified_lazy();
-}
-
-inline bool IsLazilyVerifiedLazy(const FieldDescriptor* field,
- const Options& options) {
- // TODO(b/211906113): Make lazy() imply eagerly verified lazy.
- return IsExplicitLazy(field) && !field->is_repeated() &&
- field->type() == FieldDescriptor::TYPE_MESSAGE &&
- GetOptimizeFor(field->file(), options) != FileOptions::LITE_RUNTIME &&
- !options.opensource_runtime;
-}
-
-inline bool IsEagerlyVerifiedLazy(const FieldDescriptor* field,
- const Options& options,
- MessageSCCAnalyzer* scc_analyzer) {
- // TODO(b/211906113): Make lazy() imply eagerly verified lazy.
- return IsLazy(field, options, scc_analyzer) && !IsExplicitLazy(field);
-}
-
-inline bool IsFieldUsed(const FieldDescriptor* /* field */,
- const Options& /* options */) {
- return true;
-}
-
-// Returns true if "field" is stripped.
-inline bool IsFieldStripped(const FieldDescriptor* /*field*/,
- const Options& /*options*/) {
- return false;
-}
-
-// Does the file contain any definitions that need extension_set.h?
-bool HasExtensionsOrExtendableMessage(const FileDescriptor* file);
-
-// Does the file have any repeated fields, necessitating the file to include
-// repeated_field.h? This does not include repeated extensions, since those are
-// all stored internally in an ExtensionSet, not a separate RepeatedField*.
-bool HasRepeatedFields(const FileDescriptor* file);
-
-// Does the file have any string/bytes fields with ctype=STRING_PIECE? This
-// does not include extensions, since ctype is ignored for extensions.
-bool HasStringPieceFields(const FileDescriptor* file, const Options& options);
-
-// Does the file have any string/bytes fields with ctype=CORD? This does not
-// include extensions, since ctype is ignored for extensions.
-bool HasCordFields(const FileDescriptor* file, const Options& options);
-
-// Does the file have any map fields, necessitating the file to include
-// map_field_inl.h and map.h.
-bool HasMapFields(const FileDescriptor* file);
-
-// Does this file have any enum type definitions?
-bool HasEnumDefinitions(const FileDescriptor* file);
-
-// Does this file have generated parsing, serialization, and other
-// standard methods for which reflection-based fallback implementations exist?
-inline bool HasGeneratedMethods(const FileDescriptor* file,
- const Options& options) {
- return GetOptimizeFor(file, options) != FileOptions::CODE_SIZE;
-}
-
-// Do message classes in this file have descriptor and reflection methods?
-inline bool HasDescriptorMethods(const FileDescriptor* file,
- const Options& options) {
- return GetOptimizeFor(file, options) != FileOptions::LITE_RUNTIME;
-}
-
-// Should we generate generic services for this file?
-inline bool HasGenericServices(const FileDescriptor* file,
- const Options& options) {
- return file->service_count() > 0 &&
- GetOptimizeFor(file, options) != FileOptions::LITE_RUNTIME &&
- file->options().cc_generic_services();
-}
-
-inline bool IsProto2MessageSet(const Descriptor* descriptor,
- const Options& options) {
- return !options.opensource_runtime &&
- options.enforce_mode != EnforceOptimizeMode::kLiteRuntime &&
- !options.lite_implicit_weak_fields &&
- descriptor->options().message_set_wire_format() &&
- descriptor->full_name() == "google.protobuf.bridge.MessageSet";
-}
-
-inline bool IsMapEntryMessage(const Descriptor* descriptor) {
- return descriptor->options().map_entry();
-}
-
-// Returns true if the field's CPPTYPE is string or message.
-bool IsStringOrMessage(const FieldDescriptor* field);
-
-TProtoStringType UnderscoresToCamelCase(const TProtoStringType& input,
- bool cap_next_letter);
-
-inline bool IsProto3(const FileDescriptor* file) {
- return file->syntax() == FileDescriptor::SYNTAX_PROTO3;
-}
-
-inline bool HasHasbit(const FieldDescriptor* field) {
- // This predicate includes proto3 message fields only if they have "optional".
- // Foo submsg1 = 1; // HasHasbit() == false
- // optional Foo submsg2 = 2; // HasHasbit() == true
- // This is slightly odd, as adding "optional" to a singular proto3 field does
- // not change the semantics or API. However whenever any field in a message
- // has a hasbit, it forces reflection to include hasbit offsets for *all*
- // fields, even if almost all of them are set to -1 (no hasbit). So to avoid
- // causing a sudden size regression for ~all proto3 messages, we give proto3
- // message fields a hasbit only if "optional" is present. If the user is
- // explicitly writing "optional", it is likely they are writing it on
- // primitive fields also.
- return (field->has_optional_keyword() || field->is_required()) &&
- !field->options().weak();
-}
-
-// Returns true if 'enum' semantics are such that unknown values are preserved
-// in the enum field itself, rather than going to the UnknownFieldSet.
-inline bool HasPreservingUnknownEnumSemantics(const FieldDescriptor* field) {
- return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3;
-}
-
-inline bool IsCrossFileMessage(const FieldDescriptor* field) {
- return field->type() == FieldDescriptor::TYPE_MESSAGE &&
- field->message_type()->file() != field->file();
-}
-
-inline TProtoStringType MakeDefaultName(const FieldDescriptor* field) {
- return "_i_give_permission_to_break_this_code_default_" + FieldName(field) +
- "_";
-}
-
-// Semantically distinct from MakeDefaultName in that it gives the C++ code
-// referencing a default field from the message scope, rather than just the
-// variable name.
-// For example, declarations of default variables should always use just
-// MakeDefaultName to produce code like:
-// Type _i_give_permission_to_break_this_code_default_field_;
-//
-// Code that references these should use MakeDefaultFieldName, in case the field
-// exists at some nested level like:
-// internal_container_._i_give_permission_to_break_this_code_default_field_;
-inline TProtoStringType MakeDefaultFieldName(const FieldDescriptor* field) {
- return MakeDefaultName(field);
-}
-
-inline TProtoStringType MakeVarintCachedSizeName(const FieldDescriptor* field) {
- return StrCat("_", FieldName(field), "_cached_byte_size_");
-}
-
-// Semantically distinct from MakeVarintCachedSizeName in that it gives the C++
-// code referencing the object from the message scope, rather than just the
-// variable name.
-// For example, declarations of default variables should always use just
-// MakeVarintCachedSizeName to produce code like:
-// Type _field_cached_byte_size_;
-//
-// Code that references these variables should use
-// MakeVarintCachedSizeFieldName, in case the field exists at some nested level
-// like:
-// internal_container_._field_cached_byte_size_;
-inline TProtoStringType MakeVarintCachedSizeFieldName(const FieldDescriptor* field) {
- return StrCat("_", FieldName(field), "_cached_byte_size_");
-}
-
-// Note: A lot of libraries detect Any protos based on Descriptor::full_name()
-// while the two functions below use FileDescriptor::name(). In a sane world the
-// two approaches should be equivalent. But if you are dealing with descriptors
-// from untrusted sources, you might need to match semantics across libraries.
-bool IsAnyMessage(const FileDescriptor* descriptor, const Options& options);
-bool IsAnyMessage(const Descriptor* descriptor, const Options& options);
-
-bool IsWellKnownMessage(const FileDescriptor* descriptor);
-
-inline TProtoStringType IncludeGuard(const FileDescriptor* file, bool pb_h,
- bool deps,
- const Options& options) {
- // If we are generating a .pb.h file and the proto_h option is enabled, then
- // the .pb.h gets an extra suffix.
- TProtoStringType filename_identifier = FilenameIdentifier(
- file->name() + (deps ? ".deps": "") + (pb_h && options.proto_h ? ".pb.h" : ""));
-
- if (IsWellKnownMessage(file)) {
- // For well-known messages we need third_party/protobuf and net/proto2 to
- // have distinct include guards, because some source files include both and
- // both need to be defined (the third_party copies will be in the
- // google::protobuf_opensource namespace).
- return MacroPrefix(options) + "_INCLUDED_" + filename_identifier;
- } else {
- // Ideally this case would use distinct include guards for opensource and
- // google3 protos also. (The behavior of "first #included wins" is not
- // ideal). But unfortunately some legacy code includes both and depends on
- // the identical include guards to avoid compile errors.
- //
- // We should clean this up so that this case can be removed.
- return "GOOGLE_PROTOBUF_INCLUDED_" + filename_identifier;
- }
-}
-
-// Returns the OptimizeMode for this file, furthermore it updates a status
-// bool if has_opt_codesize_extension is non-null. If this status bool is true
-// it means this file contains an extension that itself is defined as
-// optimized_for = CODE_SIZE.
-FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
- const Options& options,
- bool* has_opt_codesize_extension);
-inline FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
- const Options& options) {
- return GetOptimizeFor(file, options, nullptr);
-}
-inline bool NeedsEagerDescriptorAssignment(const FileDescriptor* file,
- const Options& options) {
- bool has_opt_codesize_extension;
- if (GetOptimizeFor(file, options, &has_opt_codesize_extension) ==
- FileOptions::CODE_SIZE &&
- has_opt_codesize_extension) {
- // If this filedescriptor contains an extension from another file which
- // is optimized_for = CODE_SIZE. We need to be careful in the ordering so
- // we eagerly build the descriptors in the dependencies before building
- // the descriptors of this file.
- return true;
- } else {
- // If we have a generated code based parser we never need eager
- // initialization of descriptors of our deps.
- return false;
- }
-}
-
-// This orders the messages in a .pb.cc as it's outputted by file.cc
-void FlattenMessagesInFile(const FileDescriptor* file,
- std::vector<const Descriptor*>* result);
-inline std::vector<const Descriptor*> FlattenMessagesInFile(
- const FileDescriptor* file) {
- std::vector<const Descriptor*> result;
- FlattenMessagesInFile(file, &result);
- return result;
-}
-
-template <typename F>
-void ForEachMessage(const Descriptor* descriptor, F&& func) {
- for (int i = 0; i < descriptor->nested_type_count(); i++)
- ForEachMessage(descriptor->nested_type(i), std::forward<F&&>(func));
- func(descriptor);
-}
-
-template <typename F>
-void ForEachMessage(const FileDescriptor* descriptor, F&& func) {
- for (int i = 0; i < descriptor->message_type_count(); i++)
- ForEachMessage(descriptor->message_type(i), std::forward<F&&>(func));
-}
-
-bool HasWeakFields(const Descriptor* desc, const Options& options);
-bool HasWeakFields(const FileDescriptor* desc, const Options& options);
-
-// Returns true if the "required" restriction check should be ignored for the
-// given field.
-inline static bool ShouldIgnoreRequiredFieldCheck(const FieldDescriptor* field,
- const Options& options) {
- // Do not check "required" for lazily verified lazy fields.
- return IsLazilyVerifiedLazy(field, options);
-}
-
-struct MessageAnalysis {
- bool is_recursive = false;
- bool contains_cord = false;
- bool contains_extension = false;
- bool contains_required = false;
- bool contains_weak = false; // Implicit weak as well.
-};
-
-// This class is used in FileGenerator, to ensure linear instead of
-// quadratic performance, if we do this per message we would get O(V*(V+E)).
-// Logically this is just only used in message.cc, but in the header for
-// FileGenerator to help share it.
-class PROTOC_EXPORT MessageSCCAnalyzer {
- public:
- explicit MessageSCCAnalyzer(const Options& options) : options_(options) {}
-
- MessageAnalysis GetSCCAnalysis(const SCC* scc);
-
- bool HasRequiredFields(const Descriptor* descriptor) {
- MessageAnalysis result = GetSCCAnalysis(GetSCC(descriptor));
- return result.contains_required || result.contains_extension;
- }
- bool HasWeakField(const Descriptor* descriptor) {
- MessageAnalysis result = GetSCCAnalysis(GetSCC(descriptor));
- return result.contains_weak;
- }
- const SCC* GetSCC(const Descriptor* descriptor) {
- return analyzer_.GetSCC(descriptor);
- }
-
- private:
- struct DepsGenerator {
- std::vector<const Descriptor*> operator()(const Descriptor* desc) const {
- std::vector<const Descriptor*> deps;
- for (int i = 0; i < desc->field_count(); i++) {
- if (desc->field(i)->message_type()) {
- deps.push_back(desc->field(i)->message_type());
- }
- }
- return deps;
- }
- };
- SCCAnalyzer<DepsGenerator> analyzer_;
- Options options_;
- std::map<const SCC*, MessageAnalysis> analysis_cache_;
-};
-
-void ListAllFields(const Descriptor* d,
- std::vector<const FieldDescriptor*>* fields);
-void ListAllFields(const FileDescriptor* d,
- std::vector<const FieldDescriptor*>* fields);
-
-template <class T>
-void ForEachField(const Descriptor* d, T&& func) {
- for (int i = 0; i < d->nested_type_count(); i++) {
- ForEachField(d->nested_type(i), std::forward<T&&>(func));
- }
- for (int i = 0; i < d->extension_count(); i++) {
- func(d->extension(i));
- }
- for (int i = 0; i < d->field_count(); i++) {
- func(d->field(i));
- }
-}
-
-template <class T>
-void ForEachField(const FileDescriptor* d, T&& func) {
- for (int i = 0; i < d->message_type_count(); i++) {
- ForEachField(d->message_type(i), std::forward<T&&>(func));
- }
- for (int i = 0; i < d->extension_count(); i++) {
- func(d->extension(i));
- }
-}
-
-void ListAllTypesForServices(const FileDescriptor* fd,
- std::vector<const Descriptor*>* types);
-
-// Indicates whether we should use implicit weak fields for this file.
-bool UsingImplicitWeakFields(const FileDescriptor* file,
- const Options& options);
-
-// Indicates whether to treat this field as implicitly weak.
-bool IsImplicitWeakField(const FieldDescriptor* field, const Options& options,
- MessageSCCAnalyzer* scc_analyzer);
-
-inline bool HasSimpleBaseClass(const Descriptor* desc, const Options& options) {
- if (!HasDescriptorMethods(desc->file(), options)) return false;
- if (desc->extension_range_count() != 0) return false;
- if (desc->field_count() == 0) return true;
- // TODO(jorg): Support additional common message types with only one
- // or two fields
- return false;
-}
-
-inline bool HasSimpleBaseClasses(const FileDescriptor* file,
- const Options& options) {
- bool v = false;
- ForEachMessage(file, [&v, &options](const Descriptor* desc) {
- v |= HasSimpleBaseClass(desc, options);
- });
- return v;
-}
-
-inline TProtoStringType SimpleBaseClass(const Descriptor* desc,
- const Options& options) {
- if (!HasDescriptorMethods(desc->file(), options)) return "";
- if (desc->extension_range_count() != 0) return "";
- if (desc->field_count() == 0) {
- return "ZeroFieldsBase";
- }
- // TODO(jorg): Support additional common message types with only one
- // or two fields
- return "";
-}
-
-// Formatter is a functor class which acts as a closure around printer and
-// the variable map. It's much like printer->Print except it supports both named
-// variables that are substituted using a key value map and direct arguments. In
-// the format string $1$, $2$, etc... are substituted for the first, second, ...
-// direct argument respectively in the format call, it accepts both strings and
-// integers. The implementation verifies all arguments are used and are "first"
-// used in order of appearance in the argument list. For example,
-//
-// Format("return array[$1$];", 3) -> "return array[3];"
-// Format("array[$2$] = $1$;", "Bla", 3) -> FATAL error (wrong order)
-// Format("array[$1$] = $2$;", 3, "Bla") -> "array[3] = Bla;"
-//
-// The arguments can be used more than once like
-//
-// Format("array[$1$] = $2$; // Index = $1$", 3, "Bla") ->
-// "array[3] = Bla; // Index = 3"
-//
-// If you use more arguments use the following style to help the reader,
-//
-// Format("int $1$() {\n"
-// " array[$2$] = $3$;\n"
-// " return $4$;"
-// "}\n",
-// funname, // 1
-// idx, // 2
-// varname, // 3
-// retval); // 4
-//
-// but consider using named variables. Named variables like $foo$, with some
-// identifier foo, are looked up in the map. One additional feature is that
-// spaces are accepted between the '$' delimiters, $ foo$ will
-// substiture to " bar" if foo stands for "bar", but in case it's empty
-// will substitute to "". Hence, for example,
-//
-// Format(vars, "$dllexport $void fun();") -> "void fun();"
-// "__declspec(export) void fun();"
-//
-// which is convenient to prevent double, leading or trailing spaces.
-class PROTOC_EXPORT Formatter {
- public:
- explicit Formatter(io::Printer* printer) : printer_(printer) {}
- Formatter(io::Printer* printer,
- const std::map<TProtoStringType, TProtoStringType>& vars)
- : printer_(printer), vars_(vars) {}
-
- template <typename T>
- void Set(const TProtoStringType& key, const T& value) {
- vars_[key] = ToString(value);
- }
-
- void AddMap(const std::map<TProtoStringType, TProtoStringType>& vars) {
- for (const auto& keyval : vars) vars_[keyval.first] = keyval.second;
- }
-
- template <typename... Args>
- void operator()(const char* format, const Args&... args) const {
- printer_->FormatInternal({ToString(args)...}, vars_, format);
- }
-
- void Indent() const { printer_->Indent(); }
- void Outdent() const { printer_->Outdent(); }
- io::Printer* printer() const { return printer_; }
-
- class PROTOC_EXPORT ScopedIndenter {
- public:
- explicit ScopedIndenter(Formatter* format) : format_(format) {
- format_->Indent();
- }
- ~ScopedIndenter() { format_->Outdent(); }
-
- private:
- Formatter* format_;
- };
-
- PROTOBUF_NODISCARD ScopedIndenter ScopedIndent() {
- return ScopedIndenter(this);
- }
- template <typename... Args>
- PROTOBUF_NODISCARD ScopedIndenter ScopedIndent(const char* format,
- const Args&&... args) {
- (*this)(format, static_cast<Args&&>(args)...);
- return ScopedIndenter(this);
- }
-
- class PROTOC_EXPORT SaveState {
- public:
- explicit SaveState(Formatter* format)
- : format_(format), vars_(format->vars_) {}
- ~SaveState() { format_->vars_.swap(vars_); }
-
- private:
- Formatter* format_;
- std::map<TProtoStringType, TProtoStringType> vars_;
- };
-
- private:
- io::Printer* printer_;
- std::map<TProtoStringType, TProtoStringType> vars_;
-
- // Convenience overloads to accept different types as arguments.
- static TProtoStringType ToString(const TProtoStringType& s) { return s; }
- template <typename I, typename = typename std::enable_if<
- std::is_integral<I>::value>::type>
- static TProtoStringType ToString(I x) {
- return StrCat(x);
- }
- static TProtoStringType ToString(strings::Hex x) { return StrCat(x); }
- static TProtoStringType ToString(const FieldDescriptor* d) { return Payload(d); }
- static TProtoStringType ToString(const Descriptor* d) { return Payload(d); }
- static TProtoStringType ToString(const EnumDescriptor* d) { return Payload(d); }
- static TProtoStringType ToString(const EnumValueDescriptor* d) {
- return Payload(d);
- }
- static TProtoStringType ToString(const OneofDescriptor* d) { return Payload(d); }
-
- template <typename Descriptor>
- static TProtoStringType Payload(const Descriptor* descriptor) {
- std::vector<int> path;
- descriptor->GetLocationPath(&path);
- GeneratedCodeInfo::Annotation annotation;
- for (int index : path) {
- annotation.add_path(index);
- }
- annotation.set_source_file(descriptor->file()->name());
- return annotation.SerializeAsString();
- }
-};
-
-template <class T>
-void PrintFieldComment(const Formatter& format, const T* field) {
- // Print the field's (or oneof's) proto-syntax definition as a comment.
- // We don't want to print group bodies so we cut off after the first
- // line.
- DebugStringOptions options;
- options.elide_group_body = true;
- options.elide_oneof_body = true;
- TProtoStringType def = field->DebugStringWithOptions(options);
- format("// $1$\n", def.substr(0, def.find_first_of('\n')));
-}
-
-class PROTOC_EXPORT NamespaceOpener {
- public:
- explicit NamespaceOpener(const Formatter& format)
- : printer_(format.printer()) {}
- NamespaceOpener(const TProtoStringType& name, const Formatter& format)
- : NamespaceOpener(format) {
- ChangeTo(name);
- }
- ~NamespaceOpener() { ChangeTo(""); }
-
- void ChangeTo(const TProtoStringType& name) {
- std::vector<TProtoStringType> new_stack_ =
- Split(name, "::", true);
- size_t len = std::min(name_stack_.size(), new_stack_.size());
- size_t common_idx = 0;
- while (common_idx < len) {
- if (name_stack_[common_idx] != new_stack_[common_idx]) break;
- common_idx++;
- }
- for (auto it = name_stack_.crbegin();
- it != name_stack_.crend() - common_idx; ++it) {
- if (*it == "PROTOBUF_NAMESPACE_ID") {
- printer_->Print("PROTOBUF_NAMESPACE_CLOSE\n");
- } else {
- printer_->Print("} // namespace $ns$\n", "ns", *it);
- }
- }
- name_stack_.swap(new_stack_);
- for (size_t i = common_idx; i < name_stack_.size(); ++i) {
- if (name_stack_[i] == "PROTOBUF_NAMESPACE_ID") {
- printer_->Print("PROTOBUF_NAMESPACE_OPEN\n");
- } else {
- printer_->Print("namespace $ns$ {\n", "ns", name_stack_[i]);
- }
- }
- }
-
- private:
- io::Printer* printer_;
- std::vector<TProtoStringType> name_stack_;
-};
-
-enum class Utf8CheckMode {
- kStrict = 0, // Parsing will fail if non UTF-8 data is in string fields.
- kVerify = 1, // Only log an error but parsing will succeed.
- kNone = 2, // No UTF-8 check.
-};
-
-Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field,
- const Options& options);
-
-void GenerateUtf8CheckCodeForString(const FieldDescriptor* field,
- const Options& options, bool for_parse,
- const char* parameters,
- const Formatter& format);
-
-void GenerateUtf8CheckCodeForCord(const FieldDescriptor* field,
- const Options& options, bool for_parse,
- const char* parameters,
- const Formatter& format);
-
-template <typename T>
-struct FieldRangeImpl {
- struct Iterator {
- using iterator_category = std::forward_iterator_tag;
- using value_type = const FieldDescriptor*;
- using difference_type = int;
-
- value_type operator*() { return descriptor->field(idx); }
-
- friend bool operator==(const Iterator& a, const Iterator& b) {
- GOOGLE_DCHECK(a.descriptor == b.descriptor);
- return a.idx == b.idx;
- }
- friend bool operator!=(const Iterator& a, const Iterator& b) {
- return !(a == b);
- }
-
- Iterator& operator++() {
- idx++;
- return *this;
- }
-
- int idx;
- const T* descriptor;
- };
-
- Iterator begin() const { return {0, descriptor}; }
- Iterator end() const { return {descriptor->field_count(), descriptor}; }
-
- const T* descriptor;
-};
-
-template <typename T>
-FieldRangeImpl<T> FieldRange(const T* desc) {
- return {desc};
-}
-
-struct OneOfRangeImpl {
- struct Iterator {
- using iterator_category = std::forward_iterator_tag;
- using value_type = const OneofDescriptor*;
- using difference_type = int;
-
- value_type operator*() { return descriptor->oneof_decl(idx); }
-
- friend bool operator==(const Iterator& a, const Iterator& b) {
- GOOGLE_DCHECK(a.descriptor == b.descriptor);
- return a.idx == b.idx;
- }
- friend bool operator!=(const Iterator& a, const Iterator& b) {
- return !(a == b);
- }
-
- Iterator& operator++() {
- idx++;
- return *this;
- }
-
- int idx;
- const Descriptor* descriptor;
- };
-
- Iterator begin() const { return {0, descriptor}; }
- Iterator end() const {
- return {descriptor->real_oneof_decl_count(), descriptor};
- }
-
- const Descriptor* descriptor;
-};
-
-inline OneOfRangeImpl OneOfRange(const Descriptor* desc) { return {desc}; }
-
-PROTOC_EXPORT TProtoStringType StripProto(const TProtoStringType& filename);
-
-bool EnableMessageOwnedArena(const Descriptor* desc, const Options& options);
-
-bool ShouldVerify(const Descriptor* descriptor, const Options& options,
- MessageSCCAnalyzer* scc_analyzer);
-bool ShouldVerify(const FileDescriptor* file, const Options& options,
- MessageSCCAnalyzer* scc_analyzer);
-} // namespace cpp
-} // namespace compiler
-} // namespace protobuf
-} // namespace google
-
-#include <google/protobuf/port_undef.inc>
-
-#endif // GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__
+#include "helpers.h" \ No newline at end of file
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum.cc
index 960dfcadf7..91d0b9442b 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_enum.h>
+#include <google/protobuf/compiler/cpp/enum.h>
#include <cstdint>
#include <limits>
@@ -40,8 +40,8 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_names.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/names.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum.h
index 652a26b6db..550f43b1ed 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum.h
@@ -40,7 +40,7 @@
#include <string>
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum_field.cc
index f50fca4926..dc8dc52481 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum_field.cc
@@ -32,12 +32,13 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_enum_field.h>
+#include <google/protobuf/compiler/cpp/enum_field.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
namespace protobuf {
@@ -55,8 +56,9 @@ void SetEnumVariables(const FieldDescriptor* descriptor,
(*variables)["default"] = Int32ToString(default_value->number());
(*variables)["full_name"] = descriptor->full_name();
(*variables)["cached_byte_size_name"] = MakeVarintCachedSizeName(descriptor);
+ bool cold = ShouldSplit(descriptor, options);
(*variables)["cached_byte_size_field"] =
- MakeVarintCachedSizeFieldName(descriptor);
+ MakeVarintCachedSizeFieldName(descriptor, cold);
}
} // namespace
@@ -110,6 +112,7 @@ void EnumFieldGenerator::GenerateInlineAccessorDefinitions(
" $field$ = value;\n"
"}\n"
"inline void $classname$::set_$name$($type$ value) {\n"
+ "$maybe_prepare_split_message$"
" _internal_set_$name$(value);\n"
"$annotate_set$"
" // @@protoc_insertion_point(field_set:$full_name$)\n"
@@ -123,7 +126,7 @@ void EnumFieldGenerator::GenerateClearingCode(io::Printer* printer) const {
void EnumFieldGenerator::GenerateMergingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
- format("_internal_set_$name$(from._internal_$name$());\n");
+ format("_this->_internal_set_$name$(from._internal_$name$());\n");
}
void EnumFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
@@ -131,15 +134,10 @@ void EnumFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
format("swap($field$, other->$field$);\n");
}
-void EnumFieldGenerator::GenerateConstructorCode(io::Printer* printer) const {
- Formatter format(printer, variables_);
- format("$field$ = $default$;\n");
-}
-
void EnumFieldGenerator::GenerateCopyConstructorCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$field$ = from.$field$;\n");
+ format("_this->$field$ = from.$field$;\n");
}
void EnumFieldGenerator::GenerateSerializeWithCachedSizesToArray(
@@ -158,10 +156,26 @@ void EnumFieldGenerator::GenerateByteSize(io::Printer* printer) const {
" ::_pbi::WireFormatLite::EnumSize(this->_internal_$name$());\n");
}
-void EnumFieldGenerator::GenerateConstinitInitializer(
+void EnumFieldGenerator::GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("/*decltype($field$)*/$default$");
+}
+
+void EnumFieldGenerator::GenerateAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$name$_($default$)\n");
+ if (ShouldSplit(descriptor_, options_)) {
+ format("decltype(Impl_::Split::$name$_){$default$}");
+ return;
+ }
+ format("decltype($field$){$default$}");
+}
+
+void EnumFieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("decltype($field$){}");
}
// ===================================================================
@@ -322,7 +336,7 @@ void RepeatedEnumFieldGenerator::GenerateClearingCode(
void RepeatedEnumFieldGenerator::GenerateMergingCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$field$.MergeFrom(from.$field$);\n");
+ format("_this->$field$.MergeFrom(from.$field$);\n");
}
void RepeatedEnumFieldGenerator::GenerateSwappingCode(
@@ -336,6 +350,12 @@ void RepeatedEnumFieldGenerator::GenerateConstructorCode(
// Not needed for repeated fields.
}
+void RepeatedEnumFieldGenerator::GenerateDestructorCode(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("$field$.~RepeatedField();\n");
+}
+
void RepeatedEnumFieldGenerator::GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const {
Formatter format(printer, variables_);
@@ -392,13 +412,36 @@ void RepeatedEnumFieldGenerator::GenerateByteSize(io::Printer* printer) const {
format("}\n");
}
-void RepeatedEnumFieldGenerator::GenerateConstinitInitializer(
+void RepeatedEnumFieldGenerator::GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("/*decltype($field$)*/{}");
+ if (descriptor_->is_packed() &&
+ HasGeneratedMethods(descriptor_->file(), options_)) {
+ format("\n, /*decltype($cached_byte_size_field$)*/{0}");
+ }
+}
+
+void RepeatedEnumFieldGenerator::GenerateAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("decltype($field$){arena}");
+ if (descriptor_->is_packed() &&
+ HasGeneratedMethods(descriptor_->file(), options_)) {
+ // std::atomic has no copy constructor, which prevents explicit aggregate
+ // initialization pre-C++17.
+ format("\n, /*decltype($cached_byte_size_field$)*/{0}");
+ }
+}
+
+void RepeatedEnumFieldGenerator::GenerateCopyAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$name$_()");
+ format("decltype($field$){from.$field$}");
if (descriptor_->is_packed() &&
HasGeneratedMethods(descriptor_->file(), options_)) {
- format("\n, $cached_byte_size_name$(0)");
+ // std::atomic has no copy constructor.
+ format("\n, /*decltype($cached_byte_size_field$)*/{0}");
}
}
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum_field.h
index 2a4ca5162b..61bae855cd 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_enum_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/enum_field.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
+#include <google/protobuf/compiler/cpp/field.h>
namespace google {
namespace protobuf {
@@ -57,12 +57,15 @@ class EnumFieldGenerator : public FieldGenerator {
void GenerateClearingCode(io::Printer* printer) const override;
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
- void GenerateConstructorCode(io::Printer* printer) const override;
+ void GenerateConstructorCode(io::Printer* printer) const override {}
void GenerateCopyConstructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
@@ -98,11 +101,17 @@ class RepeatedEnumFieldGenerator : public FieldGenerator {
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
void GenerateConstructorCode(io::Printer* printer) const override;
- void GenerateCopyConstructorCode(io::Printer* printer) const override {}
+ void GenerateCopyConstructorCode(io::Printer* /*printer*/) const override {
+ GOOGLE_CHECK(!ShouldSplit(descriptor_, options_));
+ }
+ void GenerateDestructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_extension.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/extension.cc
index ef6cc81241..ed85f75960 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_extension.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/extension.cc
@@ -32,13 +32,13 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_extension.h>
+#include <google/protobuf/compiler/cpp/extension.h>
#include <map>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
@@ -78,7 +78,7 @@ ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor,
break;
}
SetCommonVars(options, &variables_);
- SetCommonMessageDataVariables(&variables_);
+ SetCommonMessageDataVariables(descriptor_->containing_type(), &variables_);
variables_["extendee"] =
QualifiedClassName(descriptor_->containing_type(), options_);
variables_["type_traits"] = type_traits_;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_extension.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/extension.h
index 5a32e84554..b94b178868 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_extension.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/extension.h
@@ -39,7 +39,7 @@
#include <string>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/field.cc
index 895f094c70..d5359b6d24 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/field.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_field.h>
+#include <google/protobuf/compiler/cpp/field.h>
#include <cstdint>
#include <memory>
@@ -40,16 +40,16 @@
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_primitive_field.h>
-#include <google/protobuf/compiler/cpp/cpp_string_field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/primitive_field.h>
+#include <google/protobuf/compiler/cpp/string_field.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
-#include <google/protobuf/compiler/cpp/cpp_enum_field.h>
-#include <google/protobuf/compiler/cpp/cpp_map_field.h>
-#include <google/protobuf/compiler/cpp/cpp_message_field.h>
+#include <google/protobuf/compiler/cpp/enum_field.h>
+#include <google/protobuf/compiler/cpp/map_field.h>
+#include <google/protobuf/compiler/cpp/message_field.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
@@ -236,7 +236,7 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
std::map<TProtoStringType, TProtoStringType>* variables,
const Options& options) {
SetCommonVars(options, variables);
- SetCommonMessageDataVariables(variables);
+ SetCommonMessageDataVariables(descriptor->containing_type(), variables);
(*variables)["ns"] = Namespace(descriptor, options);
(*variables)["name"] = FieldName(descriptor);
@@ -244,7 +244,8 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
(*variables)["number"] = StrCat(descriptor->number());
(*variables)["classname"] = ClassName(FieldScope(descriptor), false);
(*variables)["declared_type"] = DeclaredTypeMethodName(descriptor->type());
- (*variables)["field"] = FieldMemberName(descriptor);
+ bool split = ShouldSplit(descriptor, options);
+ (*variables)["field"] = FieldMemberName(descriptor, split);
(*variables)["tag_size"] = StrCat(
WireFormat::TagSize(descriptor->number(), descriptor->type()));
@@ -252,13 +253,8 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor,
(*variables)["set_hasbit"] = "";
(*variables)["clear_hasbit"] = "";
- if (HasHasbit(descriptor)) {
- (*variables)["set_hasbit_io"] =
- StrCat("_Internal::set_has_", FieldName(descriptor), "(&",
- (*variables)["has_bits"], ");");
- } else {
- (*variables)["set_hasbit_io"] = "";
- }
+ (*variables)["maybe_prepare_split_message"] =
+ split ? " PrepareSplitMessageForWrite();\n" : "";
AddAccessorAnnotations(descriptor, options, variables);
@@ -304,6 +300,36 @@ void FieldGenerator::SetInlinedStringIndex(arc_i32 inlined_string_index) {
"u");
}
+void FieldGenerator::GenerateAggregateInitializer(io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ if (ShouldSplit(descriptor_, options_)) {
+ format("decltype(Impl_::Split::$name$_){arena}");
+ return;
+ }
+ format("decltype($field$){arena}");
+}
+
+void FieldGenerator::GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("/*decltype($field$)*/{}");
+}
+
+void FieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("decltype($field$){from.$field$}");
+}
+
+void FieldGenerator::GenerateCopyConstructorCode(io::Printer* printer) const {
+ if (ShouldSplit(descriptor_, options_)) {
+ // There is no copy constructor for the `Split` struct, so we need to copy
+ // the value here.
+ Formatter format(printer, variables_);
+ format("$field$ = from.$field$;\n");
+ }
+}
+
void SetCommonOneofFieldVariables(
const FieldDescriptor* descriptor,
std::map<TProtoStringType, TProtoStringType>* variables) {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/field.h
index 9c3ec7fde4..95eb96f499 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/field.h
@@ -41,8 +41,8 @@
#include <string>
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
@@ -136,7 +136,7 @@ class FieldGenerator {
virtual void GenerateMergingCode(io::Printer* printer) const = 0;
// Generates a copy constructor
- virtual void GenerateCopyConstructorCode(io::Printer* printer) const = 0;
+ virtual void GenerateCopyConstructorCode(io::Printer* printer) const;
// Generate lines of code (statements, not declarations) which swaps
// this field and the corresponding field of another message, which
@@ -150,6 +150,9 @@ class FieldGenerator {
// method, invoked by each of the generated constructors.
virtual void GenerateConstructorCode(io::Printer* printer) const = 0;
+ // Generate initialization code for private members in the cold struct.
+ virtual void GenerateCreateSplitMessageCode(io::Printer* printer) const {}
+
// Generate any code that needs to go in the class's SharedDtor() method,
// invoked by the destructor.
// Most field types don't need this, so the default implementation is empty.
@@ -165,10 +168,32 @@ class FieldGenerator {
}
// Generate initialization code for private members declared by
- // GeneratePrivateMembers(), specifically for the constexpr constructor.
- // These go into the constructor's initializer list and must follow that
- // syntax (eg `field_(args)`). Does not include `:` or `,` separators.
- virtual void GenerateConstinitInitializer(io::Printer* printer) const {}
+ // GeneratePrivateMembers(). These go into the SharedCtor's
+ // aggregate initialization of the _impl_ struct and must follow the syntax
+ // (e.g. `decltype($field$){$default$}`). Does not include `:` or `,`
+ // separators. Default values should be specified here when possible.
+ //
+ // Note: We use `decltype($field$)` for both explicit construction and the
+ // fact that it's self-documenting. Pre-C++17, copy elision isn't guaranteed
+ // in aggregate initialization so a valid copy/move constructor must exist
+ // (even though it's not used). Because of this, we need to comment out the
+ // decltype and fallback to implicit construction.
+ virtual void GenerateAggregateInitializer(io::Printer* printer) const;
+
+ // Generate constinit initialization code for private members declared by
+ // GeneratePrivateMembers(). These go into the constexpr constructor's
+ // aggregate initialization of the _impl_ struct and must follow the syntax
+ // (e.g. `/*decltype($field$)*/{}`, see above). Does not
+ // include `:` or `,` separators.
+ virtual void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const;
+
+ // Generate copy initialization code for private members declared by
+ // GeneratePrivateMembers(). These go into the copy constructor's
+ // aggregate initialization of the _impl_ struct and must follow the syntax
+ // (e.g. `decltype($field$){from.$field$}`, see above). Does not
+ // include `:` or `,` separators.
+ virtual void GenerateCopyAggregateInitializer(io::Printer* printer) const;
// Generate lines to serialize this field directly to the array "target",
// which are placed within the message's SerializeWithCachedSizesToArray()
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/file.cc
index f27d876e2a..2d79ec11e5 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/file.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_file.h>
+#include <google/protobuf/compiler/cpp/file.h>
#include <iostream>
#include <map>
@@ -46,12 +46,12 @@
#include <google/protobuf/compiler/scc.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_enum.h>
-#include <google/protobuf/compiler/cpp/cpp_extension.h>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_message.h>
-#include <google/protobuf/compiler/cpp/cpp_service.h>
+#include <google/protobuf/compiler/cpp/enum.h>
+#include <google/protobuf/compiler/cpp/extension.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/message.h>
+#include <google/protobuf/compiler/cpp/service.h>
#include <google/protobuf/descriptor.pb.h>
// Must be last.
@@ -496,10 +496,40 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx,
io::Printer* printer) {
Formatter format(printer, variables_);
MessageGenerator* generator = message_generators_[idx].get();
+ // Generate the split instance first because it's needed in the constexpr
+ // constructor.
+ if (ShouldSplit(generator->descriptor_, options_)) {
+ // Use a union to disable the destructor of the _instance member.
+ // We can constant initialize, but the object will still have a non-trivial
+ // destructor that we need to elide.
+ format(
+ "struct $1$ {\n"
+ " PROTOBUF_CONSTEXPR $1$()\n"
+ " : _instance{",
+ DefaultInstanceType(generator->descriptor_, options_,
+ /*split=*/true));
+ generator->GenerateInitDefaultSplitInstance(printer);
+ format(
+ "} {}\n"
+ " ~$1$() {}\n"
+ " union {\n"
+ " $2$ _instance;\n"
+ " };\n"
+ "};\n",
+ DefaultInstanceType(generator->descriptor_, options_, /*split=*/true),
+ StrCat(generator->classname_, "::Impl_::Split"));
+ // NO_DESTROY is not necessary for correctness. The empty destructor is
+ // enough. However, the empty destructor fails to be elided in some
+ // configurations (like non-opt or with certain sanitizers). NO_DESTROY is
+ // there just to improve performance and binary size in these builds.
+ format(
+ "PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT "
+ "PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $1$ $2$;\n",
+ DefaultInstanceType(generator->descriptor_, options_, /*split=*/true),
+ DefaultInstanceName(generator->descriptor_, options_, /*split=*/true));
+ }
+
generator->GenerateConstexprConstructor(printer);
- // Use a union to disable the destructor of the _instance member.
- // We can constant initialize, but the object will still have a non-trivial
- // destructor that we need to elide.
format(
"struct $1$ {\n"
" PROTOBUF_CONSTEXPR $1$()\n"
@@ -511,14 +541,11 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx,
"};\n",
DefaultInstanceType(generator->descriptor_, options_),
generator->classname_);
- // NO_DESTROY is not necessary for correctness. The empty destructor is
- // enough. However, the empty destructor fails to be elided in some
- // configurations (like non-opt or with certain sanitizers). NO_DESTROY is
- // there just to improve performance and binary size in these builds.
- format("PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT "
- "PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $1$ $2$;\n",
- DefaultInstanceType(generator->descriptor_, options_),
- DefaultInstanceName(generator->descriptor_, options_));
+ format(
+ "PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT "
+ "PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $1$ $2$;\n",
+ DefaultInstanceType(generator->descriptor_, options_),
+ DefaultInstanceName(generator->descriptor_, options_));
for (int i = 0; i < generator->descriptor_->field_count(); i++) {
const FieldDescriptor* field = generator->descriptor_->field(i);
@@ -526,11 +553,11 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx,
// Force the initialization of the inlined string in the default instance.
format(
"PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 std::true_type "
- "$1$::_init_inline_$2$_ = "
+ "$1$::Impl_::_init_inline_$2$_ = "
"($3$._instance.$4$.Init(), std::true_type{});\n",
ClassName(generator->descriptor_), FieldName(field),
DefaultInstanceName(generator->descriptor_, options_),
- FieldMemberName(field));
+ FieldMemberName(field, ShouldSplit(field, options_)));
}
}
@@ -963,6 +990,7 @@ class FileGenerator::ForwardDeclarations {
public:
void AddMessage(const Descriptor* d) { classes_[ClassName(d)] = d; }
void AddEnum(const EnumDescriptor* d) { enums_[ClassName(d)] = d; }
+ void AddSplit(const Descriptor* d) { splits_[ClassName(d)] = d; }
void Print(const Formatter& format, const Options& options) const {
for (const auto& p : enums_) {
@@ -983,6 +1011,14 @@ class FileGenerator::ForwardDeclarations {
class_desc, classname, DefaultInstanceType(class_desc, options),
DefaultInstanceName(class_desc, options));
}
+ for (const auto& p : splits_) {
+ const Descriptor* class_desc = p.second;
+ format(
+ "struct $1$;\n"
+ "$dllexport_decl $extern $1$ $2$;\n",
+ DefaultInstanceType(class_desc, options, /*split=*/true),
+ DefaultInstanceName(class_desc, options, /*split=*/true));
+ }
}
void PrintTopLevelDecl(const Formatter& format,
@@ -998,6 +1034,7 @@ class FileGenerator::ForwardDeclarations {
private:
std::map<TProtoStringType, const Descriptor*> classes_;
std::map<TProtoStringType, const EnumDescriptor*> enums_;
+ std::map<TProtoStringType, const Descriptor*> splits_;
};
static void PublicImportDFS(const FileDescriptor* fd,
@@ -1071,6 +1108,12 @@ void FileGenerator::GenerateForwardDeclarations(io::Printer* printer) {
if (d && !public_set.count(d->file()))
decls[Namespace(d, options_)].AddEnum(d);
}
+ for (const auto& mg : message_generators_) {
+ const Descriptor* d = mg->descriptor_;
+ if ((d != nullptr) && (public_set.count(d->file()) == 0u) &&
+ ShouldSplit(mg->descriptor_, options_))
+ decls[Namespace(d, options_)].AddSplit(d);
+ }
{
NamespaceOpener ns(format);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/file.h
index d8eff2feed..805b4979bf 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/file.h
@@ -42,10 +42,10 @@
#include <vector>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
#include <google/protobuf/compiler/scc.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.cc
index 69443f5bf2..0da2027a1e 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_generator.h>
+#include <google/protobuf/compiler/cpp/generator.h>
#include <memory>
#include <string>
@@ -42,8 +42,8 @@
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/compiler/cpp/cpp_file.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/file.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
@@ -135,12 +135,12 @@ bool CppGenerator::Generate(const FileDescriptor* file,
.insert(options[i].second.substr(pos, next_pos - pos));
pos = next_pos + 1;
} while (pos < options[i].second.size());
- } else if (options[i].first == "verified_lazy_message_sets") {
- file_options.unverified_lazy_message_sets = false;
+ } else if (options[i].first == "verified_lazy") {
+ file_options.unverified_lazy = false;
} else if (options[i].first == "unverified_lazy_message_sets") {
file_options.unverified_lazy_message_sets = true;
- } else if (options[i].first == "eagerly_verified_lazy") {
- file_options.eagerly_verified_lazy = true;
+ } else if (options[i].first == "message_owned_arena_trial") {
+ file_options.message_owned_arena_trial = true;
} else if (options[i].first == "force_eagerly_verified_lazy") {
file_options.force_eagerly_verified_lazy = true;
} else if (options[i].first == "experimental_tail_call_table_mode") {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h
index aa63845d30..aa63845d30 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.cc
index f726d0fc9b..48879f29d5 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_helpers.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.cc
@@ -32,12 +32,13 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
#include <cstdint>
#include <functional>
#include <limits>
#include <map>
+#include <memory>
#include <queue>
#include <unordered_set>
#include <vector>
@@ -45,8 +46,8 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/compiler/cpp/cpp_names.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/names.h>
+#include <google/protobuf/compiler/cpp/options.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/compiler/scc.h>
#include <google/protobuf/io/printer.h>
@@ -182,18 +183,53 @@ void SetIntVar(const Options& options, const TProtoStringType& type,
std::map<TProtoStringType, TProtoStringType>* variables) {
(*variables)[type] = IntTypeName(options, type);
}
-bool IsEagerlyVerifiedLazyImpl(const FieldDescriptor* field,
- const Options& options,
- MessageSCCAnalyzer* scc_analyzer) {
+
+// Returns true if the message can potentially allocate memory for its field.
+// This is used to determine if message-owned arena will be useful.
+bool AllocExpected(const Descriptor* descriptor) {
return false;
}
+// Describes different approaches to detect non-canonical int32 encoding. Only
+// kNever or kAlways is eligible for *simple* verification methods.
+enum class VerifyInt32Type {
+ kCustom, // Only check if field number matches.
+ kNever, // Do not check.
+ kAlways, // Always check.
+};
+
+inline VerifySimpleType VerifyInt32TypeToVerifyCustom(VerifyInt32Type t) {
+ static VerifySimpleType kCustomTypes[] = {
+ VerifySimpleType::kCustom, VerifySimpleType::kCustomInt32Never,
+ VerifySimpleType::kCustomInt32Always};
+ return kCustomTypes[static_cast<arc_i32>(t) -
+ static_cast<arc_i32>(VerifyInt32Type::kCustom)];
+}
+
} // namespace
bool IsLazy(const FieldDescriptor* field, const Options& options,
MessageSCCAnalyzer* scc_analyzer) {
return IsLazilyVerifiedLazy(field, options) ||
- IsEagerlyVerifiedLazyImpl(field, options, scc_analyzer);
+ IsEagerlyVerifiedLazy(field, options, scc_analyzer);
+}
+
+// Returns true if "field" is a message field that is backed by LazyField per
+// profile (go/pdlazy).
+inline bool IsEagerlyVerifiedLazyByProfile(const FieldDescriptor* field,
+ const Options& options,
+ MessageSCCAnalyzer* scc_analyzer) {
+ return false;
+}
+
+bool IsEagerlyVerifiedLazy(const FieldDescriptor* field, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer) {
+ return false;
+}
+
+bool IsLazilyVerifiedLazy(const FieldDescriptor* field,
+ const Options& options) {
+ return false;
}
void SetCommonVars(const Options& options,
@@ -234,15 +270,20 @@ void SetCommonVars(const Options& options,
}
void SetCommonMessageDataVariables(
+ const Descriptor* descriptor,
std::map<TProtoStringType, TProtoStringType>* variables) {
- (*variables)["any_metadata"] = "_any_metadata_";
- (*variables)["cached_size"] = "_cached_size_";
- (*variables)["extensions"] = "_extensions_";
- (*variables)["has_bits"] = "_has_bits_";
- (*variables)["inlined_string_donated_array"] = "_inlined_string_donated_";
- (*variables)["oneof_case"] = "_oneof_case_";
- (*variables)["tracker"] = "_tracker_";
- (*variables)["weak_field_map"] = "_weak_field_map_";
+ TProtoStringType prefix = IsMapEntryMessage(descriptor) ? "" : "_impl_.";
+ (*variables)["any_metadata"] = prefix + "_any_metadata_";
+ (*variables)["cached_size"] = prefix + "_cached_size_";
+ (*variables)["extensions"] = prefix + "_extensions_";
+ (*variables)["has_bits"] = prefix + "_has_bits_";
+ (*variables)["inlined_string_donated_array"] =
+ prefix + "_inlined_string_donated_";
+ (*variables)["oneof_case"] = prefix + "_oneof_case_";
+ (*variables)["tracker"] = "Impl_::_tracker_";
+ (*variables)["weak_field_map"] = prefix + "_weak_field_map_";
+ (*variables)["split"] = prefix + "_split_";
+ (*variables)["cached_split_ptr"] = "cached_split_ptr";
}
void SetUnknownFieldsVariable(const Descriptor* descriptor,
@@ -407,29 +448,32 @@ TProtoStringType Namespace(const EnumDescriptor* d, const Options& options) {
}
TProtoStringType DefaultInstanceType(const Descriptor* descriptor,
- const Options& options) {
- return ClassName(descriptor) + "DefaultTypeInternal";
+ const Options& /*options*/, bool split) {
+ return ClassName(descriptor) + (split ? "__Impl_Split" : "") +
+ "DefaultTypeInternal";
}
TProtoStringType DefaultInstanceName(const Descriptor* descriptor,
- const Options& options) {
- return "_" + ClassName(descriptor, false) + "_default_instance_";
+ const Options& /*options*/, bool split) {
+ return "_" + ClassName(descriptor, false) + (split ? "__Impl_Split" : "") +
+ "_default_instance_";
}
TProtoStringType DefaultInstancePtr(const Descriptor* descriptor,
- const Options& options) {
- return DefaultInstanceName(descriptor, options) + "ptr_";
+ const Options& options, bool split) {
+ return DefaultInstanceName(descriptor, options, split) + "ptr_";
}
TProtoStringType QualifiedDefaultInstanceName(const Descriptor* descriptor,
- const Options& options) {
+ const Options& options, bool split) {
return QualifiedFileLevelSymbol(
- descriptor->file(), DefaultInstanceName(descriptor, options), options);
+ descriptor->file(), DefaultInstanceName(descriptor, options, split),
+ options);
}
TProtoStringType QualifiedDefaultInstancePtr(const Descriptor* descriptor,
- const Options& options) {
- return QualifiedDefaultInstanceName(descriptor, options) + "ptr_";
+ const Options& options, bool split) {
+ return QualifiedDefaultInstanceName(descriptor, options, split) + "ptr_";
}
TProtoStringType DescriptorTableName(const FileDescriptor* file,
@@ -469,12 +513,17 @@ TProtoStringType FieldName(const FieldDescriptor* field) {
return result;
}
-TProtoStringType FieldMemberName(const FieldDescriptor* field) {
+TProtoStringType FieldMemberName(const FieldDescriptor* field, bool split) {
+ StringPiece prefix =
+ IsMapEntryMessage(field->containing_type()) ? "" : "_impl_.";
+ StringPiece split_prefix = split ? "_split_->" : "";
if (field->real_containing_oneof() == nullptr) {
- return StrCat(FieldName(field), "_");
+ return StrCat(prefix, split_prefix, FieldName(field), "_");
}
- return StrCat(field->containing_oneof()->name(), "_.", FieldName(field),
- "_");
+ // Oneof fields are never split.
+ GOOGLE_CHECK(!split);
+ return StrCat(prefix, field->containing_oneof()->name(), "_.",
+ FieldName(field), "_");
}
TProtoStringType OneofCaseConstantName(const FieldDescriptor* field) {
@@ -855,6 +904,9 @@ bool HasLazyFields(const FileDescriptor* file, const Options& options,
return false;
}
+bool ShouldSplit(const Descriptor*, const Options&) { return false; }
+bool ShouldSplit(const FieldDescriptor*, const Options&) { return false; }
+
static bool HasRepeatedFields(const Descriptor* descriptor) {
for (int i = 0; i < descriptor->field_count(); ++i) {
if (descriptor->field(i)->label() == FieldDescriptor::LABEL_REPEATED) {
@@ -991,6 +1043,16 @@ bool ShouldVerify(const FileDescriptor* file, const Options& options,
return false;
}
+bool IsUtf8String(const FieldDescriptor* field) {
+ return IsProto3(field->file()) &&
+ field->type() == FieldDescriptor::TYPE_STRING;
+}
+
+VerifySimpleType ShouldVerifySimple(const Descriptor* descriptor) {
+ (void)descriptor;
+ return VerifySimpleType::kCustom;
+}
+
bool IsStringOrMessage(const FieldDescriptor* field) {
switch (field->cpp_type()) {
case FieldDescriptor::CPPTYPE_INT32:
@@ -1509,12 +1571,32 @@ FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
return FileOptions::SPEED;
}
+inline bool IsMessageOwnedArenaEligible(const Descriptor* desc,
+ const Options& options) {
+ return GetOptimizeFor(desc->file(), options) != FileOptions::LITE_RUNTIME &&
+ !options.bootstrap && !options.opensource_runtime &&
+ AllocExpected(desc);
+}
+
bool EnableMessageOwnedArena(const Descriptor* desc, const Options& options) {
(void)desc;
(void)options;
return false;
}
+bool EnableMessageOwnedArenaTrial(const Descriptor* desc,
+ const Options& options) {
+ return false;
+}
+
+bool HasMessageFieldOrExtension(const Descriptor* desc) {
+ if (desc->extension_range_count() > 0) return true;
+ for (const auto* f : FieldRange(desc)) {
+ if (f->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) return true;
+ }
+ return false;
+}
+
} // namespace cpp
} // namespace compiler
} // namespace protobuf
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.h
new file mode 100644
index 0000000000..690a577591
--- /dev/null
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/helpers.h
@@ -0,0 +1,1065 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+
+#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__
+#define GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__
+
+#include <algorithm>
+#include <cstdint>
+#include <iterator>
+#include <map>
+#include <string>
+
+#include <google/protobuf/compiler/scc.h>
+#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/compiler/cpp/names.h>
+#include <google/protobuf/compiler/cpp/options.h>
+#include <google/protobuf/descriptor.pb.h>
+#include <google/protobuf/io/printer.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/port.h>
+#include <google/protobuf/stubs/strutil.h>
+
+// Must be included last.
+#include <google/protobuf/port_def.inc>
+
+namespace google {
+namespace protobuf {
+namespace compiler {
+namespace cpp {
+
+enum class ArenaDtorNeeds { kNone = 0, kOnDemand = 1, kRequired = 2 };
+
+inline TProtoStringType ProtobufNamespace(const Options& /* options */) {
+ return "PROTOBUF_NAMESPACE_ID";
+}
+
+inline TProtoStringType MacroPrefix(const Options& /* options */) {
+ return "GOOGLE_PROTOBUF";
+}
+
+inline TProtoStringType DeprecatedAttribute(const Options& /* options */,
+ const FieldDescriptor* d) {
+ return d->options().deprecated() ? "PROTOBUF_DEPRECATED " : "";
+}
+
+inline TProtoStringType DeprecatedAttribute(const Options& /* options */,
+ const EnumValueDescriptor* d) {
+ return d->options().deprecated() ? "PROTOBUF_DEPRECATED_ENUM " : "";
+}
+
+// Commonly-used separator comments. Thick is a line of '=', thin is a line
+// of '-'.
+extern const char kThickSeparator[];
+extern const char kThinSeparator[];
+
+void SetCommonVars(const Options& options,
+ std::map<TProtoStringType, TProtoStringType>* variables);
+
+// Variables to access message data from the message scope.
+void SetCommonMessageDataVariables(
+ const Descriptor* descriptor,
+ std::map<TProtoStringType, TProtoStringType>* variables);
+
+void SetUnknownFieldsVariable(const Descriptor* descriptor,
+ const Options& options,
+ std::map<TProtoStringType, TProtoStringType>* variables);
+
+bool GetBootstrapBasename(const Options& options, const TProtoStringType& basename,
+ TProtoStringType* bootstrap_basename);
+bool MaybeBootstrap(const Options& options, GeneratorContext* generator_context,
+ bool bootstrap_flag, TProtoStringType* basename);
+bool IsBootstrapProto(const Options& options, const FileDescriptor* file);
+
+// Name space of the proto file. This namespace is such that the string
+// "<namespace>::some_name" is the correct fully qualified namespace.
+// This means if the package is empty the namespace is "", and otherwise
+// the namespace is "::foo::bar::...::baz" without trailing semi-colons.
+TProtoStringType Namespace(const FileDescriptor* d, const Options& options);
+TProtoStringType Namespace(const Descriptor* d, const Options& options);
+TProtoStringType Namespace(const FieldDescriptor* d, const Options& options);
+TProtoStringType Namespace(const EnumDescriptor* d, const Options& options);
+
+// Returns true if it's safe to reset "field" to zero.
+bool CanInitializeByZeroing(const FieldDescriptor* field);
+
+TProtoStringType ClassName(const Descriptor* descriptor);
+TProtoStringType ClassName(const EnumDescriptor* enum_descriptor);
+
+TProtoStringType QualifiedClassName(const Descriptor* d, const Options& options);
+TProtoStringType QualifiedClassName(const EnumDescriptor* d, const Options& options);
+
+TProtoStringType QualifiedClassName(const Descriptor* d);
+TProtoStringType QualifiedClassName(const EnumDescriptor* d);
+
+// DEPRECATED just use ClassName or QualifiedClassName, a boolean is very
+// unreadable at the callsite.
+// Returns the non-nested type name for the given type. If "qualified" is
+// true, prefix the type with the full namespace. For example, if you had:
+// package foo.bar;
+// message Baz { message Moo {} }
+// Then the qualified ClassName for Moo would be:
+// ::foo::bar::Baz_Moo
+// While the non-qualified version would be:
+// Baz_Moo
+inline TProtoStringType ClassName(const Descriptor* descriptor, bool qualified) {
+ return qualified ? QualifiedClassName(descriptor, Options())
+ : ClassName(descriptor);
+}
+
+inline TProtoStringType ClassName(const EnumDescriptor* descriptor, bool qualified) {
+ return qualified ? QualifiedClassName(descriptor, Options())
+ : ClassName(descriptor);
+}
+
+// Returns the extension name prefixed with the class name if nested but without
+// the package name.
+TProtoStringType ExtensionName(const FieldDescriptor* d);
+
+TProtoStringType QualifiedExtensionName(const FieldDescriptor* d,
+ const Options& options);
+TProtoStringType QualifiedExtensionName(const FieldDescriptor* d);
+
+// Type name of default instance.
+TProtoStringType DefaultInstanceType(const Descriptor* descriptor,
+ const Options& options, bool split = false);
+
+// Non-qualified name of the default_instance of this message.
+TProtoStringType DefaultInstanceName(const Descriptor* descriptor,
+ const Options& options, bool split = false);
+
+// Non-qualified name of the default instance pointer. This is used only for
+// implicit weak fields, where we need an extra indirection.
+TProtoStringType DefaultInstancePtr(const Descriptor* descriptor,
+ const Options& options, bool split = false);
+
+// Fully qualified name of the default_instance of this message.
+TProtoStringType QualifiedDefaultInstanceName(const Descriptor* descriptor,
+ const Options& options,
+ bool split = false);
+
+// Fully qualified name of the default instance pointer.
+TProtoStringType QualifiedDefaultInstancePtr(const Descriptor* descriptor,
+ const Options& options,
+ bool split = false);
+
+// DescriptorTable variable name.
+TProtoStringType DescriptorTableName(const FileDescriptor* file,
+ const Options& options);
+
+// When declaring symbol externs from another file, this macro will supply the
+// dllexport needed for the target file, if any.
+TProtoStringType FileDllExport(const FileDescriptor* file, const Options& options);
+
+// Name of the base class: google::protobuf::Message or google::protobuf::MessageLite.
+TProtoStringType SuperClassName(const Descriptor* descriptor,
+ const Options& options);
+
+// Adds an underscore if necessary to prevent conflicting with a keyword.
+TProtoStringType ResolveKeyword(const TProtoStringType& name);
+
+// Get the (unqualified) name that should be used for this field in C++ code.
+// The name is coerced to lower-case to emulate proto1 behavior. People
+// should be using lowercase-with-underscores style for proto field names
+// anyway, so normally this just returns field->name().
+TProtoStringType FieldName(const FieldDescriptor* field);
+
+// Returns the (unqualified) private member name for this field in C++ code.
+TProtoStringType FieldMemberName(const FieldDescriptor* field, bool split);
+
+// Returns an estimate of the compiler's alignment for the field. This
+// can't guarantee to be correct because the generated code could be compiled on
+// different systems with different alignment rules. The estimates below assume
+// 64-bit pointers.
+int EstimateAlignmentSize(const FieldDescriptor* field);
+
+// Get the unqualified name that should be used for a field's field
+// number constant.
+TProtoStringType FieldConstantName(const FieldDescriptor* field);
+
+// Returns the scope where the field was defined (for extensions, this is
+// different from the message type to which the field applies).
+inline const Descriptor* FieldScope(const FieldDescriptor* field) {
+ return field->is_extension() ? field->extension_scope()
+ : field->containing_type();
+}
+
+// Returns the fully-qualified type name field->message_type(). Usually this
+// is just ClassName(field->message_type(), true);
+TProtoStringType FieldMessageTypeName(const FieldDescriptor* field,
+ const Options& options);
+
+// Get the C++ type name for a primitive type (e.g. "double", "::google::protobuf::int32", etc.).
+const char* PrimitiveTypeName(FieldDescriptor::CppType type);
+TProtoStringType PrimitiveTypeName(const Options& options,
+ FieldDescriptor::CppType type);
+
+// Get the declared type name in CamelCase format, as is used e.g. for the
+// methods of WireFormat. For example, TYPE_INT32 becomes "Int32".
+const char* DeclaredTypeMethodName(FieldDescriptor::Type type);
+
+// Return the code that evaluates to the number when compiled.
+TProtoStringType Int32ToString(int number);
+
+// Get code that evaluates to the field's default value.
+TProtoStringType DefaultValue(const Options& options, const FieldDescriptor* field);
+
+// Compatibility function for callers outside proto2.
+TProtoStringType DefaultValue(const FieldDescriptor* field);
+
+// Convert a file name into a valid identifier.
+TProtoStringType FilenameIdentifier(const TProtoStringType& filename);
+
+// For each .proto file generates a unique name. To prevent collisions of
+// symbols in the global namespace
+TProtoStringType UniqueName(const TProtoStringType& name, const TProtoStringType& filename,
+ const Options& options);
+inline TProtoStringType UniqueName(const TProtoStringType& name, const FileDescriptor* d,
+ const Options& options) {
+ return UniqueName(name, d->name(), options);
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name, const Descriptor* d,
+ const Options& options) {
+ return UniqueName(name, d->file(), options);
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name, const EnumDescriptor* d,
+ const Options& options) {
+ return UniqueName(name, d->file(), options);
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name,
+ const ServiceDescriptor* d,
+ const Options& options) {
+ return UniqueName(name, d->file(), options);
+}
+
+// Versions for call sites that only support the internal runtime (like proto1
+// support).
+inline Options InternalRuntimeOptions() {
+ Options options;
+ options.opensource_runtime = false;
+ return options;
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name,
+ const TProtoStringType& filename) {
+ return UniqueName(name, filename, InternalRuntimeOptions());
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name,
+ const FileDescriptor* d) {
+ return UniqueName(name, d->name(), InternalRuntimeOptions());
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name, const Descriptor* d) {
+ return UniqueName(name, d->file(), InternalRuntimeOptions());
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name,
+ const EnumDescriptor* d) {
+ return UniqueName(name, d->file(), InternalRuntimeOptions());
+}
+inline TProtoStringType UniqueName(const TProtoStringType& name,
+ const ServiceDescriptor* d) {
+ return UniqueName(name, d->file(), InternalRuntimeOptions());
+}
+
+// Return the qualified C++ name for a file level symbol.
+TProtoStringType QualifiedFileLevelSymbol(const FileDescriptor* file,
+ const TProtoStringType& name,
+ const Options& options);
+
+// Escape C++ trigraphs by escaping question marks to \?
+TProtoStringType EscapeTrigraphs(const TProtoStringType& to_escape);
+
+// Escaped function name to eliminate naming conflict.
+TProtoStringType SafeFunctionName(const Descriptor* descriptor,
+ const FieldDescriptor* field,
+ const TProtoStringType& prefix);
+
+// Returns true if generated messages have public unknown fields accessors
+inline bool PublicUnknownFieldsAccessors(const Descriptor* message) {
+ return message->file()->syntax() != FileDescriptor::SYNTAX_PROTO3;
+}
+
+// Returns the optimize mode for <file>, respecting <options.enforce_lite>.
+FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
+ const Options& options);
+
+// Determines whether unknown fields will be stored in an UnknownFieldSet or
+// a string.
+inline bool UseUnknownFieldSet(const FileDescriptor* file,
+ const Options& options) {
+ return GetOptimizeFor(file, options) != FileOptions::LITE_RUNTIME;
+}
+
+inline bool IsWeak(const FieldDescriptor* field, const Options& options) {
+ if (field->options().weak()) {
+ GOOGLE_CHECK(!options.opensource_runtime);
+ return true;
+ }
+ return false;
+}
+
+bool IsStringInlined(const FieldDescriptor* descriptor, const Options& options);
+
+// For a string field, returns the effective ctype. If the actual ctype is
+// not supported, returns the default of STRING.
+FieldOptions::CType EffectiveStringCType(const FieldDescriptor* field,
+ const Options& options);
+
+inline bool IsCord(const FieldDescriptor* field, const Options& options) {
+ return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING &&
+ EffectiveStringCType(field, options) == FieldOptions::CORD;
+}
+
+inline bool IsString(const FieldDescriptor* field, const Options& options) {
+ return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING &&
+ EffectiveStringCType(field, options) == FieldOptions::STRING;
+}
+
+inline bool IsStringPiece(const FieldDescriptor* field,
+ const Options& options) {
+ return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING &&
+ EffectiveStringCType(field, options) == FieldOptions::STRING_PIECE;
+}
+
+class MessageSCCAnalyzer;
+
+// Does the given FileDescriptor use lazy fields?
+bool HasLazyFields(const FileDescriptor* file, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer);
+
+// Is the given field a supported lazy field?
+bool IsLazy(const FieldDescriptor* field, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer);
+
+// Is this an explicit (non-profile driven) lazy field, as denoted by
+// lazy/unverified_lazy in the descriptor?
+inline bool IsExplicitLazy(const FieldDescriptor* field) {
+ return field->options().lazy() || field->options().unverified_lazy();
+}
+
+bool IsEagerlyVerifiedLazy(const FieldDescriptor* field, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer);
+
+bool IsLazilyVerifiedLazy(const FieldDescriptor* field, const Options& options);
+
+// Is the given message being split (go/pdsplit)?
+bool ShouldSplit(const Descriptor* desc, const Options& options);
+
+// Is the given field being split out?
+bool ShouldSplit(const FieldDescriptor* field, const Options& options);
+
+inline bool IsFieldUsed(const FieldDescriptor* /* field */,
+ const Options& /* options */) {
+ return true;
+}
+
+// Returns true if "field" is stripped.
+inline bool IsFieldStripped(const FieldDescriptor* /*field*/,
+ const Options& /*options*/) {
+ return false;
+}
+
+// Does the file contain any definitions that need extension_set.h?
+bool HasExtensionsOrExtendableMessage(const FileDescriptor* file);
+
+// Does the file have any repeated fields, necessitating the file to include
+// repeated_field.h? This does not include repeated extensions, since those are
+// all stored internally in an ExtensionSet, not a separate RepeatedField*.
+bool HasRepeatedFields(const FileDescriptor* file);
+
+// Does the file have any string/bytes fields with ctype=STRING_PIECE? This
+// does not include extensions, since ctype is ignored for extensions.
+bool HasStringPieceFields(const FileDescriptor* file, const Options& options);
+
+// Does the file have any string/bytes fields with ctype=CORD? This does not
+// include extensions, since ctype is ignored for extensions.
+bool HasCordFields(const FileDescriptor* file, const Options& options);
+
+// Does the file have any map fields, necessitating the file to include
+// map_field_inl.h and map.h.
+bool HasMapFields(const FileDescriptor* file);
+
+// Does this file have any enum type definitions?
+bool HasEnumDefinitions(const FileDescriptor* file);
+
+// Does this file have generated parsing, serialization, and other
+// standard methods for which reflection-based fallback implementations exist?
+inline bool HasGeneratedMethods(const FileDescriptor* file,
+ const Options& options) {
+ return GetOptimizeFor(file, options) != FileOptions::CODE_SIZE;
+}
+
+// Do message classes in this file have descriptor and reflection methods?
+inline bool HasDescriptorMethods(const FileDescriptor* file,
+ const Options& options) {
+ return GetOptimizeFor(file, options) != FileOptions::LITE_RUNTIME;
+}
+
+// Should we generate generic services for this file?
+inline bool HasGenericServices(const FileDescriptor* file,
+ const Options& options) {
+ return file->service_count() > 0 &&
+ GetOptimizeFor(file, options) != FileOptions::LITE_RUNTIME &&
+ file->options().cc_generic_services();
+}
+
+inline bool IsProto2MessageSet(const Descriptor* descriptor,
+ const Options& options) {
+ return !options.opensource_runtime &&
+ options.enforce_mode != EnforceOptimizeMode::kLiteRuntime &&
+ !options.lite_implicit_weak_fields &&
+ descriptor->options().message_set_wire_format() &&
+ descriptor->full_name() == "google.protobuf.bridge.MessageSet";
+}
+
+inline bool IsMapEntryMessage(const Descriptor* descriptor) {
+ return descriptor->options().map_entry();
+}
+
+// Returns true if the field's CPPTYPE is string or message.
+bool IsStringOrMessage(const FieldDescriptor* field);
+
+TProtoStringType UnderscoresToCamelCase(const TProtoStringType& input,
+ bool cap_next_letter);
+
+inline bool IsProto3(const FileDescriptor* file) {
+ return file->syntax() == FileDescriptor::SYNTAX_PROTO3;
+}
+
+inline bool HasHasbit(const FieldDescriptor* field) {
+ // This predicate includes proto3 message fields only if they have "optional".
+ // Foo submsg1 = 1; // HasHasbit() == false
+ // optional Foo submsg2 = 2; // HasHasbit() == true
+ // This is slightly odd, as adding "optional" to a singular proto3 field does
+ // not change the semantics or API. However whenever any field in a message
+ // has a hasbit, it forces reflection to include hasbit offsets for *all*
+ // fields, even if almost all of them are set to -1 (no hasbit). So to avoid
+ // causing a sudden size regression for ~all proto3 messages, we give proto3
+ // message fields a hasbit only if "optional" is present. If the user is
+ // explicitly writing "optional", it is likely they are writing it on
+ // primitive fields also.
+ return (field->has_optional_keyword() || field->is_required()) &&
+ !field->options().weak();
+}
+
+// Returns true if 'enum' semantics are such that unknown values are preserved
+// in the enum field itself, rather than going to the UnknownFieldSet.
+inline bool HasPreservingUnknownEnumSemantics(const FieldDescriptor* field) {
+ return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3;
+}
+
+inline bool IsCrossFileMessage(const FieldDescriptor* field) {
+ return field->type() == FieldDescriptor::TYPE_MESSAGE &&
+ field->message_type()->file() != field->file();
+}
+
+inline TProtoStringType MakeDefaultName(const FieldDescriptor* field) {
+ return StrCat("_i_give_permission_to_break_this_code_default_",
+ FieldName(field), "_");
+}
+
+// Semantically distinct from MakeDefaultName in that it gives the C++ code
+// referencing a default field from the message scope, rather than just the
+// variable name.
+// For example, declarations of default variables should always use just
+// MakeDefaultName to produce code like:
+// Type _i_give_permission_to_break_this_code_default_field_;
+//
+// Code that references these should use MakeDefaultFieldName, in case the field
+// exists at some nested level like:
+// internal_container_._i_give_permission_to_break_this_code_default_field_;
+inline TProtoStringType MakeDefaultFieldName(const FieldDescriptor* field) {
+ return StrCat("Impl_::", MakeDefaultName(field));
+}
+
+inline TProtoStringType MakeVarintCachedSizeName(const FieldDescriptor* field) {
+ return StrCat("_", FieldName(field), "_cached_byte_size_");
+}
+
+// Semantically distinct from MakeVarintCachedSizeName in that it gives the C++
+// code referencing the object from the message scope, rather than just the
+// variable name.
+// For example, declarations of default variables should always use just
+// MakeVarintCachedSizeName to produce code like:
+// Type _field_cached_byte_size_;
+//
+// Code that references these variables should use
+// MakeVarintCachedSizeFieldName, in case the field exists at some nested level
+// like:
+// internal_container_._field_cached_byte_size_;
+inline TProtoStringType MakeVarintCachedSizeFieldName(const FieldDescriptor* field,
+ bool split) {
+ return StrCat("_impl_.", split ? "_split_->" : "", "_",
+ FieldName(field), "_cached_byte_size_");
+}
+
+// Note: A lot of libraries detect Any protos based on Descriptor::full_name()
+// while the two functions below use FileDescriptor::name(). In a sane world the
+// two approaches should be equivalent. But if you are dealing with descriptors
+// from untrusted sources, you might need to match semantics across libraries.
+bool IsAnyMessage(const FileDescriptor* descriptor, const Options& options);
+bool IsAnyMessage(const Descriptor* descriptor, const Options& options);
+
+bool IsWellKnownMessage(const FileDescriptor* descriptor);
+
+inline TProtoStringType IncludeGuard(const FileDescriptor* file, bool pb_h,
+ bool deps,
+ const Options& options) {
+ // If we are generating a .pb.h file and the proto_h option is enabled, then
+ // the .pb.h gets an extra suffix.
+ TProtoStringType filename_identifier = FilenameIdentifier(
+ file->name() + (deps ? ".deps": "") + (pb_h && options.proto_h ? ".pb.h" : ""));
+
+ if (IsWellKnownMessage(file)) {
+ // For well-known messages we need third_party/protobuf and net/proto2 to
+ // have distinct include guards, because some source files include both and
+ // both need to be defined (the third_party copies will be in the
+ // google::protobuf_opensource namespace).
+ return MacroPrefix(options) + "_INCLUDED_" + filename_identifier;
+ } else {
+ // Ideally this case would use distinct include guards for opensource and
+ // google3 protos also. (The behavior of "first #included wins" is not
+ // ideal). But unfortunately some legacy code includes both and depends on
+ // the identical include guards to avoid compile errors.
+ //
+ // We should clean this up so that this case can be removed.
+ return "GOOGLE_PROTOBUF_INCLUDED_" + filename_identifier;
+ }
+}
+
+// Returns the OptimizeMode for this file, furthermore it updates a status
+// bool if has_opt_codesize_extension is non-null. If this status bool is true
+// it means this file contains an extension that itself is defined as
+// optimized_for = CODE_SIZE.
+FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
+ const Options& options,
+ bool* has_opt_codesize_extension);
+inline FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file,
+ const Options& options) {
+ return GetOptimizeFor(file, options, nullptr);
+}
+inline bool NeedsEagerDescriptorAssignment(const FileDescriptor* file,
+ const Options& options) {
+ bool has_opt_codesize_extension;
+ if (GetOptimizeFor(file, options, &has_opt_codesize_extension) ==
+ FileOptions::CODE_SIZE &&
+ has_opt_codesize_extension) {
+ // If this filedescriptor contains an extension from another file which
+ // is optimized_for = CODE_SIZE. We need to be careful in the ordering so
+ // we eagerly build the descriptors in the dependencies before building
+ // the descriptors of this file.
+ return true;
+ } else {
+ // If we have a generated code based parser we never need eager
+ // initialization of descriptors of our deps.
+ return false;
+ }
+}
+
+// This orders the messages in a .pb.cc as it's outputted by file.cc
+void FlattenMessagesInFile(const FileDescriptor* file,
+ std::vector<const Descriptor*>* result);
+inline std::vector<const Descriptor*> FlattenMessagesInFile(
+ const FileDescriptor* file) {
+ std::vector<const Descriptor*> result;
+ FlattenMessagesInFile(file, &result);
+ return result;
+}
+
+template <typename F>
+void ForEachMessage(const Descriptor* descriptor, F&& func) {
+ for (int i = 0; i < descriptor->nested_type_count(); i++)
+ ForEachMessage(descriptor->nested_type(i), std::forward<F&&>(func));
+ func(descriptor);
+}
+
+template <typename F>
+void ForEachMessage(const FileDescriptor* descriptor, F&& func) {
+ for (int i = 0; i < descriptor->message_type_count(); i++)
+ ForEachMessage(descriptor->message_type(i), std::forward<F&&>(func));
+}
+
+bool HasWeakFields(const Descriptor* desc, const Options& options);
+bool HasWeakFields(const FileDescriptor* desc, const Options& options);
+
+// Returns true if the "required" restriction check should be ignored for the
+// given field.
+inline static bool ShouldIgnoreRequiredFieldCheck(const FieldDescriptor* field,
+ const Options& options) {
+ // Do not check "required" for lazily verified lazy fields.
+ return IsLazilyVerifiedLazy(field, options);
+}
+
+struct MessageAnalysis {
+ bool is_recursive = false;
+ bool contains_cord = false;
+ bool contains_extension = false;
+ bool contains_required = false;
+ bool contains_weak = false; // Implicit weak as well.
+};
+
+// This class is used in FileGenerator, to ensure linear instead of
+// quadratic performance, if we do this per message we would get O(V*(V+E)).
+// Logically this is just only used in message.cc, but in the header for
+// FileGenerator to help share it.
+class PROTOC_EXPORT MessageSCCAnalyzer {
+ public:
+ explicit MessageSCCAnalyzer(const Options& options) : options_(options) {}
+
+ MessageAnalysis GetSCCAnalysis(const SCC* scc);
+
+ bool HasRequiredFields(const Descriptor* descriptor) {
+ MessageAnalysis result = GetSCCAnalysis(GetSCC(descriptor));
+ return result.contains_required || result.contains_extension;
+ }
+ bool HasWeakField(const Descriptor* descriptor) {
+ MessageAnalysis result = GetSCCAnalysis(GetSCC(descriptor));
+ return result.contains_weak;
+ }
+ const SCC* GetSCC(const Descriptor* descriptor) {
+ return analyzer_.GetSCC(descriptor);
+ }
+
+ private:
+ struct DepsGenerator {
+ std::vector<const Descriptor*> operator()(const Descriptor* desc) const {
+ std::vector<const Descriptor*> deps;
+ for (int i = 0; i < desc->field_count(); i++) {
+ if (desc->field(i)->message_type()) {
+ deps.push_back(desc->field(i)->message_type());
+ }
+ }
+ return deps;
+ }
+ };
+ SCCAnalyzer<DepsGenerator> analyzer_;
+ Options options_;
+ std::map<const SCC*, MessageAnalysis> analysis_cache_;
+};
+
+void ListAllFields(const Descriptor* d,
+ std::vector<const FieldDescriptor*>* fields);
+void ListAllFields(const FileDescriptor* d,
+ std::vector<const FieldDescriptor*>* fields);
+
+template <class T>
+void ForEachField(const Descriptor* d, T&& func) {
+ for (int i = 0; i < d->nested_type_count(); i++) {
+ ForEachField(d->nested_type(i), std::forward<T&&>(func));
+ }
+ for (int i = 0; i < d->extension_count(); i++) {
+ func(d->extension(i));
+ }
+ for (int i = 0; i < d->field_count(); i++) {
+ func(d->field(i));
+ }
+}
+
+template <class T>
+void ForEachField(const FileDescriptor* d, T&& func) {
+ for (int i = 0; i < d->message_type_count(); i++) {
+ ForEachField(d->message_type(i), std::forward<T&&>(func));
+ }
+ for (int i = 0; i < d->extension_count(); i++) {
+ func(d->extension(i));
+ }
+}
+
+void ListAllTypesForServices(const FileDescriptor* fd,
+ std::vector<const Descriptor*>* types);
+
+// Indicates whether we should use implicit weak fields for this file.
+bool UsingImplicitWeakFields(const FileDescriptor* file,
+ const Options& options);
+
+// Indicates whether to treat this field as implicitly weak.
+bool IsImplicitWeakField(const FieldDescriptor* field, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer);
+
+inline bool HasSimpleBaseClass(const Descriptor* desc, const Options& options) {
+ if (!HasDescriptorMethods(desc->file(), options)) return false;
+ if (desc->extension_range_count() != 0) return false;
+ if (desc->field_count() == 0) return true;
+ // TODO(jorg): Support additional common message types with only one
+ // or two fields
+ return false;
+}
+
+inline bool HasSimpleBaseClasses(const FileDescriptor* file,
+ const Options& options) {
+ bool v = false;
+ ForEachMessage(file, [&v, &options](const Descriptor* desc) {
+ v |= HasSimpleBaseClass(desc, options);
+ });
+ return v;
+}
+
+inline TProtoStringType SimpleBaseClass(const Descriptor* desc,
+ const Options& options) {
+ if (!HasDescriptorMethods(desc->file(), options)) return "";
+ if (desc->extension_range_count() != 0) return "";
+ if (desc->field_count() == 0) {
+ return "ZeroFieldsBase";
+ }
+ // TODO(jorg): Support additional common message types with only one
+ // or two fields
+ return "";
+}
+
+// Returns true if this message has a _tracker_ field.
+inline bool HasTracker(const Descriptor* desc, const Options& options) {
+ return options.field_listener_options.inject_field_listener_events &&
+ desc->file()->options().optimize_for() !=
+ google::protobuf::FileOptions::LITE_RUNTIME;
+}
+
+// Returns true if this message needs an Impl_ struct for it's data.
+inline bool HasImplData(const Descriptor* desc, const Options& options) {
+ return !HasSimpleBaseClass(desc, options);
+}
+
+// Formatter is a functor class which acts as a closure around printer and
+// the variable map. It's much like printer->Print except it supports both named
+// variables that are substituted using a key value map and direct arguments. In
+// the format string $1$, $2$, etc... are substituted for the first, second, ...
+// direct argument respectively in the format call, it accepts both strings and
+// integers. The implementation verifies all arguments are used and are "first"
+// used in order of appearance in the argument list. For example,
+//
+// Format("return array[$1$];", 3) -> "return array[3];"
+// Format("array[$2$] = $1$;", "Bla", 3) -> FATAL error (wrong order)
+// Format("array[$1$] = $2$;", 3, "Bla") -> "array[3] = Bla;"
+//
+// The arguments can be used more than once like
+//
+// Format("array[$1$] = $2$; // Index = $1$", 3, "Bla") ->
+// "array[3] = Bla; // Index = 3"
+//
+// If you use more arguments use the following style to help the reader,
+//
+// Format("int $1$() {\n"
+// " array[$2$] = $3$;\n"
+// " return $4$;"
+// "}\n",
+// funname, // 1
+// idx, // 2
+// varname, // 3
+// retval); // 4
+//
+// but consider using named variables. Named variables like $foo$, with some
+// identifier foo, are looked up in the map. One additional feature is that
+// spaces are accepted between the '$' delimiters, $ foo$ will
+// substitute to " bar" if foo stands for "bar", but in case it's empty
+// will substitute to "". Hence, for example,
+//
+// Format(vars, "$dllexport $void fun();") -> "void fun();"
+// "__declspec(export) void fun();"
+//
+// which is convenient to prevent double, leading or trailing spaces.
+class PROTOC_EXPORT Formatter {
+ public:
+ explicit Formatter(io::Printer* printer) : printer_(printer) {}
+ Formatter(io::Printer* printer,
+ const std::map<TProtoStringType, TProtoStringType>& vars)
+ : printer_(printer), vars_(vars) {}
+
+ template <typename T>
+ void Set(const TProtoStringType& key, const T& value) {
+ vars_[key] = ToString(value);
+ }
+
+ void AddMap(const std::map<TProtoStringType, TProtoStringType>& vars) {
+ for (const auto& keyval : vars) vars_[keyval.first] = keyval.second;
+ }
+
+ template <typename... Args>
+ void operator()(const char* format, const Args&... args) const {
+ printer_->FormatInternal({ToString(args)...}, vars_, format);
+ }
+
+ void Indent() const { printer_->Indent(); }
+ void Outdent() const { printer_->Outdent(); }
+ io::Printer* printer() const { return printer_; }
+
+ class PROTOC_EXPORT ScopedIndenter {
+ public:
+ explicit ScopedIndenter(Formatter* format) : format_(format) {
+ format_->Indent();
+ }
+ ~ScopedIndenter() { format_->Outdent(); }
+
+ private:
+ Formatter* format_;
+ };
+
+ PROTOBUF_NODISCARD ScopedIndenter ScopedIndent() {
+ return ScopedIndenter(this);
+ }
+ template <typename... Args>
+ PROTOBUF_NODISCARD ScopedIndenter ScopedIndent(const char* format,
+ const Args&&... args) {
+ (*this)(format, static_cast<Args&&>(args)...);
+ return ScopedIndenter(this);
+ }
+
+ class PROTOC_EXPORT SaveState {
+ public:
+ explicit SaveState(Formatter* format)
+ : format_(format), vars_(format->vars_) {}
+ ~SaveState() { format_->vars_.swap(vars_); }
+
+ private:
+ Formatter* format_;
+ std::map<TProtoStringType, TProtoStringType> vars_;
+ };
+
+ private:
+ io::Printer* printer_;
+ std::map<TProtoStringType, TProtoStringType> vars_;
+
+ // Convenience overloads to accept different types as arguments.
+ static TProtoStringType ToString(const TProtoStringType& s) { return s; }
+ template <typename I, typename = typename std::enable_if<
+ std::is_integral<I>::value>::type>
+ static TProtoStringType ToString(I x) {
+ return StrCat(x);
+ }
+ static TProtoStringType ToString(strings::Hex x) { return StrCat(x); }
+ static TProtoStringType ToString(const FieldDescriptor* d) { return Payload(d); }
+ static TProtoStringType ToString(const Descriptor* d) { return Payload(d); }
+ static TProtoStringType ToString(const EnumDescriptor* d) { return Payload(d); }
+ static TProtoStringType ToString(const EnumValueDescriptor* d) {
+ return Payload(d);
+ }
+ static TProtoStringType ToString(const OneofDescriptor* d) { return Payload(d); }
+
+ template <typename Descriptor>
+ static TProtoStringType Payload(const Descriptor* descriptor) {
+ std::vector<int> path;
+ descriptor->GetLocationPath(&path);
+ GeneratedCodeInfo::Annotation annotation;
+ for (int index : path) {
+ annotation.add_path(index);
+ }
+ annotation.set_source_file(descriptor->file()->name());
+ return annotation.SerializeAsString();
+ }
+};
+
+template <class T>
+void PrintFieldComment(const Formatter& format, const T* field) {
+ // Print the field's (or oneof's) proto-syntax definition as a comment.
+ // We don't want to print group bodies so we cut off after the first
+ // line.
+ DebugStringOptions options;
+ options.elide_group_body = true;
+ options.elide_oneof_body = true;
+ TProtoStringType def = field->DebugStringWithOptions(options);
+ format("// $1$\n", def.substr(0, def.find_first_of('\n')));
+}
+
+class PROTOC_EXPORT NamespaceOpener {
+ public:
+ explicit NamespaceOpener(const Formatter& format)
+ : printer_(format.printer()) {}
+ NamespaceOpener(const TProtoStringType& name, const Formatter& format)
+ : NamespaceOpener(format) {
+ ChangeTo(name);
+ }
+ ~NamespaceOpener() { ChangeTo(""); }
+
+ void ChangeTo(const TProtoStringType& name) {
+ std::vector<TProtoStringType> new_stack_ =
+ Split(name, "::", true);
+ size_t len = std::min(name_stack_.size(), new_stack_.size());
+ size_t common_idx = 0;
+ while (common_idx < len) {
+ if (name_stack_[common_idx] != new_stack_[common_idx]) break;
+ common_idx++;
+ }
+ for (auto it = name_stack_.crbegin();
+ it != name_stack_.crend() - common_idx; ++it) {
+ if (*it == "PROTOBUF_NAMESPACE_ID") {
+ printer_->Print("PROTOBUF_NAMESPACE_CLOSE\n");
+ } else {
+ printer_->Print("} // namespace $ns$\n", "ns", *it);
+ }
+ }
+ name_stack_.swap(new_stack_);
+ for (size_t i = common_idx; i < name_stack_.size(); ++i) {
+ if (name_stack_[i] == "PROTOBUF_NAMESPACE_ID") {
+ printer_->Print("PROTOBUF_NAMESPACE_OPEN\n");
+ } else {
+ printer_->Print("namespace $ns$ {\n", "ns", name_stack_[i]);
+ }
+ }
+ }
+
+ private:
+ io::Printer* printer_;
+ std::vector<TProtoStringType> name_stack_;
+};
+
+enum class Utf8CheckMode {
+ kStrict = 0, // Parsing will fail if non UTF-8 data is in string fields.
+ kVerify = 1, // Only log an error but parsing will succeed.
+ kNone = 2, // No UTF-8 check.
+};
+
+Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field,
+ const Options& options);
+
+void GenerateUtf8CheckCodeForString(const FieldDescriptor* field,
+ const Options& options, bool for_parse,
+ const char* parameters,
+ const Formatter& format);
+
+void GenerateUtf8CheckCodeForCord(const FieldDescriptor* field,
+ const Options& options, bool for_parse,
+ const char* parameters,
+ const Formatter& format);
+
+template <typename T>
+struct FieldRangeImpl {
+ struct Iterator {
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = const FieldDescriptor*;
+ using difference_type = int;
+
+ value_type operator*() { return descriptor->field(idx); }
+
+ friend bool operator==(const Iterator& a, const Iterator& b) {
+ GOOGLE_DCHECK(a.descriptor == b.descriptor);
+ return a.idx == b.idx;
+ }
+ friend bool operator!=(const Iterator& a, const Iterator& b) {
+ return !(a == b);
+ }
+
+ Iterator& operator++() {
+ idx++;
+ return *this;
+ }
+
+ int idx;
+ const T* descriptor;
+ };
+
+ Iterator begin() const { return {0, descriptor}; }
+ Iterator end() const { return {descriptor->field_count(), descriptor}; }
+
+ const T* descriptor;
+};
+
+template <typename T>
+FieldRangeImpl<T> FieldRange(const T* desc) {
+ return {desc};
+}
+
+struct OneOfRangeImpl {
+ struct Iterator {
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = const OneofDescriptor*;
+ using difference_type = int;
+
+ value_type operator*() { return descriptor->oneof_decl(idx); }
+
+ friend bool operator==(const Iterator& a, const Iterator& b) {
+ GOOGLE_DCHECK(a.descriptor == b.descriptor);
+ return a.idx == b.idx;
+ }
+ friend bool operator!=(const Iterator& a, const Iterator& b) {
+ return !(a == b);
+ }
+
+ Iterator& operator++() {
+ idx++;
+ return *this;
+ }
+
+ int idx;
+ const Descriptor* descriptor;
+ };
+
+ Iterator begin() const { return {0, descriptor}; }
+ Iterator end() const {
+ return {descriptor->real_oneof_decl_count(), descriptor};
+ }
+
+ const Descriptor* descriptor;
+};
+
+inline OneOfRangeImpl OneOfRange(const Descriptor* desc) { return {desc}; }
+
+PROTOC_EXPORT TProtoStringType StripProto(const TProtoStringType& filename);
+
+bool EnableMessageOwnedArena(const Descriptor* desc, const Options& options);
+
+bool EnableMessageOwnedArenaTrial(const Descriptor* desc,
+ const Options& options);
+
+bool ShouldVerify(const Descriptor* descriptor, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer);
+bool ShouldVerify(const FileDescriptor* file, const Options& options,
+ MessageSCCAnalyzer* scc_analyzer);
+
+// Indicates whether to use predefined verify methods for a given message. If a
+// message is "simple" and needs no special verification per field (e.g. message
+// field, repeated packed, UTF8 string, etc.), we can use either VerifySimple or
+// VerifySimpleAlwaysCheckInt32 methods as all verification can be done based on
+// the wire type.
+//
+// Otherwise, we need "custom" verify methods tailored to a message to pass
+// which field needs a special verification; i.e. InternalVerify.
+enum class VerifySimpleType {
+ kSimpleInt32Never, // Use VerifySimple
+ kSimpleInt32Always, // Use VerifySimpleAlwaysCheckInt32
+ kCustom, // Use InternalVerify and check only for int32
+ kCustomInt32Never, // Use InternalVerify but never check for int32
+ kCustomInt32Always, // Use InternalVerify and always check for int32
+};
+
+// Returns VerifySimpleType if messages can be verified by predefined methods.
+VerifySimpleType ShouldVerifySimple(const Descriptor* descriptor);
+
+bool IsUtf8String(const FieldDescriptor* field);
+
+bool HasMessageFieldOrExtension(const Descriptor* desc);
+
+} // namespace cpp
+} // namespace compiler
+} // namespace protobuf
+} // namespace google
+
+#include <google/protobuf/port_undef.inc>
+
+#endif // GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_map_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/map_field.cc
index 4d3e00ac89..ba363f5267 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_map_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/map_field.cc
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/cpp/cpp_map_field.h>
+#include <google/protobuf/compiler/cpp/map_field.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
@@ -136,6 +136,7 @@ void MapFieldGenerator::GenerateInlineAccessorDefinitions(
"}\n"
"inline ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >*\n"
"$classname$::_internal_mutable_$name$() {\n"
+ "$maybe_prepare_split_message$"
" return $field$.MutableMap();\n"
"}\n"
"inline ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >*\n"
@@ -153,7 +154,7 @@ void MapFieldGenerator::GenerateClearingCode(io::Printer* printer) const {
void MapFieldGenerator::GenerateMergingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$field$.MergeFrom(from.$field$);\n");
+ format("_this->$field$.MergeFrom(from.$field$);\n");
}
void MapFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
@@ -226,8 +227,7 @@ void MapFieldGenerator::GenerateSerializeWithCachedSizesToArray(
format);
}
}
- format(
- "};\n");
+ format("};\n");
}
format(
@@ -271,21 +271,48 @@ void MapFieldGenerator::GenerateIsInitialized(io::Printer* printer) const {
"false;\n");
}
-void MapFieldGenerator::GenerateConstinitInitializer(
+void MapFieldGenerator::GenerateConstexprAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
if (HasDescriptorMethods(descriptor_->file(), options_)) {
- format("$name$_(::$proto_ns$::internal::ConstantInitialized{})");
+ format("/*decltype($field$)*/{::_pbi::ConstantInitialized()}");
} else {
- format("$name$_()");
+ format("/*decltype($field$)*/{}");
+ }
+}
+
+void MapFieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ // MapField has no move constructor, which prevents explicit aggregate
+ // initialization pre-C++17.
+ format("/*decltype($field$)*/{}");
+}
+
+void MapFieldGenerator::GenerateAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ if (ShouldSplit(descriptor_, options_)) {
+ format(
+ "/*decltype($classname$::Split::$name$_)*/"
+ "{::_pbi::ArenaInitialized(), arena}");
+ return;
}
+ // MapField has no move constructor.
+ format("/*decltype($field$)*/{::_pbi::ArenaInitialized(), arena}");
}
void MapFieldGenerator::GenerateDestructorCode(io::Printer* printer) const {
GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
Formatter format(printer, variables_);
+ if (ShouldSplit(descriptor_, options_)) {
+ format("$cached_split_ptr$->$name$_.Destruct();\n");
+ format("$cached_split_ptr$->$name$_.~MapField$lite$();\n");
+ return;
+ }
format("$field$.Destruct();\n");
+ format("$field$.~MapField$lite$();\n");
}
void MapFieldGenerator::GenerateArenaDestructorCode(
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_map_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/map_field.h
index 9e71267c0f..678a128bd1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_map_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/map_field.h
@@ -34,8 +34,8 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_message_field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/message_field.h>
namespace google {
namespace protobuf {
@@ -61,7 +61,10 @@ class MapFieldGenerator : public FieldGenerator {
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
void GenerateIsInitialized(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
void GenerateDestructorCode(io::Printer* printer) const override;
void GenerateArenaDestructorCode(io::Printer* printer) const override;
ArenaDtorNeeds NeedsArenaDestructor() const override;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message.cc
index a56c6fbda1..77702a68df 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_message.h>
+#include <google/protobuf/compiler/cpp/message.h>
#include <algorithm>
#include <cstdint>
@@ -51,13 +51,14 @@
#include <google/protobuf/map_entry_lite.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
+#include <google/protobuf/stubs/stringprintf.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/cpp/cpp_enum.h>
-#include <google/protobuf/compiler/cpp/cpp_extension.h>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_padding_optimizer.h>
-#include <google/protobuf/compiler/cpp/cpp_parse_function_generator.h>
+#include <google/protobuf/compiler/cpp/enum.h>
+#include <google/protobuf/compiler/cpp/extension.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/padding_optimizer.h>
+#include <google/protobuf/compiler/cpp/parse_function_generator.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/stubs/hash.h>
@@ -83,7 +84,7 @@ static constexpr int kNoHasbit = -1;
// masks must be non-zero.
TProtoStringType ConditionalToCheckBitmasks(
const std::vector<arc_ui32>& masks, bool return_success = true,
- StringPiece has_bits_var = "_has_bits_") {
+ StringPiece has_bits_var = "_impl_._has_bits_") {
std::vector<TProtoStringType> parts;
for (int i = 0; i < masks.size(); i++) {
if (masks[i] == 0) continue;
@@ -345,10 +346,10 @@ bool IsRequired(const std::vector<const FieldDescriptor*>& v) {
return v.front()->is_required();
}
-bool HasSingularString(const Descriptor* desc, const Options& options) {
+bool HasNonSplitOptionalString(const Descriptor* desc, const Options& options) {
for (const auto* field : FieldRange(desc)) {
if (IsString(field, options) && !field->is_repeated() &&
- !field->real_containing_oneof()) {
+ !field->real_containing_oneof() && !ShouldSplit(field, options)) {
return true;
}
}
@@ -403,7 +404,7 @@ static int popcnt(arc_ui32 n) {
class ColdChunkSkipper {
public:
ColdChunkSkipper(
- const Options& options,
+ const Descriptor* descriptor, const Options& options,
const std::vector<std::vector<const FieldDescriptor*>>& chunks,
const std::vector<int>& has_bit_indices, const double cold_threshold)
: chunks_(chunks),
@@ -411,7 +412,7 @@ class ColdChunkSkipper {
access_info_map_(options.access_info_map),
cold_threshold_(cold_threshold) {
SetCommonVars(options, &variables_);
- SetCommonMessageDataVariables(&variables_);
+ SetCommonMessageDataVariables(descriptor, &variables_);
}
// May open an external if check for a batch of cold fields. "from" is the
@@ -495,7 +496,7 @@ void ColdChunkSkipper::OnStartChunk(int chunk, int cached_has_word_index,
if (this_word == cached_has_word_index) {
format("(cached_has_bits & 0x$mask$u) != 0");
} else {
- format("($1$_has_bits_[$2$] & 0x$mask$u) != 0", from, this_word);
+ format("($1$_impl_._has_bits_[$2$] & 0x$mask$u) != 0", from, this_word);
}
}
format(")) {\n");
@@ -547,9 +548,7 @@ void GenerateExtensionAnnotations(
for (const auto& annotation : accessor_annotations_to_hooks) {
(*variables)[annotation.first] = "";
}
- if (!options.field_listener_options.inject_field_listener_events ||
- descriptor->file()->options().optimize_for() ==
- google::protobuf::FileOptions::LITE_RUNTIME) {
+ if (!HasTracker(descriptor, options)) {
return;
}
StringPiece tracker = (*variables)["tracker"];
@@ -617,7 +616,7 @@ MessageGenerator::MessageGenerator(
if (!message_layout_helper_) {
message_layout_helper_.reset(new PaddingOptimizer());
}
- SetCommonMessageDataVariables(&variables_);
+ SetCommonMessageDataVariables(descriptor, &variables_);
// Variables that apply to this class
variables_["classname"] = classname_;
@@ -630,9 +629,7 @@ MessageGenerator::MessageGenerator(
variables_["annotate_bytesize"] = "";
variables_["annotate_mergefrom"] = "";
- if (options.field_listener_options.inject_field_listener_events &&
- descriptor->file()->options().optimize_for() !=
- google::protobuf::FileOptions::LITE_RUNTIME) {
+ if (HasTracker(descriptor_, options_)) {
const TProtoStringType injector_template =
StrCat(" ", variables_["tracker"], ".");
@@ -649,7 +646,7 @@ MessageGenerator::MessageGenerator(
MaySetAnnotationVariable(options, "bytesize", injector_template,
"OnByteSize(this);\n", &variables_);
MaySetAnnotationVariable(options, "mergefrom", injector_template,
- "OnMergeFrom(this, &from);\n", &variables_);
+ "OnMergeFrom(_this, &from);\n", &variables_);
}
GenerateExtensionAnnotations(descriptor_, options_, &variables_);
@@ -1205,6 +1202,9 @@ void MessageGenerator::GenerateFieldClear(const FieldDescriptor* field,
format.Outdent();
format("}\n");
} else {
+ if (ShouldSplit(field, options_)) {
+ format("if (IsSplitMessageDefault()) return;\n");
+ }
field_generators_.get(field).GenerateClearingCode(format.printer());
if (HasHasbit(field)) {
int has_bit_index = HasBitIndex(field);
@@ -1245,13 +1245,12 @@ void MessageGenerator::GenerateFieldAccessorDefinitions(io::Printer* printer) {
} else {
format(
"inline int $classname$::_internal_$name$_size() const {\n"
- " return $1$$2$.size();\n"
+ " return $field$$1$.size();\n"
"}\n"
"inline int $classname$::$name$_size() const {\n"
"$annotate_size$"
" return _internal_$name$_size();\n"
"}\n",
- FieldMemberName(field),
IsImplicitWeakField(field, options_, scc_analyzer_) &&
field->message_type()
? ".weak"
@@ -1398,6 +1397,11 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format(
"inline $classname$() : $classname$("
"::$proto_ns$::Arena::InternalCreateMessageOwnedArena(), true) {}\n");
+ } else if (EnableMessageOwnedArenaTrial(descriptor_, options_)) {
+ format(
+ "inline $classname$() : $classname$(InMoaTrial() ? "
+ "::$proto_ns$::Arena::InternalCreateMessageOwnedArena() : nullptr, "
+ "InMoaTrial()) {}\n");
} else {
format("inline $classname$() : $classname$(nullptr) {}\n");
}
@@ -1510,11 +1514,13 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
if (HasDescriptorMethods(descriptor_->file(), options_)) {
format(
"bool PackFrom(const ::$proto_ns$::Message& message) {\n"
+ " $DCHK$_NE(&message, this);\n"
" return $any_metadata$.PackFrom(GetArena(), message);\n"
"}\n"
"bool PackFrom(const ::$proto_ns$::Message& message,\n"
" ::PROTOBUF_NAMESPACE_ID::ConstStringParam "
"type_url_prefix) {\n"
+ " $DCHK$_NE(&message, this);\n"
" return $any_metadata$.PackFrom(GetArena(), message, "
"type_url_prefix);\n"
"}\n"
@@ -1618,27 +1624,28 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
// argument is a generic Message instance, and only define the
// custom MergeFrom and CopyFrom instances when the source of the
// merge/copy is known to be the same class as the destination.
- // TODO(jorg): Define MergeFrom in terms of MergeImpl, rather than
- // the other way around, to save even more code size.
"using $superclass$::CopyFrom;\n"
"void CopyFrom(const $classname$& from);\n"
""
"using $superclass$::MergeFrom;\n"
- "void MergeFrom(const $classname$& from);\n"
+ "void MergeFrom("
+ " const $classname$& from) {\n"
+ " $classname$::MergeImpl(*this, from);\n"
+ "}\n"
"private:\n"
- "static void MergeImpl(::$proto_ns$::Message* to, const "
- "::$proto_ns$::Message& from);\n"
+ "static void MergeImpl(::$proto_ns$::Message& to_msg, const "
+ "::$proto_ns$::Message& from_msg);\n"
"public:\n");
} else {
format(
"using $superclass$::CopyFrom;\n"
"inline void CopyFrom(const $classname$& from) {\n"
- " $superclass$::CopyImpl(this, from);\n"
+ " $superclass$::CopyImpl(*this, from);\n"
"}\n"
""
"using $superclass$::MergeFrom;\n"
"void MergeFrom(const $classname$& from) {\n"
- " $superclass$::MergeImpl(this, from);\n"
+ " $superclass$::MergeImpl(*this, from);\n"
"}\n"
"public:\n");
}
@@ -1676,7 +1683,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"int GetCachedSize() const final { return "
"$cached_size$.Get(); }"
"\n\nprivate:\n"
- "void SharedCtor();\n"
+ "void SharedCtor(::$proto_ns$::Arena* arena, bool is_message_owned);\n"
"void SharedDtor();\n"
"void SetCachedSize(int size) const$ full_final$;\n"
"void InternalSwap($classname$* other);\n");
@@ -1747,6 +1754,17 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"\n");
}
+ if (ShouldSplit(descriptor_, options_)) {
+ format(
+ "private:\n"
+ "inline bool IsSplitMessageDefault() const {\n"
+ " return $split$ == reinterpret_cast<Impl_::Split*>(&$1$);\n"
+ "}\n"
+ "PROTOBUF_NOINLINE void PrepareSplitMessageForWrite();\n"
+ "public:\n",
+ DefaultInstanceName(descriptor_, options_, /*split=*/true));
+ }
+
format(
"// nested types ----------------------------------------------------\n"
"\n");
@@ -1837,12 +1855,21 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
: StrCat("::$proto_ns$::internal::HasBits<",
sizeof_has_bits, "> _has_bits_;\n");
+ format(
+ "template <typename T> friend class "
+ "::$proto_ns$::Arena::InternalHelper;\n"
+ "typedef void InternalArenaConstructable_;\n"
+ "typedef void DestructorSkippable_;\n");
+
// To minimize padding, data members are divided into three sections:
// (1) members assumed to align to 8 bytes
// (2) members corresponding to message fields, re-ordered to optimize
// alignment.
// (3) members assumed to align to 4 bytes.
+ format("struct Impl_ {\n");
+ format.Indent();
+
// Members assumed to align to 8 bytes:
if (descriptor_->extension_range_count() > 0) {
@@ -1851,9 +1878,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"\n");
}
- if (options_.field_listener_options.inject_field_listener_events &&
- descriptor_->file()->options().optimize_for() !=
- google::protobuf::FileOptions::LITE_RUNTIME) {
+ if (HasTracker(descriptor_, options_)) {
format("static ::$proto_ns$::AccessListener<$1$> _tracker_;\n",
ClassName(descriptor_));
}
@@ -1866,12 +1891,6 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
InlinedStringDonatedSize());
}
- format(
- "template <typename T> friend class "
- "::$proto_ns$::Arena::InternalHelper;\n"
- "typedef void InternalArenaConstructable_;\n"
- "typedef void DestructorSkippable_;\n");
-
if (!has_bit_indices_.empty()) {
// _has_bits_ is frequently accessed, so to reduce code size and improve
// speed, it should be close to the start of the object. Placing
@@ -1890,7 +1909,24 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
for (auto field : optimized_order_) {
const FieldGenerator& generator = field_generators_.get(field);
generator.GenerateStaticMembers(printer);
- generator.GeneratePrivateMembers(printer);
+ if (!ShouldSplit(field, options_)) {
+ generator.GeneratePrivateMembers(printer);
+ }
+ }
+ if (ShouldSplit(descriptor_, options_)) {
+ format("struct Split {\n");
+ format.Indent();
+ for (auto field : optimized_order_) {
+ if (!ShouldSplit(field, options_)) continue;
+ const FieldGenerator& generator = field_generators_.get(field);
+ generator.GeneratePrivateMembers(printer);
+ }
+ format.Outdent();
+ format(
+ " typedef void InternalArenaConstructable_;\n"
+ " typedef void DestructorSkippable_;\n"
+ "};\n"
+ "Split* _split_;\n");
}
// For each oneof generate a union
@@ -1941,6 +1977,22 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format("::$proto_ns$::internal::AnyMetadata _any_metadata_;\n");
}
+ format.Outdent();
+ format("};\n");
+
+ // Only create the _impl_ field if it contains data.
+ if (HasImplData(descriptor_, options_)) {
+ format("union { Impl_ _impl_; };\n");
+ }
+
+ if (ShouldSplit(descriptor_, options_)) {
+ format(
+ "static Impl_::Split* CreateSplitMessage("
+ "::$proto_ns$::Arena* arena);\n");
+ format("friend struct $1$;\n",
+ DefaultInstanceType(descriptor_, options_, /*split=*/true));
+ }
+
// The TableStruct struct needs access to the private parts, in order to
// construct the offsets of all members.
format("friend struct ::$tablename$;\n");
@@ -2080,7 +2132,8 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
format("};\n\n");
for (auto field : FieldRange(descriptor_)) {
if (!IsFieldStripped(field, options_)) {
- field_generators_.get(field).GenerateInternalAccessorDefinitions(printer);
+ field_generators_.get(field).GenerateInternalAccessorDefinitions(
+ printer);
}
}
@@ -2130,7 +2183,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
GenerateMergeFrom(printer);
format("\n");
- GenerateClassSpecificMergeFrom(printer);
+ GenerateClassSpecificMergeImpl(printer);
format("\n");
GenerateCopyFrom(printer);
@@ -2140,6 +2193,15 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
format("\n");
}
+ if (ShouldSplit(descriptor_, options_)) {
+ format(
+ "void $classname$::PrepareSplitMessageForWrite() {\n"
+ " if (IsSplitMessageDefault()) {\n"
+ " $split$ = CreateSplitMessage(GetArenaForAllocation());\n"
+ " }\n"
+ "}\n");
+ }
+
GenerateVerify(printer);
GenerateSwap(printer);
@@ -2172,9 +2234,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
"\n");
}
- if (options_.field_listener_options.inject_field_listener_events &&
- descriptor_->file()->options().optimize_for() !=
- google::protobuf::FileOptions::LITE_RUNTIME) {
+ if (HasTracker(descriptor_, options_)) {
format(
"::$proto_ns$::AccessListener<$classtype$> "
"$1$::$tracker$(&FullMessageName);\n",
@@ -2230,7 +2290,11 @@ std::pair<size_t, size_t> MessageGenerator::GenerateOffsets(
// Don't use the top bit because that is for unused fields.
format("::_pbi::kInvalidFieldOffsetTag");
} else {
- format("PROTOBUF_FIELD_OFFSET($classtype$, $1$)", FieldMemberName(field));
+ format("PROTOBUF_FIELD_OFFSET($classtype$$1$, $2$)",
+ ShouldSplit(field, options_) ? "::Impl_::Split" : "",
+ ShouldSplit(field, options_)
+ ? FieldName(field) + "_"
+ : FieldMemberName(field, /*cold=*/false));
}
// Some information about a field is in the pdproto profile. The profile is
@@ -2250,7 +2314,7 @@ std::pair<size_t, size_t> MessageGenerator::GenerateOffsets(
int count = 0;
for (auto oneof : OneOfRange(descriptor_)) {
- format("PROTOBUF_FIELD_OFFSET($classtype$, $1$_),\n", oneof->name());
+ format("PROTOBUF_FIELD_OFFSET($classtype$, _impl_.$1$_),\n", oneof->name());
count++;
}
GOOGLE_CHECK_EQ(count, descriptor_->real_oneof_decl_count());
@@ -2286,18 +2350,181 @@ void MessageGenerator::GenerateSharedConstructorCode(io::Printer* printer) {
if (HasSimpleBaseClass(descriptor_, options_)) return;
Formatter format(printer, variables_);
- format("inline void $classname$::SharedCtor() {\n");
+ format(
+ "inline void $classname$::SharedCtor(\n"
+ " ::_pb::Arena* arena, bool is_message_owned) {\n"
+ " (void)arena;\n"
+ " (void)is_message_owned;\n");
- std::vector<bool> processed(optimized_order_.size(), false);
- GenerateConstructorBody(printer, processed, false);
+ format.Indent();
+ // Impl_ _impl_.
+ format("new (&_impl_) Impl_{");
+ format.Indent();
+ const char* field_sep = " ";
+ const auto put_sep = [&] {
+ format("\n$1$ ", field_sep);
+ field_sep = ",";
+ };
+
+ // Note: any fields without move/copy constructors can't be explicitly
+ // aggregate initialized pre-C++17.
+ if (descriptor_->extension_range_count() > 0) {
+ put_sep();
+ format("/*decltype($extensions$)*/{::_pbi::ArenaInitialized(), arena}");
+ }
+ if (!inlined_string_indices_.empty()) {
+ put_sep();
+ format("decltype($inlined_string_donated_array$){}");
+ }
+ bool need_to_emit_cached_size = !HasSimpleBaseClass(descriptor_, options_);
+ if (!has_bit_indices_.empty()) {
+ put_sep();
+ format("decltype($has_bits$){}");
+ if (need_to_emit_cached_size) {
+ put_sep();
+ format("/*decltype($cached_size$)*/{}");
+ need_to_emit_cached_size = false;
+ }
+ }
+
+ // Initialize member variables with arena constructor.
+ for (auto field : optimized_order_) {
+ GOOGLE_DCHECK(!IsFieldStripped(field, options_));
+ if (ShouldSplit(field, options_)) {
+ continue;
+ }
+ put_sep();
+ field_generators_.get(field).GenerateAggregateInitializer(printer);
+ }
+ if (ShouldSplit(descriptor_, options_)) {
+ put_sep();
+ format("decltype($split$){reinterpret_cast<Impl_::Split*>(&$1$)}",
+ DefaultInstanceName(descriptor_, options_, /*split=*/true));
+ }
+ for (auto oneof : OneOfRange(descriptor_)) {
+ put_sep();
+ format("decltype(_impl_.$1$_){}", oneof->name());
+ }
+
+ if (need_to_emit_cached_size) {
+ put_sep();
+ format("/*decltype($cached_size$)*/{}");
+ }
+
+ if (descriptor_->real_oneof_decl_count() != 0) {
+ put_sep();
+ format("/*decltype($oneof_case$)*/{}");
+ }
+ if (num_weak_fields_ > 0) {
+ put_sep();
+ format("decltype($weak_field_map$){arena}");
+ }
+ if (IsAnyMessage(descriptor_, options_)) {
+ put_sep();
+ // AnyMetadata has no move constructor.
+ format("/*decltype($any_metadata$)*/{&_impl_.type_url_, &_impl_.value_}");
+ }
+
+ format.Outdent();
+ format("\n};\n");
+
+ if (!inlined_string_indices_.empty()) {
+ // Donate inline string fields.
+ format.Indent();
+ // The last bit is the tracking bit for registering ArenaDtor. The bit is 1
+ // means ArenaDtor is not registered on construction, and on demand register
+ // is needed.
+ format("if (arena != nullptr) {\n");
+ if (NeedsArenaDestructor() == ArenaDtorNeeds::kOnDemand) {
+ format(
+ " if (!is_message_owned) {\n"
+ " $inlined_string_donated_array$[0] = ~0u;\n"
+ " } else {\n"
+ // We should not register ArenaDtor for MOA.
+ " $inlined_string_donated_array$[0] = 0xFFFFFFFEu;\n"
+ " }\n");
+ } else {
+ format(" $inlined_string_donated_array$[0] = 0xFFFFFFFEu;\n");
+ }
+ for (size_t i = 1; i < InlinedStringDonatedSize(); ++i) {
+ format(" $inlined_string_donated_array$[$1$] = ~0u;\n", i);
+ }
+ format("}\n");
+ format.Outdent();
+ }
+
+ for (const FieldDescriptor* field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ continue;
+ }
+ field_generators_.get(field).GenerateConstructorCode(printer);
+ }
for (auto oneof : OneOfRange(descriptor_)) {
format("clear_has_$1$();\n", oneof->name());
}
+ format.Outdent();
format("}\n\n");
}
+void MessageGenerator::GenerateCreateSplitMessage(io::Printer* printer) {
+ Formatter format(printer, variables_);
+ format(
+ "$classname$::Impl_::Split* "
+ "$classname$::CreateSplitMessage(::$proto_ns$::Arena* arena) {\n");
+ format.Indent();
+ const char* field_sep = " ";
+ const auto put_sep = [&] {
+ format("\n$1$ ", field_sep);
+ field_sep = ",";
+ };
+ format(
+ "const size_t size = sizeof(Impl_::Split);\n"
+ "void* chunk = (arena == nullptr) ?\n"
+ " ::operator new(size) :\n"
+ " arena->AllocateAligned(size, alignof(Impl_::Split));\n"
+ "Impl_::Split* ptr = reinterpret_cast<Impl_::Split*>(chunk);\n"
+ "new (ptr) Impl_::Split{");
+ format.Indent();
+ for (const FieldDescriptor* field : optimized_order_) {
+ GOOGLE_DCHECK(!IsFieldStripped(field, options_));
+ if (ShouldSplit(field, options_)) {
+ put_sep();
+ field_generators_.get(field).GenerateAggregateInitializer(printer);
+ }
+ }
+ format.Outdent();
+ format("};\n");
+ for (const FieldDescriptor* field : optimized_order_) {
+ GOOGLE_DCHECK(!IsFieldStripped(field, options_));
+ if (ShouldSplit(field, options_)) {
+ field_generators_.get(field).GenerateCreateSplitMessageCode(printer);
+ }
+ }
+ format("return ptr;\n");
+ format.Outdent();
+ format("}\n");
+}
+
+void MessageGenerator::GenerateInitDefaultSplitInstance(io::Printer* printer) {
+ if (!ShouldSplit(descriptor_, options_)) return;
+
+ Formatter format(printer, variables_);
+ const char* field_sep = " ";
+ const auto put_sep = [&] {
+ format("\n$1$ ", field_sep);
+ field_sep = ",";
+ };
+ for (const auto* field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ put_sep();
+ field_generators_.get(field).GenerateConstexprAggregateInitializer(
+ printer);
+ }
+ }
+}
+
void MessageGenerator::GenerateSharedDestructorCode(io::Printer* printer) {
if (HasSimpleBaseClass(descriptor_, options_)) return;
Formatter format(printer, variables_);
@@ -2305,11 +2532,32 @@ void MessageGenerator::GenerateSharedDestructorCode(io::Printer* printer) {
format("inline void $classname$::SharedDtor() {\n");
format.Indent();
format("$DCHK$(GetArenaForAllocation() == nullptr);\n");
+
+ if (descriptor_->extension_range_count() > 0) {
+ format("$extensions$.~ExtensionSet();\n");
+ }
+
// Write the destructors for each field except oneof members.
// optimized_order_ does not contain oneof fields.
for (auto field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ continue;
+ }
field_generators_.get(field).GenerateDestructorCode(printer);
}
+ if (ShouldSplit(descriptor_, options_)) {
+ format("if (!IsSplitMessageDefault()) {\n");
+ format.Indent();
+ format("auto* $cached_split_ptr$ = $split$;\n");
+ for (auto field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ field_generators_.get(field).GenerateDestructorCode(printer);
+ }
+ }
+ format("delete $cached_split_ptr$;\n");
+ format.Outdent();
+ format("}\n");
+ }
// Generate code to destruct oneofs. Clearing should do the work.
for (auto oneof : OneOfRange(descriptor_)) {
@@ -2323,6 +2571,11 @@ void MessageGenerator::GenerateSharedDestructorCode(io::Printer* printer) {
if (num_weak_fields_) {
format("$weak_field_map$.ClearAll();\n");
}
+
+ if (IsAnyMessage(descriptor_, options_)) {
+ format("$any_metadata$.~AnyMetadata();\n");
+ }
+
format.Outdent();
format(
"}\n"
@@ -2358,10 +2611,23 @@ void MessageGenerator::GenerateArenaDestructorCode(io::Printer* printer) {
// Process non-oneof fields first.
for (auto field : optimized_order_) {
- if (IsFieldStripped(field, options_)) continue;
+ if (IsFieldStripped(field, options_) || ShouldSplit(field, options_))
+ continue;
const FieldGenerator& fg = field_generators_.get(field);
fg.GenerateArenaDestructorCode(printer);
}
+ if (ShouldSplit(descriptor_, options_)) {
+ format("if (!_this->IsSplitMessageDefault()) {\n");
+ format.Indent();
+ for (auto field : optimized_order_) {
+ if (IsFieldStripped(field, options_) || !ShouldSplit(field, options_))
+ continue;
+ const FieldGenerator& fg = field_generators_.get(field);
+ fg.GenerateArenaDestructorCode(printer);
+ }
+ format.Outdent();
+ format("}\n");
+ }
// Process oneof fields.
for (auto oneof : OneOfRange(descriptor_)) {
@@ -2378,72 +2644,118 @@ void MessageGenerator::GenerateArenaDestructorCode(io::Printer* printer) {
void MessageGenerator::GenerateConstexprConstructor(io::Printer* printer) {
Formatter format(printer, variables_);
+ if (IsMapEntryMessage(descriptor_) || !HasImplData(descriptor_, options_)) {
+ format(
+ "PROTOBUF_CONSTEXPR $classname$::$classname$(\n"
+ " ::_pbi::ConstantInitialized) {}\n");
+ return;
+ }
+
format(
"PROTOBUF_CONSTEXPR $classname$::$classname$(\n"
" ::_pbi::ConstantInitialized)");
+
+ bool need_to_emit_cached_size = !HasSimpleBaseClass(descriptor_, options_);
+ format(": _impl_{");
format.Indent();
- const char* field_sep = ":";
+ const char* field_sep = " ";
const auto put_sep = [&] {
format("\n$1$ ", field_sep);
field_sep = ",";
};
-
- if (!IsMapEntryMessage(descriptor_)) {
- // Process non-oneof fields first.
- for (auto field : optimized_order_) {
- auto& gen = field_generators_.get(field);
+ if (descriptor_->extension_range_count() > 0) {
+ put_sep();
+ format("/*decltype($extensions$)*/{}");
+ }
+ if (!inlined_string_indices_.empty()) {
+ put_sep();
+ format("/*decltype($inlined_string_donated_array$)*/{}");
+ }
+ if (!has_bit_indices_.empty()) {
+ put_sep();
+ format("/*decltype($has_bits$)*/{}");
+ if (need_to_emit_cached_size) {
put_sep();
- gen.GenerateConstinitInitializer(printer);
+ format("/*decltype($cached_size$)*/{}");
+ need_to_emit_cached_size = false;
}
-
- if (IsAnyMessage(descriptor_, options_)) {
- put_sep();
- format("_any_metadata_(&type_url_, &value_)");
+ }
+ for (auto field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ continue;
}
+ put_sep();
+ field_generators_.get(field).GenerateConstexprAggregateInitializer(
+ printer);
+ }
+ if (ShouldSplit(descriptor_, options_)) {
+ put_sep();
+ format("/*decltype($split$)*/&$1$._instance",
+ DefaultInstanceName(descriptor_, options_, /*split=*/true));
+ }
- if (descriptor_->real_oneof_decl_count() != 0) {
- put_sep();
- format("_oneof_case_{}");
- }
+ for (auto oneof : OneOfRange(descriptor_)) {
+ put_sep();
+ format("/*decltype(_impl_.$1$_)*/{}", oneof->name());
+ }
+
+ if (need_to_emit_cached_size) {
+ put_sep();
+ format("/*decltype($cached_size$)*/{}");
+ }
+
+ if (descriptor_->real_oneof_decl_count() != 0) {
+ put_sep();
+ format("/*decltype($oneof_case$)*/{}");
+ }
+
+ if (num_weak_fields_) {
+ put_sep();
+ format("/*decltype($weak_field_map$)*/{}");
+ }
+
+ if (IsAnyMessage(descriptor_, options_)) {
+ put_sep();
+ format(
+ "/*decltype($any_metadata$)*/{&_impl_.type_url_, "
+ "&_impl_.value_}");
}
format.Outdent();
- format("{}\n");
+ format("} {}\n");
}
-void MessageGenerator::GenerateConstructorBody(io::Printer* printer,
- std::vector<bool> processed,
- bool copy_constructor) const {
+void MessageGenerator::GenerateCopyConstructorBody(io::Printer* printer) const {
Formatter format(printer, variables_);
- const RunMap runs = FindRuns(
- optimized_order_, [copy_constructor, this](const FieldDescriptor* field) {
- return (copy_constructor && IsPOD(field)) ||
- (!copy_constructor &&
- CanBeManipulatedAsRawBytes(field, options_, scc_analyzer_));
+ const RunMap runs =
+ FindRuns(optimized_order_, [this](const FieldDescriptor* field) {
+ return IsPOD(field) && !ShouldSplit(field, options_);
});
- TProtoStringType pod_template;
- if (copy_constructor) {
- pod_template =
- "::memcpy(&$first$, &from.$first$,\n"
- " static_cast<size_t>(reinterpret_cast<char*>(&$last$) -\n"
- " reinterpret_cast<char*>(&$first$)) + sizeof($last$));\n";
- } else {
- pod_template =
- "::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(\n"
- " reinterpret_cast<char*>(&$first$) - "
- "reinterpret_cast<char*>(this)),\n"
- " 0, static_cast<size_t>(reinterpret_cast<char*>(&$last$) -\n"
- " reinterpret_cast<char*>(&$first$)) + sizeof($last$));\n";
- }
+ TProtoStringType pod_template =
+ "::memcpy(&$first$, &from.$first$,\n"
+ " static_cast<size_t>(reinterpret_cast<char*>(&$last$) -\n"
+ " reinterpret_cast<char*>(&$first$)) + sizeof($last$));\n";
- for (int i = 0; i < optimized_order_.size(); ++i) {
- if (processed[i]) {
- continue;
+ if (ShouldSplit(descriptor_, options_)) {
+ format("if (!from.IsSplitMessageDefault()) {\n");
+ format.Indent();
+ format("_this->PrepareSplitMessageForWrite();\n");
+ for (auto field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ field_generators_.get(field).GenerateCopyConstructorCode(printer);
+ }
}
+ format.Outdent();
+ format("}\n");
+ }
+ for (size_t i = 0; i < optimized_order_.size(); ++i) {
const FieldDescriptor* field = optimized_order_[i];
+ if (ShouldSplit(field, options_)) {
+ continue;
+ }
const auto it = runs.find(field);
// We only apply the memset technique to runs of more than one field, as
@@ -2451,9 +2763,10 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer,
if (it != runs.end() && it->second > 1) {
// Use a memset, then skip run_length fields.
const size_t run_length = it->second;
- const TProtoStringType first_field_name = FieldMemberName(field);
+ const TProtoStringType first_field_name =
+ FieldMemberName(field, /*cold=*/false);
const TProtoStringType last_field_name =
- FieldMemberName(optimized_order_[i + run_length - 1]);
+ FieldMemberName(optimized_order_[i + run_length - 1], /*cold=*/false);
format.Set("first", first_field_name);
format.Set("last", last_field_name);
@@ -2463,11 +2776,7 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer,
i += run_length - 1;
// ++i at the top of the loop.
} else {
- if (copy_constructor) {
- field_generators_.get(field).GenerateCopyConstructorCode(printer);
- } else {
- field_generators_.get(field).GenerateConstructorCode(printer);
- }
+ field_generators_.get(field).GenerateCopyConstructorCode(printer);
}
}
}
@@ -2475,78 +2784,14 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer,
void MessageGenerator::GenerateStructors(io::Printer* printer) {
Formatter format(printer, variables_);
- TProtoStringType superclass;
- superclass = SuperClassName(descriptor_, options_);
- TProtoStringType initializer_with_arena = superclass + "(arena, is_message_owned)";
-
- if (descriptor_->extension_range_count() > 0) {
- initializer_with_arena += ",\n _extensions_(arena)";
- }
-
- // Initialize member variables with arena constructor.
- for (auto field : optimized_order_) {
- GOOGLE_DCHECK(!IsFieldStripped(field, options_));
- bool has_arena_constructor = field->is_repeated();
- if (!field->real_containing_oneof() &&
- (IsLazy(field, options_, scc_analyzer_) ||
- IsStringPiece(field, options_) ||
- (IsString(field, options_) && IsStringInlined(field, options_)))) {
- has_arena_constructor = true;
- }
- if (has_arena_constructor) {
- initializer_with_arena +=
- TProtoStringType(",\n ") + FieldName(field) + TProtoStringType("_(arena)");
- }
- }
-
- if (IsAnyMessage(descriptor_, options_)) {
- initializer_with_arena += ",\n _any_metadata_(&type_url_, &value_)";
- }
- if (num_weak_fields_ > 0) {
- initializer_with_arena += ", _weak_field_map_(arena)";
- }
-
- TProtoStringType initializer_null = superclass + "()";
- if (IsAnyMessage(descriptor_, options_)) {
- initializer_null += ", _any_metadata_(&type_url_, &value_)";
- }
- if (num_weak_fields_ > 0) {
- initializer_null += ", _weak_field_map_(nullptr)";
- }
-
format(
"$classname$::$classname$(::$proto_ns$::Arena* arena,\n"
" bool is_message_owned)\n"
- " : $1$ {\n",
- initializer_with_arena);
-
- if (!inlined_string_indices_.empty()) {
- // Donate inline string fields.
- format.Indent();
- // The last bit is the tracking bit for registering ArenaDtor. The bit is 1
- // means ArenaDtor is not registered on construction, and on demand register
- // is needed.
- format("if (arena != nullptr) {\n");
- if (NeedsArenaDestructor() == ArenaDtorNeeds::kOnDemand) {
- format(
- " if (!is_message_owned) {\n"
- " $inlined_string_donated_array$[0] = ~0u;\n"
- " } else {\n"
- // We should not register ArenaDtor for MOA.
- " $inlined_string_donated_array$[0] = 0xFFFFFFFEu;\n"
- " }\n");
- } else {
- format(" $inlined_string_donated_array$[0] = 0xFFFFFFFEu;\n");
- }
- for (size_t i = 1; i < InlinedStringDonatedSize(); ++i) {
- format(" $inlined_string_donated_array$[$1$] = ~0u;\n", i);
- }
- format("}\n");
- format.Outdent();
- }
+ " : $1$(arena, is_message_owned) {\n",
+ SuperClassName(descriptor_, options_));
if (!HasSimpleBaseClass(descriptor_, options_)) {
- format(" SharedCtor();\n");
+ format(" SharedCtor(arena, is_message_owned);\n");
if (NeedsArenaDestructor() == ArenaDtorNeeds::kRequired) {
format(
" if (arena != nullptr && !is_message_owned) {\n"
@@ -2576,40 +2821,81 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) {
} else {
format(
"$classname$::$classname$(const $classname$& from)\n"
- " : $superclass$()");
- format.Indent();
- format.Indent();
+ " : $superclass$() {\n");
format.Indent();
+ format("$classname$* const _this = this; (void)_this;\n");
- // Do not copy inlined_string_donated_, because this is not an arena
- // constructor.
+ if (HasImplData(descriptor_, options_)) {
+ const char* field_sep = " ";
+ const auto put_sep = [&] {
+ format("\n$1$ ", field_sep);
+ field_sep = ",";
+ };
- if (!has_bit_indices_.empty()) {
- format(",\n_has_bits_(from._has_bits_)");
- }
+ format("new (&_impl_) Impl_{");
+ format.Indent();
- std::vector<bool> processed(optimized_order_.size(), false);
- for (int i = 0; i < optimized_order_.size(); i++) {
- auto field = optimized_order_[i];
- if (!(field->is_repeated() && !(field->is_map())) &&
- !IsCord(field, options_)) {
- continue;
+ if (descriptor_->extension_range_count() > 0) {
+ put_sep();
+ format("/*decltype($extensions$)*/{}");
+ }
+ if (!inlined_string_indices_.empty()) {
+ // Do not copy inlined_string_donated_, because this is not an arena
+ // constructor.
+ put_sep();
+ format("decltype($inlined_string_donated_array$){}");
+ }
+ bool need_to_emit_cached_size =
+ !HasSimpleBaseClass(descriptor_, options_);
+ if (!has_bit_indices_.empty()) {
+ put_sep();
+ format("decltype($has_bits$){from.$has_bits$}");
+ if (need_to_emit_cached_size) {
+ put_sep();
+ format("/*decltype($cached_size$)*/{}");
+ need_to_emit_cached_size = false;
+ }
}
- processed[i] = true;
- format(",\n$1$_(from.$1$_)", FieldName(field));
- }
+ // Initialize member variables with arena constructor.
+ for (auto field : optimized_order_) {
+ if (ShouldSplit(field, options_)) {
+ continue;
+ }
+ put_sep();
+ field_generators_.get(field).GenerateCopyAggregateInitializer(printer);
+ }
+ if (ShouldSplit(descriptor_, options_)) {
+ put_sep();
+ format("decltype($split$){reinterpret_cast<Impl_::Split*>(&$1$)}",
+ DefaultInstanceName(descriptor_, options_, /*split=*/true));
+ }
+ for (auto oneof : OneOfRange(descriptor_)) {
+ put_sep();
+ format("decltype(_impl_.$1$_){}", oneof->name());
+ }
- if (IsAnyMessage(descriptor_, options_)) {
- format(",\n_any_metadata_(&type_url_, &value_)");
- }
- if (num_weak_fields_ > 0) {
- format(",\n_weak_field_map_(from._weak_field_map_)");
- }
+ if (need_to_emit_cached_size) {
+ put_sep();
+ format("/*decltype($cached_size$)*/{}");
+ }
- format.Outdent();
- format.Outdent();
- format(" {\n");
+ if (descriptor_->real_oneof_decl_count() != 0) {
+ put_sep();
+ format("/*decltype($oneof_case$)*/{}");
+ }
+ if (num_weak_fields_ > 0) {
+ put_sep();
+ format("decltype($weak_field_map$){from.$weak_field_map$}");
+ }
+ if (IsAnyMessage(descriptor_, options_)) {
+ put_sep();
+ format(
+ "/*decltype($any_metadata$)*/{&_impl_.type_url_, &_impl_.value_}");
+ }
+ format.Outdent();
+ format("};\n\n");
+ }
format(
"_internal_metadata_.MergeFrom<$unknown_fields_type$>(from._internal_"
@@ -2621,7 +2907,7 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) {
"from.$extensions$);\n");
}
- GenerateConstructorBody(printer, processed, true);
+ GenerateCopyConstructorBody(printer);
// Copy oneof fields. Oneof field requires oneof case check.
for (auto oneof : OneOfRange(descriptor_)) {
@@ -2659,6 +2945,10 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) {
// Generate the shared constructor code.
GenerateSharedConstructorCode(printer);
+ if (ShouldSplit(descriptor_, options_)) {
+ GenerateCreateSplitMessage(printer);
+ }
+
// Generate the destructor.
if (!HasSimpleBaseClass(descriptor_, options_)) {
format(
@@ -2756,6 +3046,7 @@ void MessageGenerator::GenerateClear(io::Printer* printer) {
// (memset) per chunk, and if present it will be at the beginning.
bool same = HasByteIndex(a) == HasByteIndex(b) &&
a->is_repeated() == b->is_repeated() &&
+ ShouldSplit(a, options_) == ShouldSplit(b, options_) &&
(CanInitializeByZeroing(a) == CanInitializeByZeroing(b) ||
(CanInitializeByZeroing(a) &&
(chunk_count == 1 || merge_zero_init)));
@@ -2763,7 +3054,8 @@ void MessageGenerator::GenerateClear(io::Printer* printer) {
return same;
});
- ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio);
+ ColdChunkSkipper cold_skipper(descriptor_, options_, chunks, has_bit_indices_,
+ kColdRatio);
int cached_has_word_index = -1;
for (int chunk_index = 0; chunk_index < chunks.size(); chunk_index++) {
@@ -2773,7 +3065,7 @@ void MessageGenerator::GenerateClear(io::Printer* printer) {
const FieldDescriptor* memset_start = nullptr;
const FieldDescriptor* memset_end = nullptr;
bool saw_non_zero_init = false;
-
+ bool chunk_is_cold = !chunk.empty() && ShouldSplit(chunk.front(), options_);
for (const auto& field : chunk) {
if (CanInitializeByZeroing(field)) {
GOOGLE_CHECK(!saw_non_zero_init);
@@ -2813,17 +3105,25 @@ void MessageGenerator::GenerateClear(io::Printer* printer) {
format.Indent();
}
+ if (chunk_is_cold) {
+ format("if (!IsSplitMessageDefault()) {\n");
+ format.Indent();
+ }
+
if (memset_start) {
if (memset_start == memset_end) {
// For clarity, do not memset a single field.
field_generators_.get(memset_start)
.GenerateMessageClearingCode(printer);
} else {
+ GOOGLE_CHECK_EQ(chunk_is_cold, ShouldSplit(memset_start, options_));
+ GOOGLE_CHECK_EQ(chunk_is_cold, ShouldSplit(memset_end, options_));
format(
"::memset(&$1$, 0, static_cast<size_t>(\n"
" reinterpret_cast<char*>(&$2$) -\n"
" reinterpret_cast<char*>(&$1$)) + sizeof($2$));\n",
- FieldMemberName(memset_start), FieldMemberName(memset_end));
+ FieldMemberName(memset_start, chunk_is_cold),
+ FieldMemberName(memset_end, chunk_is_cold));
}
}
@@ -2852,6 +3152,11 @@ void MessageGenerator::GenerateClear(io::Printer* printer) {
}
}
+ if (chunk_is_cold) {
+ format.Outdent();
+ format("}\n");
+ }
+
if (have_outer_if) {
format.Outdent();
format("}\n");
@@ -2950,7 +3255,7 @@ void MessageGenerator::GenerateSwap(io::Printer* printer) {
std::map<TProtoStringType, TProtoStringType> vars;
SetUnknownFieldsVariable(descriptor_, options_, &vars);
format.AddMap(vars);
- if (HasSingularString(descriptor_, options_)) {
+ if (HasNonSplitOptionalString(descriptor_, options_)) {
format(
"auto* lhs_arena = GetArenaForAllocation();\n"
"auto* rhs_arena = other->GetArenaForAllocation();\n");
@@ -2966,11 +3271,15 @@ void MessageGenerator::GenerateSwap(io::Printer* printer) {
// If possible, we swap several fields at once, including padding.
const RunMap runs =
FindRuns(optimized_order_, [this](const FieldDescriptor* field) {
- return CanBeManipulatedAsRawBytes(field, options_, scc_analyzer_);
+ return !ShouldSplit(field, options_) &&
+ CanBeManipulatedAsRawBytes(field, options_, scc_analyzer_);
});
- for (int i = 0; i < optimized_order_.size(); ++i) {
+ for (size_t i = 0; i < optimized_order_.size(); ++i) {
const FieldDescriptor* field = optimized_order_[i];
+ if (ShouldSplit(field, options_)) {
+ continue;
+ }
const auto it = runs.find(field);
// We only apply the memswap technique to runs of more than one field, as
@@ -2979,9 +3288,10 @@ void MessageGenerator::GenerateSwap(io::Printer* printer) {
if (it != runs.end() && it->second > 1) {
// Use a memswap, then skip run_length fields.
const size_t run_length = it->second;
- const TProtoStringType first_field_name = FieldMemberName(field);
- const TProtoStringType last_field_name =
- FieldMemberName(optimized_order_[i + run_length - 1]);
+ const TProtoStringType first_field_name =
+ FieldMemberName(field, /*cold=*/false);
+ const TProtoStringType last_field_name = FieldMemberName(
+ optimized_order_[i + run_length - 1], /*cold=*/false);
format.Set("first", first_field_name);
format.Set("last", last_field_name);
@@ -3000,16 +3310,16 @@ void MessageGenerator::GenerateSwap(io::Printer* printer) {
field_generators_.get(field).GenerateSwappingCode(printer);
}
}
+ if (ShouldSplit(descriptor_, options_)) {
+ format("swap($split$, other->$split$);\n");
+ }
for (auto oneof : OneOfRange(descriptor_)) {
- format("swap($1$_, other->$1$_);\n", oneof->name());
+ format("swap(_impl_.$1$_, other->_impl_.$1$_);\n", oneof->name());
}
for (int i = 0; i < descriptor_->real_oneof_decl_count(); i++) {
- format(
- "swap($oneof_case$[$1$], "
- "other->$oneof_case$[$1$]);\n",
- i);
+ format("swap($oneof_case$[$1$], other->$oneof_case$[$1$]);\n", i);
}
if (num_weak_fields_) {
@@ -3050,17 +3360,11 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) {
format(
"const ::$proto_ns$::Message::ClassData "
"$classname$::_class_data_ = {\n"
- " ::$proto_ns$::Message::CopyWithSizeCheck,\n"
+ " ::$proto_ns$::Message::CopyWithSourceCheck,\n"
" $classname$::MergeImpl\n"
"};\n"
"const ::$proto_ns$::Message::ClassData*"
"$classname$::GetClassData() const { return &_class_data_; }\n"
- "\n"
- "void $classname$::MergeImpl(::$proto_ns$::Message* to,\n"
- " const ::$proto_ns$::Message& from) {\n"
- " static_cast<$classname$ *>(to)->MergeFrom(\n"
- " static_cast<const $classname$ &>(from));\n"
- "}\n"
"\n");
} else {
// Generate CheckTypeAndMergeFrom().
@@ -3087,29 +3391,50 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) {
}
}
-void MessageGenerator::GenerateClassSpecificMergeFrom(io::Printer* printer) {
+void MessageGenerator::GenerateClassSpecificMergeImpl(io::Printer* printer) {
if (HasSimpleBaseClass(descriptor_, options_)) return;
// Generate the class-specific MergeFrom, which avoids the GOOGLE_CHECK and cast.
Formatter format(printer, variables_);
+ if (!HasDescriptorMethods(descriptor_->file(), options_)) {
+ // For messages that don't inherit from Message, just implement MergeFrom
+ // directly.
+ format(
+ "void $classname$::MergeFrom(const $classname$& from) {\n"
+ " $classname$* const _this = this;\n");
+ } else {
+ format(
+ "void $classname$::MergeImpl(::$proto_ns$::Message& to_msg, const "
+ "::$proto_ns$::Message& from_msg) {\n"
+ " auto* const _this = static_cast<$classname$*>(&to_msg);\n"
+ " auto& from = static_cast<const $classname$&>(from_msg);\n");
+ }
+ format.Indent();
format(
- "void $classname$::MergeFrom(const $classname$& from) {\n"
"$annotate_mergefrom$"
"// @@protoc_insertion_point(class_specific_merge_from_start:"
- "$full_name$)\n"
- " $DCHK$_NE(&from, this);\n");
- format.Indent();
+ "$full_name$)\n");
+ format("$DCHK$_NE(&from, _this);\n");
format(
"$uint32$ cached_has_bits = 0;\n"
"(void) cached_has_bits;\n\n");
+ if (ShouldSplit(descriptor_, options_)) {
+ format(
+ "if (!from.IsSplitMessageDefault()) {\n"
+ " _this->PrepareSplitMessageForWrite();\n"
+ "}\n");
+ }
+
std::vector<std::vector<const FieldDescriptor*>> chunks = CollectFields(
optimized_order_,
[&](const FieldDescriptor* a, const FieldDescriptor* b) -> bool {
- return HasByteIndex(a) == HasByteIndex(b);
+ return HasByteIndex(a) == HasByteIndex(b) &&
+ ShouldSplit(a, options_) == ShouldSplit(b, options_);
});
- ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio);
+ ColdChunkSkipper cold_skipper(descriptor_, options_, chunks, has_bit_indices_,
+ kColdRatio);
// cached_has_word_index maintains that:
// cached_has_bits = from._has_bits_[cached_has_word_index]
@@ -3198,7 +3523,8 @@ void MessageGenerator::GenerateClassSpecificMergeFrom(io::Printer* printer) {
if (deferred_has_bit_changes) {
// Flush the has bits for the primitives we deferred.
GOOGLE_CHECK_LE(0, cached_has_word_index);
- format("$has_bits$[$1$] |= cached_has_bits;\n", cached_has_word_index);
+ format("_this->$has_bits$[$1$] |= cached_has_bits;\n",
+ cached_has_word_index);
}
format.Outdent();
@@ -3235,7 +3561,7 @@ void MessageGenerator::GenerateClassSpecificMergeFrom(io::Printer* printer) {
}
if (num_weak_fields_) {
format(
- "$weak_field_map$.MergeFrom(from.$weak_field_map$);"
+ "_this->$weak_field_map$.MergeFrom(from.$weak_field_map$);"
"\n");
}
@@ -3243,12 +3569,13 @@ void MessageGenerator::GenerateClassSpecificMergeFrom(io::Printer* printer) {
// the opportunity for tail calls.
if (descriptor_->extension_range_count() > 0) {
format(
- "$extensions$.MergeFrom(internal_default_instance(), "
+ "_this->$extensions$.MergeFrom(internal_default_instance(), "
"from.$extensions$);\n");
}
format(
- "_internal_metadata_.MergeFrom<$unknown_fields_type$>(from._internal_"
+ "_this->_internal_metadata_.MergeFrom<$unknown_fields_type$>(from._"
+ "internal_"
"metadata_);\n");
format.Outdent();
@@ -3263,12 +3590,12 @@ void MessageGenerator::GenerateCopyFrom(io::Printer* printer) {
// takes in the Message base class as a parameter); instead we just
// let the base Message::CopyFrom take care of it. The base MergeFrom
// knows how to quickly confirm the types exactly match, and if so, will
- // use GetClassData() to get the address of Message::CopyWithSizeCheck,
+ // use GetClassData() to get the address of Message::CopyWithSourceCheck,
// which calls Clear() and then MergeFrom(), as well as making sure that
- // clearing the destination message doesn't alter the size of the source,
- // when in debug builds.
- // Most callers avoid this by passing a "from" message that is the same
- // type as the message being merged into, rather than a generic Message.
+ // clearing the destination message doesn't alter the source, when in debug
+ // builds. Most callers avoid this by passing a "from" message that is the
+ // same type as the message being merged into, rather than a generic
+ // Message.
}
// Generate the class-specific CopyFrom.
@@ -3280,20 +3607,33 @@ void MessageGenerator::GenerateCopyFrom(io::Printer* printer) {
format("if (&from == this) return;\n");
- if (!options_.opensource_runtime) {
+ if (!options_.opensource_runtime && HasMessageFieldOrExtension(descriptor_)) {
// This check is disabled in the opensource release because we're
// concerned that many users do not define NDEBUG in their release builds.
+ // It is also disabled if a message has neither message fields nor
+ // extensions, as it's impossible to copy from its descendant.
+ //
+ // Note that FailIfCopyFromDescendant is implemented by reflection and not
+ // available for lite runtime. In that case, check if the size of the source
+ // has changed after Clear.
+ format("#ifndef NDEBUG\n");
+ if (HasDescriptorMethods(descriptor_->file(), options_)) {
+ format("FailIfCopyFromDescendant(*this, from);\n");
+ } else {
+ format("size_t from_size = from.ByteSizeLong();\n");
+ }
format(
- "#ifndef NDEBUG\n"
- "size_t from_size = from.ByteSizeLong();\n"
"#endif\n"
- "Clear();\n"
- "#ifndef NDEBUG\n"
- "$CHK$_EQ(from_size, from.ByteSizeLong())\n"
- " << \"Source of CopyFrom changed when clearing target. Either \"\n"
- " \"source is a nested message in target (not allowed), or \"\n"
- " \"another thread is modifying the source.\";\n"
- "#endif\n");
+ "Clear();\n");
+ if (!HasDescriptorMethods(descriptor_->file(), options_)) {
+ format(
+ "#ifndef NDEBUG\n"
+ "$CHK$_EQ(from_size, from.ByteSizeLong())\n"
+ " << \"Source of CopyFrom changed when clearing target. Either \"\n"
+ " \"source is a nested message in target (not allowed), or \"\n"
+ " \"another thread is modifying the source.\";\n"
+ "#endif\n");
+ }
} else {
format("Clear();\n");
}
@@ -3485,7 +3825,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody(
// Reload.
int new_index = has_bit_index / 32;
- format_("cached_has_bits = _has_bits_[$1$];\n", new_index);
+ format_("cached_has_bits = _impl_._has_bits_[$1$];\n", new_index);
cached_has_bit_index_ = new_index;
}
@@ -3878,14 +4218,16 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) {
std::vector<std::vector<const FieldDescriptor*>> chunks = CollectFields(
optimized_order_,
[&](const FieldDescriptor* a, const FieldDescriptor* b) -> bool {
- return a->label() == b->label() && HasByteIndex(a) == HasByteIndex(b);
+ return a->label() == b->label() && HasByteIndex(a) == HasByteIndex(b) &&
+ ShouldSplit(a, options_) == ShouldSplit(b, options_);
});
// Remove chunks with required fields.
chunks.erase(std::remove_if(chunks.begin(), chunks.end(), IsRequired),
chunks.end());
- ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio);
+ ColdChunkSkipper cold_skipper(descriptor_, options_, chunks, has_bit_indices_,
+ kColdRatio);
int cached_has_word_index = -1;
format(
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message.h
index 5e4bbe84b8..960bea8e5a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message.h
@@ -40,11 +40,11 @@
#include <set>
#include <string>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_message_layout_helper.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
-#include <google/protobuf/compiler/cpp/cpp_parse_function_generator.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/message_layout_helper.h>
+#include <google/protobuf/compiler/cpp/options.h>
+#include <google/protobuf/compiler/cpp/parse_function_generator.h>
namespace google {
namespace protobuf {
@@ -119,6 +119,9 @@ class MessageGenerator {
// default instance.
void GenerateConstexprConstructor(io::Printer* printer);
+ void GenerateCreateSplitMessage(io::Printer* printer);
+ void GenerateInitDefaultSplitInstance(io::Printer* printer);
+
// Generate standard Message methods.
void GenerateClear(io::Printer* printer);
void GenerateOneofClear(io::Printer* printer);
@@ -129,7 +132,7 @@ class MessageGenerator {
void GenerateSerializeWithCachedSizesBodyShuffled(io::Printer* printer);
void GenerateByteSize(io::Printer* printer);
void GenerateMergeFrom(io::Printer* printer);
- void GenerateClassSpecificMergeFrom(io::Printer* printer);
+ void GenerateClassSpecificMergeImpl(io::Printer* printer);
void GenerateCopyFrom(io::Printer* printer);
void GenerateSwap(io::Printer* printer);
void GenerateIsInitialized(io::Printer* printer);
@@ -161,9 +164,8 @@ class MessageGenerator {
void GenerateFieldClear(const FieldDescriptor* field, bool is_inline,
Formatter format);
- void GenerateConstructorBody(io::Printer* printer,
- std::vector<bool> already_processed,
- bool copy_constructor) const;
+ // Generates the body of the message's copy constructor.
+ void GenerateCopyConstructorBody(io::Printer* printer) const;
// Returns the level that this message needs ArenaDtor. If the message has
// a field that is not arena-exclusive, it needs an ArenaDtor
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_field.cc
index 3b9f09c8c8..9a91fd9172 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_field.cc
@@ -32,10 +32,11 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_message_field.h>
+#include <google/protobuf/compiler/cpp/message_field.h>
#include <google/protobuf/io/printer.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
#include <google/protobuf/stubs/strutil.h>
@@ -157,8 +158,7 @@ void MessageFieldGenerator::GenerateAccessorDeclarations(
}
void MessageFieldGenerator::GenerateNonInlineAccessorDefinitions(
- io::Printer* printer) const {
-}
+ io::Printer* printer) const {}
void MessageFieldGenerator::GenerateInlineAccessorDefinitions(
io::Printer* printer) const {
@@ -179,6 +179,7 @@ void MessageFieldGenerator::GenerateInlineAccessorDefinitions(
format(
"inline void $classname$::unsafe_arena_set_allocated_$name$(\n"
" $type$* $name$) {\n"
+ "$maybe_prepare_split_message$"
// If we're not on an arena, free whatever we were holding before.
// (If we are on arena, we can just forget the earlier pointer.)
" if (GetArenaForAllocation() == nullptr) {\n"
@@ -204,6 +205,7 @@ void MessageFieldGenerator::GenerateInlineAccessorDefinitions(
"inline $type$* $classname$::$release_name$() {\n"
"$type_reference_function$"
"$annotate_release$"
+ "$maybe_prepare_split_message$"
" $clear_hasbit$\n"
" $type$* temp = $casted_member$;\n"
" $field$ = nullptr;\n"
@@ -222,6 +224,7 @@ void MessageFieldGenerator::GenerateInlineAccessorDefinitions(
"$annotate_release$"
" // @@protoc_insertion_point(field_release:$full_name$)\n"
"$type_reference_function$"
+ "$maybe_prepare_split_message$"
" $clear_hasbit$\n"
" $type$* temp = $casted_member$;\n"
" $field$ = nullptr;\n"
@@ -244,6 +247,9 @@ void MessageFieldGenerator::GenerateInlineAccessorDefinitions(
" return $casted_member$;\n"
"}\n"
"inline $type$* $classname$::mutable_$name$() {\n"
+ // TODO(b/122856539): add tests to make sure all write accessors are able
+ // to prepare split message allocation.
+ "$maybe_prepare_split_message$"
" $type$* _msg = _internal_mutable_$name$();\n"
"$annotate_mutable$"
" // @@protoc_insertion_point(field_mutable:$full_name$)\n"
@@ -255,7 +261,9 @@ void MessageFieldGenerator::GenerateInlineAccessorDefinitions(
format(
"inline void $classname$::set_allocated_$name$($type$* $name$) {\n"
" ::$proto_ns$::Arena* message_arena = GetArenaForAllocation();\n");
- format(" if (message_arena == nullptr) {\n");
+ format(
+ "$maybe_prepare_split_message$"
+ " if (message_arena == nullptr) {\n");
if (IsCrossFileMessage(descriptor_)) {
format(
" delete reinterpret_cast< ::$proto_ns$::MessageLite*>($field$);\n");
@@ -407,12 +415,12 @@ void MessageFieldGenerator::GenerateMergingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
if (implicit_weak_field_) {
format(
- "_Internal::mutable_$name$(this)->CheckTypeAndMergeFrom(\n"
+ "_Internal::mutable_$name$(_this)->CheckTypeAndMergeFrom(\n"
" _Internal::$name$(&from));\n");
} else {
format(
- "_internal_mutable_$name$()->$type$::MergeFrom(from._internal_$name$())"
- ";\n");
+ "_this->_internal_mutable_$name$()->$type$::MergeFrom(\n"
+ " from._internal_$name$());\n");
}
}
@@ -435,17 +443,13 @@ void MessageFieldGenerator::GenerateDestructorCode(io::Printer* printer) const {
// care when handling them.
format("if (this != internal_default_instance()) ");
}
+ if (ShouldSplit(descriptor_, options_)) {
+ format("delete $cached_split_ptr$->$name$_;\n");
+ return;
+ }
format("delete $field$;\n");
}
-void MessageFieldGenerator::GenerateConstructorCode(
- io::Printer* printer) const {
- GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
-
- Formatter format(printer, variables_);
- format("$field$ = nullptr;\n");
-}
-
void MessageFieldGenerator::GenerateCopyConstructorCode(
io::Printer* printer) const {
GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
@@ -453,9 +457,7 @@ void MessageFieldGenerator::GenerateCopyConstructorCode(
Formatter format(printer, variables_);
format(
"if (from._internal_has_$name$()) {\n"
- " $field$ = new $type$(*from.$field$);\n"
- "} else {\n"
- " $field$ = nullptr;\n"
+ " _this->$field$ = new $type$(*from.$field$);\n"
"}\n");
}
@@ -500,10 +502,26 @@ void MessageFieldGenerator::GenerateIsInitialized(io::Printer* printer) const {
"}\n");
}
-void MessageFieldGenerator::GenerateConstinitInitializer(
+void MessageFieldGenerator::GenerateConstexprAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$name$_(nullptr)");
+ format("/*decltype($field$)*/nullptr");
+}
+
+void MessageFieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("decltype($field$){nullptr}");
+}
+
+void MessageFieldGenerator::GenerateAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ if (ShouldSplit(descriptor_, options_)) {
+ format("decltype(Impl_::Split::$name$_){nullptr}");
+ return;
+ }
+ format("decltype($field$){nullptr}");
}
// ===================================================================
@@ -830,7 +848,7 @@ void RepeatedMessageFieldGenerator::GenerateMergingCode(
GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
Formatter format(printer, variables_);
- format("$field$.MergeFrom(from.$field$);\n");
+ format("_this->$field$.MergeFrom(from.$field$);\n");
}
void RepeatedMessageFieldGenerator::GenerateSwappingCode(
@@ -846,6 +864,18 @@ void RepeatedMessageFieldGenerator::GenerateConstructorCode(
// Not needed for repeated fields.
}
+void RepeatedMessageFieldGenerator::GenerateDestructorCode(
+ io::Printer* printer) const {
+ GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
+
+ Formatter format(printer, variables_);
+ if (implicit_weak_field_) {
+ format("$field$.~WeakRepeatedPtrField();\n");
+ } else {
+ format("$field$.~RepeatedPtrField();\n");
+ }
+}
+
void RepeatedMessageFieldGenerator::GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const {
GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
@@ -922,12 +952,6 @@ void RepeatedMessageFieldGenerator::GenerateIsInitialized(
}
}
-void RepeatedMessageFieldGenerator::GenerateConstinitInitializer(
- io::Printer* printer) const {
- Formatter format(printer, variables_);
- format("$name$_()");
-}
-
} // namespace cpp
} // namespace compiler
} // namespace protobuf
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_field.h
index 528b419704..70c42c0eac 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_field.h
@@ -38,8 +38,8 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/field.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
namespace protobuf {
@@ -67,13 +67,16 @@ class MessageFieldGenerator : public FieldGenerator {
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
void GenerateDestructorCode(io::Printer* printer) const override;
- void GenerateConstructorCode(io::Printer* printer) const override;
+ void GenerateConstructorCode(io::Printer* printer) const override {}
void GenerateCopyConstructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
void GenerateIsInitialized(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
protected:
const bool implicit_weak_field_;
@@ -124,11 +127,11 @@ class RepeatedMessageFieldGenerator : public FieldGenerator {
void GenerateSwappingCode(io::Printer* printer) const override;
void GenerateConstructorCode(io::Printer* printer) const override;
void GenerateCopyConstructorCode(io::Printer* printer) const override {}
+ void GenerateDestructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
void GenerateIsInitialized(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
private:
const bool implicit_weak_field_;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_layout_helper.h
index 80860053f1..a8813a1f22 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/message_layout_helper.h
@@ -36,7 +36,7 @@
#define GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_LAYOUT_HELPER_H__
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_names.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/names.h
index 39563cd0cd..8220f7dde8 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_names.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/names.h
@@ -51,9 +51,9 @@ namespace cpp {
//
// For example, if you had:
// package foo.bar;
-// message Baz { message Qux {} }
+// message Baz { message Moo {} }
// Then the non-qualified version would be:
-// Baz_Qux
+// Baz_Moo
TProtoStringType ClassName(const Descriptor* descriptor);
TProtoStringType ClassName(const EnumDescriptor* enum_descriptor);
@@ -61,9 +61,9 @@ TProtoStringType ClassName(const EnumDescriptor* enum_descriptor);
//
// For example, if you had:
// package foo.bar;
-// message Baz { message Qux {} }
-// Then the qualified ClassName for Qux would be:
-// ::foo::bar::Baz_Qux
+// message Baz { message Moo {} }
+// Then the qualified ClassName for Moo would be:
+// ::foo::bar::Baz_Moo
TProtoStringType QualifiedClassName(const Descriptor* d);
TProtoStringType QualifiedClassName(const EnumDescriptor* d);
TProtoStringType QualifiedExtensionName(const FieldDescriptor* d);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_options.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/options.h
index 48512a64c8..14546ca618 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_options.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/options.h
@@ -80,9 +80,10 @@ struct Options {
bool opensource_runtime = false;
bool annotate_accessor = false;
bool unused_field_stripping = false;
- bool unverified_lazy_message_sets = true;
- bool eagerly_verified_lazy = true;
+ bool unverified_lazy_message_sets = false;
+ bool unverified_lazy = false;
bool profile_driven_inline_string = true;
+ bool message_owned_arena_trial = false;
bool force_split = false;
#ifdef PROTOBUF_STABLE_EXPERIMENTS
bool force_eagerly_verified_lazy = true;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/padding_optimizer.cc
index f48ba718a5..20910520d6 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/padding_optimizer.cc
@@ -28,9 +28,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/cpp/cpp_padding_optimizer.h>
+#include <google/protobuf/compiler/cpp/padding_optimizer.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/padding_optimizer.h
index ebdb17de61..9c76f38c47 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/padding_optimizer.h
@@ -35,7 +35,7 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_PADDING_OPTIMIZER_H__
#define GOOGLE_PROTOBUF_COMPILER_CPP_PADDING_OPTIMIZER_H__
-#include <google/protobuf/compiler/cpp/cpp_message_layout_helper.h>
+#include <google/protobuf/compiler/cpp/message_layout_helper.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/parse_function_generator.cc
index e033856f0c..1b97182acd 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/parse_function_generator.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/cpp/cpp_parse_function_generator.h>
+#include <google/protobuf/compiler/cpp/parse_function_generator.h>
#include <algorithm>
#include <limits>
@@ -36,7 +36,7 @@
#include <utility>
#include <google/protobuf/wire_format.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
namespace protobuf {
@@ -231,8 +231,7 @@ std::vector<const FieldDescriptor*> FilterMiniParsedFields(
break;
case FieldDescriptor::TYPE_ENUM:
- if (field->is_repeated() &&
- !HasPreservingUnknownEnumSemantics(field)) {
+ if (field->is_repeated() && !HasPreservingUnknownEnumSemantics(field)) {
// TODO(b/206890171): handle packed repeated closed enums
// Non-packed repeated can be handled using tables, but we still
// need to generate fallback code for all repeated enums in order to
@@ -244,15 +243,15 @@ std::vector<const FieldDescriptor*> FilterMiniParsedFields(
}
break;
- case FieldDescriptor::TYPE_BYTES:
- case FieldDescriptor::TYPE_STRING:
- if (IsStringInlined(field, options)) {
- // TODO(b/198211897): support InilnedStringField.
- handled = false;
- } else {
- handled = true;
- }
- break;
+ case FieldDescriptor::TYPE_BYTES:
+ case FieldDescriptor::TYPE_STRING:
+ if (IsStringInlined(field, options)) {
+ // TODO(b/198211897): support InilnedStringField.
+ handled = false;
+ } else {
+ handled = true;
+ }
+ break;
case FieldDescriptor::TYPE_MESSAGE:
case FieldDescriptor::TYPE_GROUP:
@@ -291,8 +290,9 @@ TailCallTableInfo::TailCallTableInfo(
GOOGLE_LOG_IF(DFATAL, ordered_fields.empty())
<< "Invalid message: " << descriptor->full_name() << " has "
<< oneof_count << " oneof declarations, but no fields";
- aux_entries.push_back(StrCat(
- "_fl::Offset{offsetof(", ClassName(descriptor), ", _oneof_case_)}"));
+ aux_entries.push_back(StrCat("_fl::Offset{offsetof(",
+ ClassName(descriptor),
+ ", _impl_._oneof_case_)}"));
}
// If this message has any inlined string fields, store the donation state
@@ -301,7 +301,7 @@ TailCallTableInfo::TailCallTableInfo(
aux_entries.resize(2); // pad if necessary
aux_entries[1] =
StrCat("_fl::Offset{offsetof(", ClassName(descriptor),
- ", _inlined_string_donated_)}");
+ ", _impl_._inlined_string_donated_)}");
}
// Fill in mini table entries.
@@ -444,7 +444,7 @@ ParseFunctionGenerator::ParseFunctionGenerator(
inlined_string_indices, scc_analyzer));
}
SetCommonVars(options_, &variables_);
- SetCommonMessageDataVariables(&variables_);
+ SetCommonMessageDataVariables(descriptor_, &variables_);
SetUnknownFieldsVariable(descriptor_, options_, &variables_);
variables_["classname"] = ClassName(descriptor, false);
}
@@ -547,13 +547,13 @@ void ParseFunctionGenerator::GenerateTailcallFallbackFunction(
if (num_hasbits_ > 0) {
// Sync hasbits
- format("typed_msg->_has_bits_[0] = hasbits;\n");
+ format("typed_msg->_impl_._has_bits_[0] = hasbits;\n");
}
format("arc_ui32 tag = data.tag();\n");
format.Set("msg", "typed_msg->");
format.Set("this", "typed_msg");
- format.Set("has_bits", "typed_msg->_has_bits_");
+ format.Set("has_bits", "typed_msg->_impl_._has_bits_");
format.Set("next_tag", "goto next_tag");
GenerateParseIterationBody(format, descriptor_,
tc_table_info_->fallback_fields);
@@ -649,7 +649,7 @@ void ParseFunctionGenerator::GenerateLoopingParseFunction(Formatter& format) {
format("_Internal::HasBits has_bits{};\n");
format.Set("has_bits", "has_bits");
} else {
- format.Set("has_bits", "_has_bits_");
+ format.Set("has_bits", "_impl_._has_bits_");
}
format.Set("next_tag", "continue");
format("while (!ctx->Done(&ptr)) {\n");
@@ -665,7 +665,7 @@ void ParseFunctionGenerator::GenerateLoopingParseFunction(Formatter& format) {
format.Outdent();
format("message_done:\n");
- if (hasbits_size) format(" _has_bits_.Or(has_bits);\n");
+ if (hasbits_size) format(" _impl_._has_bits_.Or(has_bits);\n");
format(
" return ptr;\n"
@@ -774,7 +774,7 @@ void ParseFunctionGenerator::GenerateTailCallTable(Formatter& format) {
{
auto header_scope = format.ScopedIndent();
if (num_hasbits_ > 0 || IsMapEntryMessage(descriptor_)) {
- format("PROTOBUF_FIELD_OFFSET($classname$, _has_bits_),\n");
+ format("PROTOBUF_FIELD_OFFSET($classname$, _impl_._has_bits_),\n");
} else {
format("0, // no _has_bits_\n");
}
@@ -899,11 +899,14 @@ void ParseFunctionGenerator::GenerateFastFieldEntries(Formatter& format) {
if (info.func_name.empty()) {
format("{::_pbi::TcParser::MiniParse, {}},\n");
} else {
+ bool cold = ShouldSplit(info.field, options_);
format(
"{$1$,\n"
- " {$2$, $3$, $4$, PROTOBUF_FIELD_OFFSET($classname$, $5$)}},\n",
+ " {$2$, $3$, $4$, PROTOBUF_FIELD_OFFSET($classname$$5$, $6$)}},\n",
info.func_name, info.coded_tag, info.hasbit_idx, info.aux_idx,
- FieldMemberName(info.field));
+ cold ? "::Impl_::Split" : "",
+ cold ? FieldName(info.field) + "_"
+ : FieldMemberName(info.field, /*cold=*/false));
}
}
}
@@ -1048,8 +1051,11 @@ void ParseFunctionGenerator::GenerateFieldEntries(Formatter& format) {
format("/* weak */ 0, 0, 0, 0");
} else {
const OneofDescriptor* oneof = field->real_containing_oneof();
- format("PROTOBUF_FIELD_OFFSET($classname$, $1$), $2$, $3$,\n ",
- FieldMemberName(field),
+ bool cold = ShouldSplit(field, options_);
+ format("PROTOBUF_FIELD_OFFSET($classname$$1$, $2$), $3$, $4$,\n ",
+ cold ? "::Impl_::Split" : "",
+ cold ? FieldName(field) + "_"
+ : FieldMemberName(field, /*cold=*/false),
(oneof ? oneof->index() : entry.hasbit_idx), entry.aux_idx);
FormatFieldKind(format, entry, options_, scc_analyzer_);
}
@@ -1550,7 +1556,8 @@ void ParseFunctionGenerator::GenerateFieldSwitch(
format.Indent();
for (const auto* field : fields) {
- format.Set("field", FieldMemberName(field));
+ bool cold = ShouldSplit(field, options_);
+ format.Set("field", FieldMemberName(field, cold));
PrintFieldComment(format, field);
format("case $1$:\n", field->number());
format.Indent();
@@ -1559,6 +1566,9 @@ void ParseFunctionGenerator::GenerateFieldSwitch(
format("if (PROTOBUF_PREDICT_TRUE(static_cast<$uint8$>(tag) == $1$)) {\n",
expected_tag & 0xFF);
format.Indent();
+ if (cold) {
+ format("$msg$PrepareSplitMessageForWrite();\n");
+ }
auto wiretype = WireFormatLite::GetTagWireType(expected_tag);
arc_ui32 tag = WireFormatLite::MakeTag(field->number(), wiretype);
int tag_size = io::CodedOutputStream::VarintSize32(tag);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/parse_function_generator.h
index 3c8209534a..7e2b674852 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/parse_function_generator.h
@@ -38,8 +38,8 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/wire_format_lite.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/primitive_field.cc
index 910b59a21a..9dbf16ae7e 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/primitive_field.cc
@@ -32,12 +32,12 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_primitive_field.h>
+#include <google/protobuf/compiler/cpp/primitive_field.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
namespace protobuf {
@@ -105,8 +105,9 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor,
(*variables)["type"] = PrimitiveTypeName(options, descriptor->cpp_type());
(*variables)["default"] = DefaultValue(options, descriptor);
(*variables)["cached_byte_size_name"] = MakeVarintCachedSizeName(descriptor);
+ bool cold = ShouldSplit(descriptor, options);
(*variables)["cached_byte_size_field"] =
- MakeVarintCachedSizeFieldName(descriptor);
+ MakeVarintCachedSizeFieldName(descriptor, cold);
(*variables)["tag"] = StrCat(internal::WireFormat::MakeTag(descriptor));
int fixed_size = FixedSize(descriptor->type());
if (fixed_size != -1) {
@@ -165,6 +166,7 @@ void PrimitiveFieldGenerator::GenerateInlineAccessorDefinitions(
" $field$ = value;\n"
"}\n"
"inline void $classname$::set_$name$($type$ value) {\n"
+ "$maybe_prepare_split_message$"
" _internal_set_$name$(value);\n"
"$annotate_set$"
" // @@protoc_insertion_point(field_set:$full_name$)\n"
@@ -178,7 +180,7 @@ void PrimitiveFieldGenerator::GenerateClearingCode(io::Printer* printer) const {
void PrimitiveFieldGenerator::GenerateMergingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
- format("_internal_set_$name$(from._internal_$name$());\n");
+ format("_this->_internal_set_$name$(from._internal_$name$());\n");
}
void PrimitiveFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
@@ -186,16 +188,10 @@ void PrimitiveFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
format("swap($field$, other->$field$);\n");
}
-void PrimitiveFieldGenerator::GenerateConstructorCode(
- io::Printer* printer) const {
- Formatter format(printer, variables_);
- format("$field$ = $default$;\n");
-}
-
void PrimitiveFieldGenerator::GenerateCopyConstructorCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$field$ = from.$field$;\n");
+ format("_this->$field$ = from.$field$;\n");
}
void PrimitiveFieldGenerator::GenerateSerializeWithCachedSizesToArray(
@@ -230,10 +226,26 @@ void PrimitiveFieldGenerator::GenerateByteSize(io::Printer* printer) const {
}
}
-void PrimitiveFieldGenerator::GenerateConstinitInitializer(
+void PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$name$_($default$)");
+ format("/*decltype($field$)*/$default$");
+}
+
+void PrimitiveFieldGenerator::GenerateAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ if (ShouldSplit(descriptor_, options_)) {
+ format("decltype(Impl_::Split::$name$_){$default$}");
+ return;
+ }
+ format("decltype($field$){$default$}");
+}
+
+void PrimitiveFieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("decltype($field$){}");
}
// ===================================================================
@@ -398,7 +410,7 @@ void RepeatedPrimitiveFieldGenerator::GenerateClearingCode(
void RepeatedPrimitiveFieldGenerator::GenerateMergingCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$field$.MergeFrom(from.$field$);\n");
+ format("_this->$field$.MergeFrom(from.$field$);\n");
}
void RepeatedPrimitiveFieldGenerator::GenerateSwappingCode(
@@ -407,6 +419,12 @@ void RepeatedPrimitiveFieldGenerator::GenerateSwappingCode(
format("$field$.InternalSwap(&other->$field$);\n");
}
+void RepeatedPrimitiveFieldGenerator::GenerateDestructorCode(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("$field$.~RepeatedField();\n");
+}
+
void RepeatedPrimitiveFieldGenerator::GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const {
Formatter format(printer, variables_);
@@ -460,7 +478,8 @@ void RepeatedPrimitiveFieldGenerator::GenerateByteSize(
format(
"if (data_size > 0) {\n"
" total_size += $tag_size$ +\n"
- " ::_pbi::WireFormatLite::Int32Size(static_cast<$int32$>(data_size));\n"
+ " "
+ "::_pbi::WireFormatLite::Int32Size(static_cast<$int32$>(data_size));\n"
"}\n");
if (FixedSize(descriptor_->type()) == -1) {
format(
@@ -480,13 +499,37 @@ void RepeatedPrimitiveFieldGenerator::GenerateByteSize(
format("}\n");
}
-void RepeatedPrimitiveFieldGenerator::GenerateConstinitInitializer(
+void RepeatedPrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("/*decltype($field$)*/{}");
+ if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
+ HasGeneratedMethods(descriptor_->file(), options_)) {
+ format("\n, /*decltype($cached_byte_size_field$)*/{0}");
+ }
+}
+
+void RepeatedPrimitiveFieldGenerator::GenerateAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$name$_()");
+ format("decltype($field$){arena}");
+ if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
+ HasGeneratedMethods(descriptor_->file(), options_)) {
+ // std::atomic has no move constructor, which prevents explicit aggregate
+ // initialization pre-C++17.
+ format("\n, /*decltype($cached_byte_size_field$)*/{0}");
+ }
+}
+
+void RepeatedPrimitiveFieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+
+ Formatter format(printer, variables_);
+ format("decltype($field$){from.$field$}");
if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
HasGeneratedMethods(descriptor_->file(), options_)) {
- format("\n, $cached_byte_size_name$(0)");
+ // std::atomic has no move constructor.
+ format("\n, /*decltype($cached_byte_size_field$)*/{0}");
}
}
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_primitive_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/primitive_field.h
index 77ac598e90..bb8a08aa14 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_primitive_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/primitive_field.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
+#include <google/protobuf/compiler/cpp/field.h>
namespace google {
namespace protobuf {
@@ -58,12 +58,15 @@ class PrimitiveFieldGenerator : public FieldGenerator {
void GenerateClearingCode(io::Printer* printer) const override;
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
- void GenerateConstructorCode(io::Printer* printer) const override;
+ void GenerateConstructorCode(io::Printer* printer) const override {}
void GenerateCopyConstructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator);
@@ -99,11 +102,17 @@ class RepeatedPrimitiveFieldGenerator : public FieldGenerator {
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
void GenerateConstructorCode(io::Printer* printer) const override {}
- void GenerateCopyConstructorCode(io::Printer* printer) const override {}
+ void GenerateCopyConstructorCode(io::Printer* /*printer*/) const override {
+ GOOGLE_CHECK(!ShouldSplit(descriptor_, options_));
+ }
+ void GenerateDestructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_service.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/service.cc
index 7bf589fa38..fae7128a09 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_service.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/service.cc
@@ -32,11 +32,11 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_service.h>
+#include <google/protobuf/compiler/cpp/service.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_service.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/service.h
index d237f9d732..56982cf566 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_service.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/service.h
@@ -39,7 +39,7 @@
#include <string>
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/compiler/cpp/cpp_options.h>
+#include <google/protobuf/compiler/cpp/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/string_field.cc
index 4d8744976b..5f30d3b511 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_string_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/string_field.cc
@@ -32,11 +32,11 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/cpp/cpp_string_field.h>
+#include <google/protobuf/compiler/cpp/string_field.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/cpp/cpp_helpers.h>
+#include <google/protobuf/compiler/cpp/helpers.h>
#include <google/protobuf/descriptor.pb.h>
@@ -115,11 +115,7 @@ void StringFieldGenerator::GeneratePrivateMembers(io::Printer* printer) const {
// allocating arena is null. This is required to support message-owned
// arena (go/path-to-arenas) where a root proto is destroyed but
// InlinedStringField may have arena-allocated memory.
- //
- // `_init_inline_xxx` is used for initializing default instances.
- format(
- "union { ::$proto_ns$::internal::InlinedStringField $name$_; };\n"
- "static std::true_type _init_inline_$name$_;\n");
+ format("::$proto_ns$::internal::InlinedStringField $name$_;\n");
}
}
@@ -130,6 +126,10 @@ void StringFieldGenerator::GenerateStaticMembers(io::Printer* printer) const {
"static const ::$proto_ns$::internal::LazyString"
" $default_variable_name$;\n");
}
+ if (inlined_) {
+ // `_init_inline_xxx` is used for initializing default instances.
+ format("static std::true_type _init_inline_$name$_;\n");
+ }
}
void StringFieldGenerator::GenerateAccessorDeclarations(
@@ -215,6 +215,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
"template <typename ArgT0, typename... ArgT>\n"
"inline PROTOBUF_ALWAYS_INLINE\n"
"void $classname$::set_$name$(ArgT0&& arg0, ArgT... args) {\n"
+ "$maybe_prepare_split_message$"
" $set_hasbit$\n"
" $field$.$setter$(static_cast<ArgT0 &&>(arg0),"
" args..., GetArenaForAllocation());\n"
@@ -226,6 +227,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
"template <typename ArgT0, typename... ArgT>\n"
"inline PROTOBUF_ALWAYS_INLINE\n"
"void $classname$::set_$name$(ArgT0&& arg0, ArgT... args) {\n"
+ "$maybe_prepare_split_message$"
" $set_hasbit$\n"
" $field$.$setter$(static_cast<ArgT0 &&>(arg0),"
" args..., GetArenaForAllocation(), _internal_$name$_donated(), "
@@ -240,6 +242,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
}
format(
"inline TProtoStringType* $classname$::mutable_$name$() {\n"
+ "$maybe_prepare_split_message$"
" TProtoStringType* _s = _internal_mutable_$name$();\n"
"$annotate_mutable$"
" // @@protoc_insertion_point(field_mutable:$full_name$)\n"
@@ -280,6 +283,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
format(
"inline TProtoStringType* $classname$::$release_name$() {\n"
"$annotate_release$"
+ "$maybe_prepare_split_message$"
" // @@protoc_insertion_point(field_release:$full_name$)\n");
if (HasHasbit(descriptor_)) {
@@ -311,6 +315,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions(
format(
"}\n"
"inline void $classname$::set_allocated_$name$(TProtoStringType* $name$) {\n"
+ "$maybe_prepare_split_message$"
" if ($name$ != nullptr) {\n"
" $set_hasbit$\n"
" } else {\n"
@@ -403,7 +408,7 @@ void StringFieldGenerator::GenerateMessageClearingCode(
void StringFieldGenerator::GenerateMergingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
// TODO(gpike): improve this
- format("_internal_set_$name$(from._internal_$name$());\n");
+ format("_this->_internal_set_$name$(from._internal_$name$());\n");
}
void StringFieldGenerator::GenerateSwappingCode(io::Printer* printer) const {
@@ -440,12 +445,27 @@ void StringFieldGenerator::GenerateConstructorCode(io::Printer* printer) const {
}
}
+void StringFieldGenerator::GenerateCreateSplitMessageCode(
+ io::Printer* printer) const {
+ GOOGLE_CHECK(ShouldSplit(descriptor_, options_));
+ GOOGLE_CHECK(!inlined_);
+ Formatter format(printer, variables_);
+ format("ptr->$name$_.InitDefault();\n");
+ if (IsString(descriptor_, options_) &&
+ descriptor_->default_value_string().empty()) {
+ format(
+ "#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING\n"
+ " ptr->$name$_.Set(\"\", GetArenaForAllocation());\n"
+ "#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING\n");
+ }
+}
+
void StringFieldGenerator::GenerateCopyConstructorCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
GenerateConstructorCode(printer);
if (inlined_) {
- format("new (&$field$) ::_pbi::InlinedStringField();\n");
+ format("new (&_this->$field$) ::_pbi::InlinedStringField();\n");
}
if (HasHasbit(descriptor_)) {
@@ -458,13 +478,13 @@ void StringFieldGenerator::GenerateCopyConstructorCode(
if (!inlined_) {
format(
- "$field$.Set(from._internal_$name$(), \n"
- " GetArenaForAllocation());\n");
+ "_this->$field$.Set(from._internal_$name$(), \n"
+ " _this->GetArenaForAllocation());\n");
} else {
format(
- "$field$.Set(from._internal_$name$(),\n"
- " GetArenaForAllocation(), _internal_$name$_donated(), "
- "&$donating_states_word$, $mask_for_undonate$, this);\n");
+ "_this->$field$.Set(from._internal_$name$(),\n"
+ " _this->GetArenaForAllocation(), _this->_internal_$name$_donated(), "
+ "&_this->$donating_states_word$, $mask_for_undonate$, _this);\n");
}
format.Outdent();
@@ -474,6 +494,10 @@ void StringFieldGenerator::GenerateCopyConstructorCode(
void StringFieldGenerator::GenerateDestructorCode(io::Printer* printer) const {
Formatter format(printer, variables_);
if (!inlined_) {
+ if (ShouldSplit(descriptor_, options_)) {
+ format("$cached_split_ptr$->$name$_.Destroy();\n");
+ return;
+ }
format("$field$.Destroy();\n");
return;
}
@@ -481,6 +505,7 @@ void StringFieldGenerator::GenerateDestructorCode(io::Printer* printer) const {
// Destructor has been implicitly skipped as a union, and even the
// message-owned arena is enabled, arena could still be missing for
// Arena::CreateMessage(nullptr).
+ GOOGLE_DCHECK(!ShouldSplit(descriptor_, options_));
format("$field$.~InlinedStringField();\n");
}
@@ -522,22 +547,43 @@ void StringFieldGenerator::GenerateByteSize(io::Printer* printer) const {
" this->_internal_$name$());\n");
}
-void StringFieldGenerator::GenerateConstinitInitializer(
+void StringFieldGenerator::GenerateConstexprAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
if (inlined_) {
- format("$name$_(nullptr, false)");
+ format("/*decltype($field$)*/{nullptr, false}");
return;
}
if (descriptor_->default_value_string().empty()) {
format(
- "$name$_(&::_pbi::fixed_address_empty_string, "
- "::_pbi::ConstantInitialized{})");
+ "/*decltype($field$)*/{&::_pbi::fixed_address_empty_string, "
+ "::_pbi::ConstantInitialized{}}");
+ } else {
+ format("/*decltype($field$)*/{nullptr, ::_pbi::ConstantInitialized{}}");
+ }
+}
+
+void StringFieldGenerator::GenerateAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ if (ShouldSplit(descriptor_, options_)) {
+ GOOGLE_CHECK(!inlined_);
+ format("decltype(Impl_::Split::$name$_){}");
+ return;
+ }
+ if (!inlined_) {
+ format("decltype($field$){}");
} else {
- format("$name$_(nullptr, ::_pbi::ConstantInitialized{})");
+ format("decltype($field$)(arena)");
}
}
+void StringFieldGenerator::GenerateCopyAggregateInitializer(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("decltype($field$){}");
+}
+
// ===================================================================
StringOneofFieldGenerator::StringOneofFieldGenerator(
@@ -858,7 +904,7 @@ void RepeatedStringFieldGenerator::GenerateClearingCode(
void RepeatedStringFieldGenerator::GenerateMergingCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
- format("$field$.MergeFrom(from.$field$);\n");
+ format("_this->$field$.MergeFrom(from.$field$);\n");
}
void RepeatedStringFieldGenerator::GenerateSwappingCode(
@@ -867,6 +913,12 @@ void RepeatedStringFieldGenerator::GenerateSwappingCode(
format("$field$.InternalSwap(&other->$field$);\n");
}
+void RepeatedStringFieldGenerator::GenerateDestructorCode(
+ io::Printer* printer) const {
+ Formatter format(printer, variables_);
+ format("$field$.~RepeatedPtrField();\n");
+}
+
void RepeatedStringFieldGenerator::GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const {
Formatter format(printer, variables_);
@@ -899,12 +951,6 @@ void RepeatedStringFieldGenerator::GenerateByteSize(
"}\n");
}
-void RepeatedStringFieldGenerator::GenerateConstinitInitializer(
- io::Printer* printer) const {
- Formatter format(printer, variables_);
- format("$name$_()");
-}
-
} // namespace cpp
} // namespace compiler
} // namespace protobuf
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_string_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/string_field.h
index 845bf073a9..db5f18bfb7 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_string_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/string_field.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/cpp/cpp_field.h>
+#include <google/protobuf/compiler/cpp/field.h>
namespace google {
namespace protobuf {
@@ -63,13 +63,17 @@ class StringFieldGenerator : public FieldGenerator {
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
void GenerateConstructorCode(io::Printer* printer) const override;
+ void GenerateCreateSplitMessageCode(io::Printer* printer) const override;
void GenerateCopyConstructorCode(io::Printer* printer) const override;
void GenerateDestructorCode(io::Printer* printer) const override;
void GenerateArenaDestructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
+ void GenerateConstexprAggregateInitializer(
+ io::Printer* printer) const override;
+ void GenerateAggregateInitializer(io::Printer* printer) const override;
+ void GenerateCopyAggregateInitializer(io::Printer* printer) const override;
bool IsInlined() const override { return inlined_; }
ArenaDtorNeeds NeedsArenaDestructor() const override;
@@ -112,11 +116,13 @@ class RepeatedStringFieldGenerator : public FieldGenerator {
void GenerateMergingCode(io::Printer* printer) const override;
void GenerateSwappingCode(io::Printer* printer) const override;
void GenerateConstructorCode(io::Printer* printer) const override {}
- void GenerateCopyConstructorCode(io::Printer* printer) const override {}
+ void GenerateCopyConstructorCode(io::Printer* /*printer*/) const override {
+ GOOGLE_CHECK(!ShouldSplit(descriptor_, options_));
+ }
+ void GenerateDestructorCode(io::Printer* printer) const override;
void GenerateSerializeWithCachedSizesToArray(
io::Printer* printer) const override;
void GenerateByteSize(io::Printer* printer) const override;
- void GenerateConstinitInitializer(io::Printer* printer) const override;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedStringFieldGenerator);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
index 186fa27e5b..55fb60c504 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
@@ -109,7 +109,7 @@ void EnumOneofFieldGenerator::GenerateParsingCode(io::Printer* printer) {
printer->Print(
variables_,
"$oneof_name$_ = input.ReadEnum();\n"
- "$oneof_name$Case_ = $oneof_property_name$OneofCase.$property_name$;\n");
+ "$oneof_name$Case_ = $oneof_property_name$OneofCase.$oneof_case_name$;\n");
}
void EnumOneofFieldGenerator::GenerateSerializationCode(io::Printer* printer) {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.h
index b887a28734..5d1e5f0a99 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_enum_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_primitive_field.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.cc
index ec39b10888..7b1806e192 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.cc
@@ -130,8 +130,9 @@ void FieldGeneratorBase::SetCommonOneofFieldVariables(
} else {
(*variables)["has_property_check"] =
oneof_name() + "Case_ == " + oneof_property_name() +
- "OneofCase." + property_name();
+ "OneofCase." + oneof_case_name();
}
+ (*variables)["oneof_case_name"] = oneof_case_name();
(*variables)["oneof_property_name"] = oneof_property_name();
}
@@ -187,6 +188,10 @@ void FieldGeneratorBase::AddPublicMemberAttributes(io::Printer* printer) {
WriteGeneratedCodeAttributes(printer);
}
+TProtoStringType FieldGeneratorBase::oneof_case_name() {
+ return GetOneofCaseName(descriptor_);
+}
+
TProtoStringType FieldGeneratorBase::oneof_property_name() {
return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), true);
}
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.h
index 154f67ae9c..e553202792 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_field_base.h
@@ -85,6 +85,7 @@ class FieldGeneratorBase : public SourceGeneratorBase {
std::map<TProtoStringType, TProtoStringType>* variables);
TProtoStringType oneof_property_name();
+ TProtoStringType oneof_case_name();
TProtoStringType oneof_name();
TProtoStringType property_name();
TProtoStringType name();
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.cc
index b80131b024..8b5d09e531 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.cc
@@ -393,6 +393,13 @@ TProtoStringType GetPropertyName(const FieldDescriptor* descriptor) {
return property_name;
}
+TProtoStringType GetOneofCaseName(const FieldDescriptor* descriptor) {
+ // The name in a oneof case enum is the same as for the property, but as we always have a "None"
+ // value as well, we need to reserve that by appending an underscore.
+ TProtoStringType property_name = GetPropertyName(descriptor);
+ return property_name == "None" ? "None_" : property_name;
+}
+
TProtoStringType GetOutputFile(const FileDescriptor* descriptor,
const TProtoStringType file_extension,
const bool generate_directories,
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
index db93b6211e..0a325464dc 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_helpers.h
@@ -87,6 +87,8 @@ TProtoStringType GetFieldConstantName(const FieldDescriptor* field);
TProtoStringType GetPropertyName(const FieldDescriptor* descriptor);
+TProtoStringType GetOneofCaseName(const FieldDescriptor* descriptor);
+
int GetFixedSize(FieldDescriptor::Type type);
TProtoStringType UnderscoresToCamelCase(const TProtoStringType& input,
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_map_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_map_field.h
index e8212498c9..b03f65b74a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_map_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_map_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_MAP_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_MAP_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message.cc
index cc966488f7..e96b329cab 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -238,8 +238,8 @@ void MessageGenerator::Generate(io::Printer* printer) {
printer->Print("None = 0,\n");
for (int j = 0; j < oneof->field_count(); j++) {
const FieldDescriptor* field = oneof->field(j);
- printer->Print("$field_property_name$ = $index$,\n",
- "field_property_name", GetPropertyName(field),
+ printer->Print("$oneof_case_name$ = $index$,\n",
+ "oneof_case_name", GetOneofCaseName(field),
"index", StrCat(field->number()));
}
printer->Outdent();
@@ -403,10 +403,10 @@ void MessageGenerator::GenerateCloningCode(io::Printer* printer) {
for (int j = 0; j < oneof->field_count(); j++) {
const FieldDescriptor* field = oneof->field(j);
std::unique_ptr<FieldGeneratorBase> generator(CreateFieldGeneratorInternal(field));
- vars["field_property_name"] = GetPropertyName(field);
+ vars["oneof_case_name"] = GetOneofCaseName(field);
printer->Print(
vars,
- "case $property_name$OneofCase.$field_property_name$:\n");
+ "case $property_name$OneofCase.$oneof_case_name$:\n");
printer->Indent();
generator->GenerateCloningCode(printer);
printer->Print("break;\n");
@@ -635,10 +635,10 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) {
printer->Indent();
for (int j = 0; j < oneof->field_count(); j++) {
const FieldDescriptor* field = oneof->field(j);
- vars["field_property_name"] = GetPropertyName(field);
+ vars["oneof_case_name"] = GetOneofCaseName(field);
printer->Print(
vars,
- "case $property_name$OneofCase.$field_property_name$:\n");
+ "case $property_name$OneofCase.$oneof_case_name$:\n");
printer->Indent();
std::unique_ptr<FieldGeneratorBase> generator(CreateFieldGeneratorInternal(field));
generator->GenerateMergingCode(printer);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.cc
index 034fbd9242..487d01ddef 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.cc
@@ -225,7 +225,7 @@ void MessageOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
" get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : null; }\n"
" set {\n"
" $oneof_name$_ = value;\n"
- " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$property_name$;\n"
+ " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$oneof_case_name$;\n"
" }\n"
"}\n");
if (SupportsPresenceApi(descriptor_)) {
@@ -236,7 +236,7 @@ void MessageOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
printer->Print(
variables_,
"$access_level$ bool Has$property_name$ {\n"
- " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$property_name$; }\n"
+ " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n"
"}\n");
printer->Print(
variables_,
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.h
index 1da8bea08d..2da1d71701 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_message_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_MESSAGE_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_MESSAGE_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
index 9df1dd6abd..e7d51168d1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
@@ -296,7 +296,7 @@ void PrimitiveOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
}
printer->Print(
variables_,
- " $oneof_name$Case_ = $oneof_property_name$OneofCase.$property_name$;\n"
+ " $oneof_name$Case_ = $oneof_property_name$OneofCase.$oneof_case_name$;\n"
" }\n"
"}\n");
if (SupportsPresenceApi(descriptor_)) {
@@ -307,7 +307,7 @@ void PrimitiveOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
printer->Print(
variables_,
"$access_level$ bool Has$property_name$ {\n"
- " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$property_name$; }\n"
+ " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n"
"}\n");
printer->Print(
variables_,
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.h
index f0dbfad791..e98c3698a0 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_primitive_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_PRIMITIVE_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_PRIMITIVE_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
index d462273c4a..c142195cf5 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
@@ -128,7 +128,7 @@ void ReflectionClassGenerator::WriteIntroduction(io::Printer* printer) {
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// source: $file_name$\n"
"// </auto-generated>\n"
- "#pragma warning disable 1591, 0612, 3021\n"
+ "#pragma warning disable 1591, 0612, 3021, 8981\n"
"#region Designer generated code\n"
"\n"
"using pb = global::Google.Protobuf;\n"
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h
index 23d3c0daba..6d6717cc02 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_REPEATED_ENUM_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_REPEATED_ENUM_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h
index c584f2bd6f..ea252ced34 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_REPEATED_MESSAGE_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_REPEATED_MESSAGE_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h
index 36be81d069..2b470e12c9 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_REPEATED_PRIMITIVE_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_REPEATED_PRIMITIVE_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
index 578f54ba69..e638dd862a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
@@ -233,7 +233,7 @@ void WrapperOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
" get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : ($type_name$) null; }\n"
" set {\n"
" $oneof_name$_ = value;\n"
- " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$property_name$;\n"
+ " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$oneof_case_name$;\n"
" }\n"
"}\n");
if (SupportsPresenceApi(descriptor_)) {
@@ -244,7 +244,7 @@ void WrapperOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
printer->Print(
variables_,
"$access_level$ bool Has$property_name$ {\n"
- " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$property_name$; }\n"
+ " get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n"
"}\n");
printer->Print(
variables_,
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h
index 57c4f5e76b..cc8a3137d6 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_WRAPPER_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CSHARP_WRAPPER_FIELD_H__
-#include <string>
-
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_context.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/context.cc
index 9ee161f7f3..463aa1f5ab 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_context.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/context.cc
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/java/java_context.h>
+#include <google/protobuf/compiler/java/context.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_field.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/field.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/stubs/map_util.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_context.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/context.h
index 3fa6af1778..c224ab73f5 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_context.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/context.h
@@ -36,7 +36,7 @@
#include <vector>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/java/java_options.h>
+#include <google/protobuf/compiler/java/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_doc_comment.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/doc_comment.cc
index 2252d122fa..ec7dce7d34 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_doc_comment.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/doc_comment.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_doc_comment.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
#include <vector>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_doc_comment.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/doc_comment.h
index 52d6f77474..52d6f77474 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_doc_comment.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/doc_comment.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum.cc
index 8574527f0b..5ba5e630c0 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum.cc
@@ -32,19 +32,22 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_enum.h>
+#include <google/protobuf/compiler/java/enum.h>
#include <map>
#include <string>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/descriptor.pb.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -390,3 +393,5 @@ bool EnumGenerator::CanUseEnumValues() {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum.h
index 0a2c363b53..0a2c363b53 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field.cc
index 59df1132e7..97e1742cc9 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_enum_field.h>
+#include <google/protobuf/compiler/java/enum_field.h>
#include <cstdint>
#include <map>
@@ -43,10 +43,13 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -280,7 +283,7 @@ void ImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: $kt_type$\n"
+ "$kt_deprecation$ var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -291,7 +294,7 @@ void ImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
@@ -299,7 +302,7 @@ void ImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
}
@@ -859,7 +862,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_,
- LIST_INDEXED_GETTER,
+ LIST_INDEXED_SETTER,
/* builder */ true);
printer->Print(
variables_,
@@ -1082,12 +1085,12 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -1100,7 +1103,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -1112,7 +1115,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n"
" add(value)\n"
@@ -1123,7 +1126,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -1136,7 +1139,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n"
@@ -1148,7 +1151,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -1159,7 +1162,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
@@ -1174,3 +1177,5 @@ TProtoStringType RepeatedImmutableEnumFieldGenerator::GetBoxedType() const {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field.h
index 3fb65ae546..6cf28fb126 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field_lite.cc
index 33cff57cf3..c90939ada6 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field_lite.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_enum_field_lite.h>
+#include <google/protobuf/compiler/java/enum_field_lite.h>
#include <cstdint>
#include <map>
@@ -43,10 +43,13 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -285,7 +288,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: $kt_type$\n"
+ "$kt_deprecation$var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -296,7 +299,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
@@ -304,7 +307,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
}
@@ -824,12 +827,12 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -842,7 +845,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -854,7 +857,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n"
" add(value)\n"
@@ -865,7 +868,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -878,7 +881,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n"
@@ -890,7 +893,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -901,7 +904,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
@@ -916,3 +919,5 @@ TProtoStringType RepeatedImmutableEnumFieldLiteGenerator::GetBoxedType() const {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field_lite.h
index eb8e8cd313..df2f6fa10a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_field_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_field_lite.h
@@ -39,7 +39,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_lite.cc
index 7ec742d19f..7fdd4ab9b8 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_lite.cc
@@ -32,17 +32,17 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_enum_lite.h>
+#include <google/protobuf/compiler/java/enum_lite.h>
#include <map>
#include <string>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/stubs/map_util.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_lite.h
index 50f3fe7b1a..50f3fe7b1a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_enum_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/enum_lite.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension.cc
index d90994503d..0983366c4f 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension.cc
@@ -32,14 +32,17 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_extension.h>
+#include <google/protobuf/compiler/java/extension.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -170,3 +173,5 @@ int ImmutableExtensionGenerator::GenerateRegistrationCode(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension.h
index f9bd326f9b..f9bd326f9b 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension_lite.cc
index 0135d9ee03..d51d9d2ba8 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension_lite.cc
@@ -28,14 +28,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/java/java_extension_lite.h>
+#include <google/protobuf/compiler/java/extension_lite.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -113,3 +116,5 @@ int ImmutableExtensionLiteGenerator::GenerateRegistrationCode(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension_lite.h
index 3e13db7028..0d013c862c 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_extension_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/extension_lite.h
@@ -35,7 +35,7 @@
#include <string>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/java/java_extension.h>
+#include <google/protobuf/compiler/java/extension.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/field.cc
index 9373e568cf..84487ac7a1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/field.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
#include <memory>
@@ -41,18 +41,18 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_enum_field.h>
-#include <google/protobuf/compiler/java/java_enum_field_lite.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_map_field.h>
-#include <google/protobuf/compiler/java/java_map_field_lite.h>
-#include <google/protobuf/compiler/java/java_message_field.h>
-#include <google/protobuf/compiler/java/java_message_field_lite.h>
-#include <google/protobuf/compiler/java/java_primitive_field.h>
-#include <google/protobuf/compiler/java/java_primitive_field_lite.h>
-#include <google/protobuf/compiler/java/java_string_field.h>
-#include <google/protobuf/compiler/java/java_string_field_lite.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/enum_field.h>
+#include <google/protobuf/compiler/java/enum_field_lite.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/map_field.h>
+#include <google/protobuf/compiler/java/map_field_lite.h>
+#include <google/protobuf/compiler/java/message_field.h>
+#include <google/protobuf/compiler/java/message_field_lite.h>
+#include <google/protobuf/compiler/java/primitive_field.h>
+#include <google/protobuf/compiler/java/primitive_field_lite.h>
+#include <google/protobuf/compiler/java/string_field.h>
+#include <google/protobuf/compiler/java/string_field_lite.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/field.h
index 481fbdb456..481fbdb456 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/field.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_file.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/file.cc
index c2261ddfeb..401599765b 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_file.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/file.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_file.h>
+#include <google/protobuf/compiler/java/file.h>
#include <memory>
#include <set>
@@ -42,18 +42,21 @@
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/dynamic_message.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_enum.h>
-#include <google/protobuf/compiler/java/java_enum_lite.h>
-#include <google/protobuf/compiler/java/java_extension.h>
-#include <google/protobuf/compiler/java/java_generator_factory.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_message.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
-#include <google/protobuf/compiler/java/java_service.h>
-#include <google/protobuf/compiler/java/java_shared_code_generator.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/enum.h>
+#include <google/protobuf/compiler/java/enum_lite.h>
+#include <google/protobuf/compiler/java/extension.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/message.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+#include <google/protobuf/compiler/java/service.h>
+#include <google/protobuf/compiler/java/shared_code_generator.h>
#include <google/protobuf/descriptor.pb.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -247,7 +250,7 @@ bool FileGenerator::Validate(TProtoStringType* error) {
<< "generate full runtime code for Java. To use Java Lite runtime, "
<< "users should use the Java Lite plugin instead. See:\n"
<< " "
- "https://github.com/protocolbuffers/protobuf/blob/master/java/"
+ "https://github.com/protocolbuffers/protobuf/blob/main/java/"
"lite.md";
}
return true;
@@ -732,3 +735,5 @@ bool FileGenerator::ShouldIncludeDependency(const FileDescriptor* descriptor,
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_file.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/file.h
index 7a5a8ec01d..0063a18816 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_file.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/file.h
@@ -40,7 +40,7 @@
#include <vector>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/java/java_options.h>
+#include <google/protobuf/compiler/java/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator.cc
index ce198c7692..03be2a417e 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_generator.h>
+#include <google/protobuf/compiler/java/generator.h>
#include <memory>
@@ -40,12 +40,12 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/stubs/stringprintf.h>
-#include <google/protobuf/compiler/java/java_file.h>
-#include <google/protobuf/compiler/java/java_generator_factory.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
-#include <google/protobuf/compiler/java/java_options.h>
-#include <google/protobuf/compiler/java/java_shared_code_generator.h>
+#include <google/protobuf/compiler/java/file.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+#include <google/protobuf/compiler/java/options.h>
+#include <google/protobuf/compiler/java/shared_code_generator.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/stubs/strutil.h>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator.h
index e08c980788..e08c980788 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator_factory.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator_factory.cc
index 3a62adb103..dd526ba7c7 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator_factory.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator_factory.cc
@@ -30,17 +30,17 @@
// Author: liujisi@google.com (Pherl Liu)
-#include <google/protobuf/compiler/java/java_generator_factory.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_enum_field.h>
-#include <google/protobuf/compiler/java/java_extension.h>
-#include <google/protobuf/compiler/java/java_extension_lite.h>
-#include <google/protobuf/compiler/java/java_field.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_message.h>
-#include <google/protobuf/compiler/java/java_message_lite.h>
-#include <google/protobuf/compiler/java/java_service.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/enum_field.h>
+#include <google/protobuf/compiler/java/extension.h>
+#include <google/protobuf/compiler/java/extension_lite.h>
+#include <google/protobuf/compiler/java/field.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/message.h>
+#include <google/protobuf/compiler/java/message_lite.h>
+#include <google/protobuf/compiler/java/service.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator_factory.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator_factory.h
index 807bca383a..807bca383a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_generator_factory.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/generator_factory.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_helpers.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/helpers.cc
index 3f1f058c9e..96444c58fa 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_helpers.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/helpers.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_helpers.h>
+#include <google/protobuf/compiler/java/helpers.h>
#include <algorithm>
#include <cstdint>
@@ -44,11 +44,14 @@
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/stringprintf.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
-#include <google/protobuf/compiler/java/java_names.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+#include <google/protobuf/compiler/java/names.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/stubs/hash.h> // for hash<T *>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -83,8 +86,7 @@ const char* kForbiddenWordList[] = {
"AllFields",
"DescriptorForType",
"InitializationErrorString",
- // TODO(b/219045204): re-enable
- // "UnknownFields",
+ "UnknownFields",
// obsolete. kept for backwards compatibility of generated code
"CachedSize",
};
@@ -261,18 +263,18 @@ TProtoStringType UnderscoresToCamelCaseCheckReserved(const FieldDescriptor* fiel
return name;
}
+// Names that should be avoided as field names in Kotlin.
+// All Kotlin hard keywords are in this list.
+const std::unordered_set<TProtoStringType>* kKotlinForbiddenNames =
+ new std::unordered_set<TProtoStringType>({
+ "as", "as?", "break", "class", "continue", "do", "else",
+ "false", "for", "fun", "if", "in", "!in", "interface",
+ "is", "!is", "null", "object", "package", "return", "super",
+ "this", "throw", "true", "try", "typealias", "typeof", "val",
+ "var", "when", "while",
+ });
+
bool IsForbiddenKotlin(const TProtoStringType& field_name) {
- // Names that should be avoided as field names in Kotlin.
- // All Kotlin hard keywords are in this list.
- const std::unordered_set<TProtoStringType>* kKotlinForbiddenNames =
- new std::unordered_set<TProtoStringType>({
- "as", "as?", "break", "class", "continue", "do",
- "else", "false", "for", "fun", "if", "in",
- "!in", "interface", "is", "!is", "null", "object",
- "package", "return", "super", "this", "throw", "true",
- "try", "typealias", "typeof", "val", "var", "when",
- "while",
- });
return kKotlinForbiddenNames->find(field_name) !=
kKotlinForbiddenNames->end();
}
@@ -1109,3 +1111,5 @@ void EscapeUtf16ToString(uint16_t code, TProtoStringType* output) {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/helpers.h
index 59bb718bc9..7f4c4aad14 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_helpers.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/helpers.h
@@ -40,7 +40,7 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/compiler/java/java_context.h>
+#include <google/protobuf/compiler/java/context.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_kotlin_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/kotlin_generator.cc
index fc0d823671..570840cfc1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_kotlin_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/kotlin_generator.cc
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/java/java_kotlin_generator.h>
+#include <google/protobuf/compiler/java/kotlin_generator.h>
#include <google/protobuf/compiler/code_generator.h>
-#include <google/protobuf/compiler/java/java_file.h>
-#include <google/protobuf/compiler/java/java_generator.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_options.h>
+#include <google/protobuf/compiler/java/file.h>
+#include <google/protobuf/compiler/java/generator.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_kotlin_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/kotlin_generator.h
index 195acb6537..195acb6537 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_kotlin_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/kotlin_generator.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field.cc
index 7a93f4696d..37bad491c0 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field.cc
@@ -28,13 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/java/java_map_field.h>
+#include <google/protobuf/compiler/java/map_field.h>
#include <google/protobuf/io/printer.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -695,13 +698,13 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(
variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -714,7 +717,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
printer->Print(
variables_,
"@JvmName(\"put$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .put(key: $kt_key_type$, value: $kt_value_type$) {\n"
" $kt_dsl_builder$.${$put$capitalized_name$$}$(key, value)\n"
@@ -726,7 +729,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"set$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslMap"
+ "inline operator fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .set(key: $kt_key_type$, value: $kt_value_type$) {\n"
" put(key, value)\n"
@@ -737,7 +740,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"remove$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .remove(key: $kt_key_type$) {\n"
" $kt_dsl_builder$.${$remove$capitalized_name$$}$(key)\n"
@@ -748,7 +751,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"putAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .putAll(map: kotlin.collections.Map<$kt_key_type$, $kt_value_type$>) "
"{\n"
@@ -760,7 +763,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
@@ -887,3 +890,5 @@ TProtoStringType ImmutableMapFieldGenerator::GetBoxedType() const {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field.h
index 1d2b7ad398..fe0a4819a9 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field.h
@@ -31,7 +31,7 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MAP_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_JAVA_MAP_FIELD_H__
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field_lite.cc
index 8817f27339..807743afcf 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field_lite.cc
@@ -28,15 +28,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/java/java_map_field_lite.h>
+#include <google/protobuf/compiler/java/map_field_lite.h>
#include <cstdint>
#include <google/protobuf/io/printer.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -835,13 +838,13 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(
variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -854,7 +857,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(
variables_,
"@JvmName(\"put$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .put(key: $kt_key_type$, value: $kt_value_type$) {\n"
" $kt_dsl_builder$.${$put$capitalized_name$$}$(key, value)\n"
@@ -866,7 +869,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"set$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslMap"
+ "inline operator fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .set(key: $kt_key_type$, value: $kt_value_type$) {\n"
" put(key, value)\n"
@@ -877,7 +880,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"remove$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .remove(key: $kt_key_type$) {\n"
" $kt_dsl_builder$.${$remove$capitalized_name$$}$(key)\n"
@@ -888,7 +891,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"putAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .putAll(map: kotlin.collections.Map<$kt_key_type$, $kt_value_type$>) "
"{\n"
@@ -900,7 +903,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslMap"
+ "fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
@@ -920,3 +923,5 @@ TProtoStringType ImmutableMapFieldLiteGenerator::GetBoxedType() const {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field_lite.h
index f2773f5b35..de2cc51057 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_map_field_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/map_field_lite.h
@@ -33,7 +33,7 @@
#include <cstdint>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/message.cc
index 9a5c25a538..bcd437821f 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_message.h>
+#include <google/protobuf/compiler/java/message.h>
#include <algorithm>
#include <cstdint>
@@ -45,17 +45,20 @@
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_enum.h>
-#include <google/protobuf/compiler/java/java_extension.h>
-#include <google/protobuf/compiler/java/java_generator_factory.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_message_builder.h>
-#include <google/protobuf/compiler/java/java_message_builder_lite.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/enum.h>
+#include <google/protobuf/compiler/java/extension.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/message_builder.h>
+#include <google/protobuf/compiler/java/message_builder_lite.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/descriptor.pb.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -1410,10 +1413,10 @@ void ImmutableMessageGenerator::GenerateKotlinDsl(io::Printer* printer) const {
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@com.google.protobuf.kotlin.ProtoDslMarker\n");
printer->Print(
- "public class Dsl private constructor(\n"
+ "class Dsl private constructor(\n"
" private val _builder: $message$.Builder\n"
") {\n"
- " public companion object {\n"
+ " companion object {\n"
" @kotlin.jvm.JvmSynthetic\n"
" @kotlin.PublishedApi\n"
" internal fun _create(builder: $message$.Builder): Dsl = "
@@ -1435,10 +1438,10 @@ void ImmutableMessageGenerator::GenerateKotlinDsl(io::Printer* printer) const {
for (auto oneof : oneofs_) {
printer->Print(
- "public val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n"
+ "val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n"
" @JvmName(\"get$oneof_capitalized_name$Case\")\n"
" get() = _builder.get$oneof_capitalized_name$Case()\n\n"
- "public fun clear$oneof_capitalized_name$() {\n"
+ "fun clear$oneof_capitalized_name$() {\n"
" _builder.clear$oneof_capitalized_name$()\n"
"}\n",
"oneof_name", context_->GetOneofGeneratorInfo(oneof)->name,
@@ -1459,7 +1462,7 @@ void ImmutableMessageGenerator::GenerateKotlinMembers(
io::Printer* printer) const {
printer->Print(
"@kotlin.jvm.JvmName(\"-initialize$camelcase_name$\")\n"
- "public inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
+ "inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): "
"$message$ "
"=\n"
@@ -1469,7 +1472,7 @@ void ImmutableMessageGenerator::GenerateKotlinMembers(
"message_kt", name_resolver_->GetKotlinExtensionsClassName(descriptor_),
"message", name_resolver_->GetClassName(descriptor_, true));
- printer->Print("public object $name$Kt {\n", "name", descriptor_->name());
+ printer->Print("object $name$Kt {\n", "name", descriptor_->name());
printer->Indent();
GenerateKotlinDsl(printer);
for (int i = 0; i < descriptor_->nested_type_count(); i++) {
@@ -1485,7 +1488,7 @@ void ImmutableMessageGenerator::GenerateTopLevelKotlinMembers(
io::Printer* printer) const {
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
+ "inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): "
"$message$ =\n"
" $message_kt$.Dsl._create(this.toBuilder()).apply { block() "
@@ -1525,7 +1528,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@Suppress(\"UNCHECKED_CAST\")\n"
"@kotlin.jvm.JvmSynthetic\n"
- "public operator fun <T : kotlin.Any> get(extension: "
+ "operator fun <T : kotlin.Any> get(extension: "
"com.google.protobuf.ExtensionLite<$message$, T>): T {\n"
" return if (extension.isRepeated) {\n"
" get(extension as com.google.protobuf.ExtensionLite<$message$, "
@@ -1541,7 +1544,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@kotlin.jvm.JvmName(\"-getRepeatedExtension\")\n"
- "public operator fun <E : kotlin.Any> get(\n"
+ "operator fun <E : kotlin.Any> get(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, List<E>>\n"
"): com.google.protobuf.kotlin.ExtensionList<E, $message$> {\n"
" return com.google.protobuf.kotlin.ExtensionList(extension, "
@@ -1551,7 +1554,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public operator fun contains(extension: "
+ "operator fun contains(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>): "
"Boolean {\n"
" return _builder.hasExtension(extension)\n"
@@ -1560,7 +1563,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public fun clear(extension: "
+ "fun clear(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>) "
"{\n"
" _builder.clearExtension(extension)\n"
@@ -1580,7 +1583,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <T : Comparable<T>> set(\n"
+ "inline operator fun <T : Comparable<T>> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n"
") {\n"
@@ -1591,7 +1594,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun set(\n"
+ "inline operator fun set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, "
"com.google.protobuf.ByteString>,\n"
" value: com.google.protobuf.ByteString\n"
@@ -1603,7 +1606,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <T : com.google.protobuf.MessageLite> set(\n"
+ "inline operator fun <T : com.google.protobuf.MessageLite> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n"
") {\n"
@@ -1613,7 +1616,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
+ "fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.add(value: E) {\n"
" _builder.addExtension(this.extension, value)\n"
"}\n\n",
@@ -1622,7 +1625,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <E : kotlin.Any> "
+ "inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign"
"(value: E) {\n"
@@ -1632,7 +1635,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
+ "fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.addAll(values: Iterable<E>) {\n"
" for (value in values) {\n"
" add(value)\n"
@@ -1643,7 +1646,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <E : kotlin.Any> "
+ "inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign(values: "
"Iterable<E>) {\n"
@@ -1653,7 +1656,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public operator fun <E : kotlin.Any> "
+ "operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.set(index: Int, value: "
"E) {\n"
@@ -1664,7 +1667,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline fun com.google.protobuf.kotlin.ExtensionList<*, "
+ "inline fun com.google.protobuf.kotlin.ExtensionList<*, "
"$message$>.clear() {\n"
" clear(extension)\n"
"}\n\n",
@@ -1749,3 +1752,5 @@ void ImmutableMessageGenerator::GenerateAnyMethods(io::Printer* printer) {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/message.h
index cc24d73d35..2dbd0dd9bc 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder.cc
index e8ff5fa33b..3bbb7ae382 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_message_builder.h>
+#include <google/protobuf/compiler/java/message_builder.h>
#include <algorithm>
#include <map>
@@ -44,15 +44,18 @@
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_enum.h>
-#include <google/protobuf/compiler/java/java_extension.h>
-#include <google/protobuf/compiler/java/java_generator_factory.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/enum.h>
+#include <google/protobuf/compiler/java/extension.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/descriptor.pb.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -710,3 +713,5 @@ void MessageBuilderGenerator::GenerateIsInitialized(io::Printer* printer) {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder.h
index 619bf9eca1..f9c9a00a0c 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder_lite.cc
index 5f90e8d691..bf41a71107 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder_lite.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_message_builder_lite.h>
+#include <google/protobuf/compiler/java/message_builder_lite.h>
#include <algorithm>
#include <map>
@@ -44,15 +44,18 @@
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_enum.h>
-#include <google/protobuf/compiler/java/java_extension.h>
-#include <google/protobuf/compiler/java/java_generator_factory.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/enum.h>
+#include <google/protobuf/compiler/java/extension.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/descriptor.pb.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -149,3 +152,5 @@ void MessageBuilderLiteGenerator::GenerateCommonBuilderMethods(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder_lite.h
index 03ecbf870b..0d895fcf05 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_builder_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_builder_lite.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field.cc
index 5db89dbe21..a16abfcb34 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_message_field.h>
+#include <google/protobuf/compiler/java/message_field.h>
#include <map>
#include <string>
@@ -40,10 +40,13 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -418,7 +421,7 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: $kt_type$\n"
+ "$kt_deprecation$var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -429,14 +432,14 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
@@ -446,7 +449,7 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
void ImmutableMessageFieldGenerator::GenerateKotlinOrNull(io::Printer* printer) const {
if (descriptor_->has_optional_keyword()) {
printer->Print(variables_,
- "public val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n"
+ "val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n"
" get() = $kt_dsl_builder$.$name$OrNull\n");
}
}
@@ -1416,12 +1419,12 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -1434,7 +1437,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -1446,7 +1449,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n"
" add(value)\n"
@@ -1457,7 +1460,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -1470,7 +1473,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n"
@@ -1482,7 +1485,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -1493,7 +1496,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
@@ -1504,3 +1507,5 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field.h
index 94a144d4ae..602612e4ad 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field_lite.cc
index 523190d85a..23d3c410f6 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field_lite.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_message_field_lite.h>
+#include <google/protobuf/compiler/java/message_field_lite.h>
#include <cstdint>
#include <map>
@@ -41,10 +41,13 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -287,7 +290,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: $kt_type$\n"
+ "$kt_deprecation$var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -298,14 +301,14 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
GenerateKotlinOrNull(printer);
@@ -314,7 +317,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
void ImmutableMessageFieldLiteGenerator::GenerateKotlinOrNull(io::Printer* printer) const {
if (descriptor_->has_optional_keyword()) {
printer->Print(variables_,
- "public val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n"
+ "val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n"
" get() = $kt_dsl_builder$.$name$OrNull\n");
}
}
@@ -803,12 +806,12 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -821,7 +824,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -833,7 +836,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n"
" add(value)\n"
@@ -844,7 +847,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -857,7 +860,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n"
@@ -869,7 +872,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -880,7 +883,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
@@ -891,3 +894,5 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field_lite.h
index 189d760afe..5bf9607bc8 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_field_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_field_lite.h
@@ -39,7 +39,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_lite.cc
index 615dece6cb..90bd4b2382 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_lite.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_message_lite.h>
+#include <google/protobuf/compiler/java/message_lite.h>
#include <algorithm>
#include <cstdint>
@@ -45,17 +45,20 @@
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_enum_lite.h>
-#include <google/protobuf/compiler/java/java_extension_lite.h>
-#include <google/protobuf/compiler/java/java_generator_factory.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_message_builder.h>
-#include <google/protobuf/compiler/java/java_message_builder_lite.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/enum_lite.h>
+#include <google/protobuf/compiler/java/extension_lite.h>
+#include <google/protobuf/compiler/java/generator_factory.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/message_builder.h>
+#include <google/protobuf/compiler/java/message_builder_lite.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <google/protobuf/descriptor.pb.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -731,10 +734,10 @@ void ImmutableMessageLiteGenerator::GenerateKotlinDsl(
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@com.google.protobuf.kotlin.ProtoDslMarker\n");
printer->Print(
- "public class Dsl private constructor(\n"
+ "class Dsl private constructor(\n"
" private val _builder: $message$.Builder\n"
") {\n"
- " public companion object {\n"
+ " companion object {\n"
" @kotlin.jvm.JvmSynthetic\n"
" @kotlin.PublishedApi\n"
" internal fun _create(builder: $message$.Builder): Dsl = "
@@ -756,10 +759,10 @@ void ImmutableMessageLiteGenerator::GenerateKotlinDsl(
for (auto oneof : oneofs_) {
printer->Print(
- "public val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n"
+ "val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n"
" @JvmName(\"get$oneof_capitalized_name$Case\")\n"
" get() = _builder.get$oneof_capitalized_name$Case()\n\n"
- "public fun clear$oneof_capitalized_name$() {\n"
+ "fun clear$oneof_capitalized_name$() {\n"
" _builder.clear$oneof_capitalized_name$()\n"
"}\n",
"oneof_name", context_->GetOneofGeneratorInfo(oneof)->name,
@@ -780,7 +783,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
io::Printer* printer) const {
printer->Print(
"@kotlin.jvm.JvmName(\"-initialize$camelcase_name$\")\n"
- "public inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
+ "inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): "
"$message$ =\n"
" $message_kt$.Dsl._create($message$.newBuilder()).apply { block() "
@@ -789,7 +792,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
"message_kt", name_resolver_->GetKotlinExtensionsClassName(descriptor_),
"message", name_resolver_->GetClassName(descriptor_, true));
- printer->Print("public object $name$Kt {\n", "name", descriptor_->name());
+ printer->Print("object $name$Kt {\n", "name", descriptor_->name());
printer->Indent();
GenerateKotlinDsl(printer);
for (int i = 0; i < descriptor_->nested_type_count(); i++) {
@@ -804,7 +807,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
void ImmutableMessageLiteGenerator::GenerateTopLevelKotlinMembers(
io::Printer* printer) const {
printer->Print(
- "public inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
+ "inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): "
"$message$ =\n"
" $message_kt$.Dsl._create(this.toBuilder()).apply { block() "
@@ -846,7 +849,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@Suppress(\"UNCHECKED_CAST\")\n"
"@kotlin.jvm.JvmSynthetic\n"
- "public operator fun <T : kotlin.Any> get(extension: "
+ "operator fun <T : kotlin.Any> get(extension: "
"com.google.protobuf.ExtensionLite<$message$, T>): T {\n"
" return if (extension.isRepeated) {\n"
" get(extension as com.google.protobuf.ExtensionLite<$message$, "
@@ -862,7 +865,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@kotlin.jvm.JvmName(\"-getRepeatedExtension\")\n"
- "public operator fun <E : kotlin.Any> get(\n"
+ "operator fun <E : kotlin.Any> get(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, List<E>>\n"
"): com.google.protobuf.kotlin.ExtensionList<E, $message$> {\n"
" return com.google.protobuf.kotlin.ExtensionList(extension, "
@@ -872,7 +875,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public operator fun contains(extension: "
+ "operator fun contains(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>): "
"Boolean {\n"
" return _builder.hasExtension(extension)\n"
@@ -881,7 +884,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public fun clear(extension: "
+ "fun clear(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>) "
"{\n"
" _builder.clearExtension(extension)\n"
@@ -901,7 +904,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <T : Comparable<T>> set(\n"
+ "inline operator fun <T : Comparable<T>> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n"
") {\n"
@@ -912,7 +915,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun set(\n"
+ "inline operator fun set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, "
"com.google.protobuf.ByteString>,\n"
" value: com.google.protobuf.ByteString\n"
@@ -924,7 +927,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <T : com.google.protobuf.MessageLite> set(\n"
+ "inline operator fun <T : com.google.protobuf.MessageLite> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n"
") {\n"
@@ -934,7 +937,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
+ "fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.add(value: E) {\n"
" _builder.addExtension(this.extension, value)\n"
"}\n\n",
@@ -943,7 +946,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <E : kotlin.Any> "
+ "inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign"
"(value: E) {\n"
@@ -953,7 +956,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
+ "fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.addAll(values: Iterable<E>) {\n"
" for (value in values) {\n"
" add(value)\n"
@@ -964,7 +967,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun <E : kotlin.Any> "
+ "inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign(values: "
"Iterable<E>) {\n"
@@ -974,7 +977,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
- "public operator fun <E : kotlin.Any> "
+ "operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.set(index: Int, value: "
"E) {\n"
@@ -985,7 +988,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print(
"@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline fun com.google.protobuf.kotlin.ExtensionList<*, "
+ "inline fun com.google.protobuf.kotlin.ExtensionList<*, "
"$message$>.clear() {\n"
" clear(extension)\n"
"}\n\n",
@@ -996,3 +999,5 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_lite.h
index c0afbc99ec..d1e4b68949 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_message_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/message_lite.h
@@ -35,11 +35,8 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_LITE_H__
#define GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_LITE_H__
-#include <map>
-#include <string>
-
-#include <google/protobuf/compiler/java/java_field.h>
-#include <google/protobuf/compiler/java/java_message.h>
+#include <google/protobuf/compiler/java/field.h>
+#include <google/protobuf/compiler/java/message.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_name_resolver.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/name_resolver.cc
index a257409ab7..5cadecadf3 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_name_resolver.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/name_resolver.cc
@@ -28,15 +28,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
#include <map>
#include <string>
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/stubs/substitute.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_names.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/names.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -378,3 +381,5 @@ TProtoStringType ClassNameResolver::GetDowngradedClassName(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_name_resolver.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/name_resolver.h
index 46f699c6aa..9744e8739f 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_name_resolver.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/name_resolver.h
@@ -36,6 +36,9 @@
#include <google/protobuf/stubs/common.h>
+// Must be last.
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
class Descriptor;
@@ -151,4 +154,6 @@ class ClassNameResolver {
} // namespace protobuf
} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_NAME_RESOLVER_H__
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_names.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/names.h
index 9aeddc81cc..9aeddc81cc 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_names.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/names.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_options.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/options.h
index 1454c23206..1454c23206 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_options.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/options.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field.cc
index abe88b67e0..adb556a892 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_primitive_field.h>
+#include <google/protobuf/compiler/java/primitive_field.h>
#include <cstdint>
#include <map>
@@ -43,10 +43,10 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
namespace google {
namespace protobuf {
@@ -320,7 +320,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: $kt_type$\n"
+ "$kt_deprecation$var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -331,7 +331,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
@@ -339,7 +339,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
}
@@ -849,12 +849,12 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -867,7 +867,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -879,7 +879,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n"
" add(value)\n"
@@ -890,7 +890,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -903,7 +903,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n"
@@ -915,7 +915,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -926,7 +926,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field.h
index 8883b83d66..a2c0041388 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field.h
@@ -38,7 +38,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field_lite.cc
index 20ba2a4051..5fd47c47e1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field_lite.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_primitive_field_lite.h>
+#include <google/protobuf/compiler/java/primitive_field_lite.h>
#include <cstdint>
#include <map>
@@ -43,10 +43,10 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
namespace google {
namespace protobuf {
@@ -325,7 +325,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: $kt_type$\n"
+ "$kt_deprecation$var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -336,7 +336,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
@@ -344,7 +344,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
}
@@ -671,12 +671,12 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$ public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -689,7 +689,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -701,7 +701,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n"
" add(value)\n"
@@ -712,7 +712,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -725,7 +725,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n"
@@ -737,7 +737,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -748,7 +748,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field_lite.h
index a7f03e2acc..1eaf8d8e09 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_primitive_field_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/primitive_field_lite.h
@@ -39,7 +39,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_service.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/service.cc
index 59e11deb77..602ab4c7b9 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_service.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/service.cc
@@ -32,14 +32,17 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_service.h>
+#include <google/protobuf/compiler/java/service.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+
+// Must be last.
+#include <google/protobuf/port_def.inc>
namespace google {
namespace protobuf {
@@ -472,3 +475,5 @@ void ImmutableServiceGenerator::GenerateBlockingMethodSignature(
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_service.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/service.h
index a03a3de561..a03a3de561 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_service.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/service.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_shared_code_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/shared_code_generator.cc
index 7d7e95dfba..0a8b8edb01 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_shared_code_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/shared_code_generator.cc
@@ -30,7 +30,7 @@
// Author: xiaofeng@google.com (Feng Xiao)
-#include <google/protobuf/compiler/java/java_shared_code_generator.h>
+#include <google/protobuf/compiler/java/shared_code_generator.h>
#include <memory>
@@ -39,9 +39,9 @@
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
-#include <google/protobuf/compiler/java/java_names.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
+#include <google/protobuf/compiler/java/names.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_shared_code_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/shared_code_generator.h
index 93fe6d7996..026124715a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_shared_code_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/shared_code_generator.h
@@ -40,7 +40,7 @@
#include <vector>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/java/java_options.h>
+#include <google/protobuf/compiler/java/options.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field.cc
index 5628441a74..066e3bd701 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field.cc
@@ -33,7 +33,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_string_field.h>
+#include <google/protobuf/compiler/java/string_field.h>
#include <cstdint>
#include <map>
@@ -44,10 +44,10 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
namespace google {
namespace protobuf {
@@ -379,7 +379,7 @@ void ImmutableStringFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: kotlin.String\n"
+ "$kt_deprecation$var $kt_name$: kotlin.String\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -390,7 +390,7 @@ void ImmutableStringFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
@@ -398,7 +398,7 @@ void ImmutableStringFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
}
@@ -963,13 +963,13 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
// property for List<String>
WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER);
printer->Print(variables_,
- "$kt_deprecation$public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n"
@@ -983,7 +983,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: kotlin.String) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -996,7 +996,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: kotlin.String) {\n"
" add(value)\n"
@@ -1009,7 +1009,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -1023,7 +1023,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" addAll(values)\n"
@@ -1036,7 +1036,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: kotlin.String) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -1047,7 +1047,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field.h
index f282163b55..3a83f1fc2a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field.h
@@ -39,7 +39,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field_lite.cc b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field_lite.cc
index d2cfad0dcd..91cb53d484 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field_lite.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field_lite.cc
@@ -33,7 +33,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#include <google/protobuf/compiler/java/java_string_field_lite.h>
+#include <google/protobuf/compiler/java/string_field_lite.h>
#include <cstdint>
#include <map>
@@ -44,10 +44,10 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/compiler/java/java_context.h>
-#include <google/protobuf/compiler/java/java_doc_comment.h>
-#include <google/protobuf/compiler/java/java_helpers.h>
-#include <google/protobuf/compiler/java/java_name_resolver.h>
+#include <google/protobuf/compiler/java/context.h>
+#include <google/protobuf/compiler/java/doc_comment.h>
+#include <google/protobuf/compiler/java/helpers.h>
+#include <google/protobuf/compiler/java/name_resolver.h>
namespace google {
namespace protobuf {
@@ -313,7 +313,7 @@ void ImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
- "$kt_deprecation$public var $kt_name$: kotlin.String\n"
+ "$kt_deprecation$var $kt_name$: kotlin.String\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@@ -324,7 +324,7 @@ void ImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false);
printer->Print(variables_,
- "public fun ${$clear$kt_capitalized_name$$}$() {\n"
+ "fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n");
@@ -332,7 +332,7 @@ void ImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
- "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
+ "fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n");
}
@@ -748,17 +748,17 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n"
"@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
- "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
+ "class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n");
// property for List<String>
WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER);
printer->Print(
variables_,
- "$kt_deprecation$public val $kt_name$: "
+ "$kt_deprecation$ val $kt_name$: "
"com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>\n"
- " @kotlin.OptIn"
+ "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
" get() = com.google.protobuf.kotlin.DslList(\n"
" $kt_dsl_builder$.${$get$capitalized_name$List$}$()\n"
@@ -770,7 +770,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: kotlin.String) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@@ -783,7 +783,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: kotlin.String) {\n"
" add(value)\n"
@@ -796,7 +796,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@@ -810,7 +810,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n"
- "public inline operator fun com.google.protobuf.kotlin.DslList"
+ "inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" addAll(values)\n"
@@ -823,7 +823,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
- "public operator fun com.google.protobuf.kotlin.DslList"
+ "operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: kotlin.String) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@@ -834,7 +834,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
- "public fun com.google.protobuf.kotlin.DslList"
+ "fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field_lite.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field_lite.h
index 02cf5c1657..73e51e3238 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/java/java_string_field_lite.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/string_field_lite.h
@@ -40,7 +40,7 @@
#include <map>
#include <string>
-#include <google/protobuf/compiler/java/java_field.h>
+#include <google/protobuf/compiler/java/field.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.cc
deleted file mode 100644
index 8c9fadf067..0000000000
--- a/contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.cc
+++ /dev/null
@@ -1,3937 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <assert.h>
-#include <google/protobuf/compiler/js/js_generator.h>
-#include <google/protobuf/compiler/js/well_known_types_embed.h>
-#include <google/protobuf/compiler/scc.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/descriptor.pb.h>
-#include <google/protobuf/io/printer.h>
-#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/logging.h>
-#include <google/protobuf/stubs/stringprintf.h>
-#include <google/protobuf/stubs/strutil.h>
-
-#include <algorithm>
-#include <limits>
-#include <map>
-#include <memory>
-#include <string>
-#include <utility>
-#include <vector>
-
-namespace google {
-namespace protobuf {
-namespace compiler {
-namespace js {
-
-// Sorted list of JavaScript keywords. These cannot be used as names. If they
-// appear, we prefix them with "pb_".
-const char* kKeyword[] = {
- "abstract", "boolean", "break", "byte", "case",
- "catch", "char", "class", "const", "continue",
- "debugger", "default", "delete", "do", "double",
- "else", "enum", "export", "extends", "false",
- "final", "finally", "float", "for", "function",
- "goto", "if", "implements", "import", "in",
- "instanceof", "int", "interface", "long", "native",
- "new", "null", "package", "private", "protected",
- "public", "return", "short", "static", "super",
- "switch", "synchronized", "this", "throw", "throws",
- "transient", "try", "typeof", "var", "void",
- "volatile", "while", "with",
-};
-
-static const int kNumKeyword = sizeof(kKeyword) / sizeof(char*);
-
-namespace {
-
-// The mode of operation for bytes fields. Historically JSPB always carried
-// bytes as JS {string}, containing base64 content by convention. With binary
-// and proto3 serialization the new convention is to represent it as binary
-// data in Uint8Array. See b/26173701 for background on the migration.
-enum BytesMode {
- BYTES_DEFAULT, // Default type for getBytesField to return.
- BYTES_B64, // Explicitly coerce to base64 string where needed.
- BYTES_U8, // Explicitly coerce to Uint8Array where needed.
-};
-
-bool IsReserved(const TProtoStringType& ident) {
- for (int i = 0; i < kNumKeyword; i++) {
- if (ident == kKeyword[i]) {
- return true;
- }
- }
- return false;
-}
-
-TProtoStringType GetSnakeFilename(const TProtoStringType& filename) {
- TProtoStringType snake_name = filename;
- ReplaceCharacters(&snake_name, "/", '_');
- return snake_name;
-}
-
-// Given a filename like foo/bar/baz.proto, returns the corresponding JavaScript
-// file foo/bar/baz.js.
-TProtoStringType GetJSFilename(const GeneratorOptions& options,
- const TProtoStringType& filename) {
- return StripProto(filename) + options.GetFileNameExtension();
-}
-
-// Given a filename like foo/bar/baz.proto, returns the root directory
-// path ../../
-TProtoStringType GetRootPath(const TProtoStringType& from_filename,
- const TProtoStringType& to_filename) {
- if (to_filename.find("google/protobuf") == 0) {
- // Well-known types (.proto files in the google/protobuf directory) are
- // assumed to come from the 'google-protobuf' npm package. We may want to
- // generalize this exception later by letting others put generated code in
- // their own npm packages.
- return "google-protobuf/";
- }
-
- size_t slashes = std::count(from_filename.begin(), from_filename.end(), '/');
- if (slashes == 0) {
- return "./";
- }
- TProtoStringType result = "";
- for (size_t i = 0; i < slashes; i++) {
- result += "../";
- }
- return result;
-}
-
-// Returns the alias we assign to the module of the given .proto filename
-// when importing.
-TProtoStringType ModuleAlias(const TProtoStringType& filename) {
- // This scheme could technically cause problems if a file includes any 2 of:
- // foo/bar_baz.proto
- // foo_bar_baz.proto
- // foo_bar/baz.proto
- //
- // We'll worry about this problem if/when we actually see it. This name isn't
- // exposed to users so we can change it later if we need to.
- TProtoStringType basename = StripProto(filename);
- ReplaceCharacters(&basename, "-", '$');
- ReplaceCharacters(&basename, "/", '_');
- ReplaceCharacters(&basename, ".", '_');
- return basename + "_pb";
-}
-
-// Returns the fully normalized JavaScript namespace for the given
-// file descriptor's package.
-TProtoStringType GetNamespace(const GeneratorOptions& options,
- const FileDescriptor* file) {
- if (!options.namespace_prefix.empty()) {
- return options.namespace_prefix;
- } else if (!file->package().empty()) {
- return "proto." + file->package();
- } else {
- return "proto";
- }
-}
-
-// Returns the name of the message with a leading dot and taking into account
-// nesting, for example ".OuterMessage.InnerMessage", or returns empty if
-// descriptor is null. This function does not handle namespacing, only message
-// nesting.
-TProtoStringType GetNestedMessageName(const Descriptor* descriptor) {
- if (descriptor == NULL) {
- return "";
- }
- TProtoStringType result =
- StripPrefixString(descriptor->full_name(), descriptor->file()->package());
- // Add a leading dot if one is not already present.
- if (!result.empty() && result[0] != '.') {
- result = "." + result;
- }
- return result;
-}
-
-// Returns the path prefix for a message or enumeration that
-// lives under the given file and containing type.
-TProtoStringType GetPrefix(const GeneratorOptions& options,
- const FileDescriptor* file_descriptor,
- const Descriptor* containing_type) {
- TProtoStringType prefix = GetNamespace(options, file_descriptor) +
- GetNestedMessageName(containing_type);
- if (!prefix.empty()) {
- prefix += ".";
- }
- return prefix;
-}
-
-// Returns the fully normalized JavaScript path prefix for the given
-// message descriptor.
-TProtoStringType GetMessagePathPrefix(const GeneratorOptions& options,
- const Descriptor* descriptor) {
- return GetPrefix(options, descriptor->file(), descriptor->containing_type());
-}
-
-// Returns the fully normalized JavaScript path for the given
-// message descriptor.
-TProtoStringType GetMessagePath(const GeneratorOptions& options,
- const Descriptor* descriptor) {
- return GetMessagePathPrefix(options, descriptor) + descriptor->name();
-}
-
-// Returns the fully normalized JavaScript path prefix for the given
-// enumeration descriptor.
-TProtoStringType GetEnumPathPrefix(const GeneratorOptions& options,
- const EnumDescriptor* enum_descriptor) {
- return GetPrefix(options, enum_descriptor->file(),
- enum_descriptor->containing_type());
-}
-
-// Returns the fully normalized JavaScript path for the given
-// enumeration descriptor.
-TProtoStringType GetEnumPath(const GeneratorOptions& options,
- const EnumDescriptor* enum_descriptor) {
- return GetEnumPathPrefix(options, enum_descriptor) + enum_descriptor->name();
-}
-
-TProtoStringType MaybeCrossFileRef(const GeneratorOptions& options,
- const FileDescriptor* from_file,
- const Descriptor* to_message) {
- if ((options.import_style == GeneratorOptions::kImportCommonJs ||
- options.import_style == GeneratorOptions::kImportCommonJsStrict) &&
- from_file != to_message->file()) {
- // Cross-file ref in CommonJS needs to use the module alias instead of
- // the global name.
- return ModuleAlias(to_message->file()->name()) +
- GetNestedMessageName(to_message->containing_type()) + "." +
- to_message->name();
- } else {
- // Within a single file we use a full name.
- return GetMessagePath(options, to_message);
- }
-}
-
-TProtoStringType SubmessageTypeRef(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- GOOGLE_CHECK(field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE);
- return MaybeCrossFileRef(options, field->file(), field->message_type());
-}
-
-// - Object field name: LOWER_UNDERSCORE -> LOWER_CAMEL, except for group fields
-// (UPPER_CAMEL -> LOWER_CAMEL), with "List" (or "Map") appended if appropriate,
-// and with reserved words triggering a "pb_" prefix.
-// - Getters/setters: LOWER_UNDERSCORE -> UPPER_CAMEL, except for group fields
-// (use the name directly), then append "List" if appropriate, then append "$"
-// if resulting name is equal to a reserved word.
-// - Enums: just uppercase.
-
-// Locale-independent version of ToLower that deals only with ASCII A-Z.
-char ToLowerASCII(char c) {
- if (c >= 'A' && c <= 'Z') {
- return (c - 'A') + 'a';
- } else {
- return c;
- }
-}
-
-std::vector<TProtoStringType> ParseLowerUnderscore(const TProtoStringType& input) {
- std::vector<TProtoStringType> words;
- TProtoStringType running = "";
- for (int i = 0; i < input.size(); i++) {
- if (input[i] == '_') {
- if (!running.empty()) {
- words.push_back(running);
- running.clear();
- }
- } else {
- running += ToLowerASCII(input[i]);
- }
- }
- if (!running.empty()) {
- words.push_back(running);
- }
- return words;
-}
-
-std::vector<TProtoStringType> ParseUpperCamel(const TProtoStringType& input) {
- std::vector<TProtoStringType> words;
- TProtoStringType running = "";
- for (int i = 0; i < input.size(); i++) {
- if (input[i] >= 'A' && input[i] <= 'Z' && !running.empty()) {
- words.push_back(running);
- running.clear();
- }
- running += ToLowerASCII(input[i]);
- }
- if (!running.empty()) {
- words.push_back(running);
- }
- return words;
-}
-
-TProtoStringType ToLowerCamel(const std::vector<TProtoStringType>& words) {
- TProtoStringType result;
- for (int i = 0; i < words.size(); i++) {
- TProtoStringType word = words[i];
- if (i == 0 && (word[0] >= 'A' && word[0] <= 'Z')) {
- word[0] = (word[0] - 'A') + 'a';
- } else if (i != 0 && (word[0] >= 'a' && word[0] <= 'z')) {
- word[0] = (word[0] - 'a') + 'A';
- }
- result += word;
- }
- return result;
-}
-
-TProtoStringType ToUpperCamel(const std::vector<TProtoStringType>& words) {
- TProtoStringType result;
- for (int i = 0; i < words.size(); i++) {
- TProtoStringType word = words[i];
- if (word[0] >= 'a' && word[0] <= 'z') {
- word[0] = (word[0] - 'a') + 'A';
- }
- result += word;
- }
- return result;
-}
-
-// Based on code from descriptor.cc (Thanks Kenton!)
-// Uppercases the entire string, turning ValueName into
-// VALUENAME.
-TProtoStringType ToEnumCase(const TProtoStringType& input) {
- TProtoStringType result;
- result.reserve(input.size());
-
- for (int i = 0; i < input.size(); i++) {
- if ('a' <= input[i] && input[i] <= 'z') {
- result.push_back(input[i] - 'a' + 'A');
- } else {
- result.push_back(input[i]);
- }
- }
-
- return result;
-}
-
-TProtoStringType ToLower(const TProtoStringType& input) {
- TProtoStringType result;
- result.reserve(input.size());
-
- for (int i = 0; i < input.size(); i++) {
- if ('A' <= input[i] && input[i] <= 'Z') {
- result.push_back(input[i] - 'A' + 'a');
- } else {
- result.push_back(input[i]);
- }
- }
-
- return result;
-}
-
-// When we're generating one output file per SCC, this is the filename
-// that top-level extensions should go in.
-// e.g. one proto file (test.proto):
-// package a;
-// extends Foo {
-// ...
-// }
-// If "with_filename" equals true, the extension filename will be
-// "proto.a_test_extensions.js", otherwise will be "proto.a.js"
-TProtoStringType GetExtensionFileName(const GeneratorOptions& options,
- const FileDescriptor* file,
- bool with_filename) {
- TProtoStringType snake_name = StripProto(GetSnakeFilename(file->name()));
- return options.output_dir + "/" + ToLower(GetNamespace(options, file)) +
- (with_filename ? ("_" + snake_name + "_extensions") : "") +
- options.GetFileNameExtension();
-}
-// When we're generating one output file per SCC, this is the filename
-// that all messages in the SCC should go in.
-// If with_package equals true, filename will have package prefix,
-// If the filename length is longer than 200, the filename will be the
-// SCC's proto filename with suffix "_long_sccs_(index)" (if with_package equals
-// true it still has package prefix)
-TProtoStringType GetMessagesFileName(const GeneratorOptions& options, const SCC* scc,
- bool with_package) {
- static std::map<const Descriptor*, TProtoStringType>* long_name_dict =
- new std::map<const Descriptor*, TProtoStringType>();
- TProtoStringType package_base =
- with_package
- ? ToLower(GetNamespace(options, scc->GetRepresentative()->file()) +
- "_")
- : "";
- TProtoStringType filename_base = "";
- std::vector<TProtoStringType> all_message_names;
- for (auto one_desc : scc->descriptors) {
- if (one_desc->containing_type() == nullptr) {
- all_message_names.push_back(ToLower(one_desc->name()));
- }
- }
- sort(all_message_names.begin(), all_message_names.end());
- for (auto one_message : all_message_names) {
- if (!filename_base.empty()) {
- filename_base += "_";
- }
- filename_base += one_message;
- }
- if (filename_base.size() + package_base.size() > 200) {
- if ((*long_name_dict).find(scc->GetRepresentative()) ==
- (*long_name_dict).end()) {
- TProtoStringType snake_name = StripProto(
- GetSnakeFilename(scc->GetRepresentative()->file()->name()));
- (*long_name_dict)[scc->GetRepresentative()] =
- StrCat(snake_name, "_long_sccs_",
- static_cast<uint64>((*long_name_dict).size()));
- }
- filename_base = (*long_name_dict)[scc->GetRepresentative()];
- }
- return options.output_dir + "/" + package_base + filename_base +
- options.GetFileNameExtension();
-}
-
-// When we're generating one output file per type name, this is the filename
-// that a top-level enum should go in.
-// If with_package equals true, filename will have package prefix.
-TProtoStringType GetEnumFileName(const GeneratorOptions& options,
- const EnumDescriptor* desc, bool with_package) {
- return options.output_dir + "/" +
- (with_package ? ToLower(GetNamespace(options, desc->file()) + "_")
- : "") +
- ToLower(desc->name()) + options.GetFileNameExtension();
-}
-
-// Returns the message/response ID, if set.
-TProtoStringType GetMessageId(const Descriptor* desc) { return TProtoStringType(); }
-
-bool IgnoreExtensionField(const FieldDescriptor* field) {
- // Exclude descriptor extensions from output "to avoid clutter" (from original
- // codegen).
- if (!field->is_extension()) return false;
- const FileDescriptor* file = field->containing_type()->file();
- return file->name() == "net/proto2/proto/descriptor.proto" ||
- file->name() == "google/protobuf/descriptor.proto";
-}
-
-// Used inside Google only -- do not remove.
-bool IsResponse(const Descriptor* desc) { return false; }
-
-bool IgnoreField(const FieldDescriptor* field) {
- return IgnoreExtensionField(field);
-}
-
-// Do we ignore this message type?
-bool IgnoreMessage(const Descriptor* d) { return d->options().map_entry(); }
-
-// Does JSPB ignore this entire oneof? True only if all fields are ignored.
-bool IgnoreOneof(const OneofDescriptor* oneof) {
- if (oneof->is_synthetic()) return true;
- for (int i = 0; i < oneof->field_count(); i++) {
- if (!IgnoreField(oneof->field(i))) {
- return false;
- }
- }
- return true;
-}
-
-TProtoStringType JSIdent(const GeneratorOptions& options,
- const FieldDescriptor* field, bool is_upper_camel,
- bool is_map, bool drop_list) {
- TProtoStringType result;
- if (field->type() == FieldDescriptor::TYPE_GROUP) {
- result = is_upper_camel
- ? ToUpperCamel(ParseUpperCamel(field->message_type()->name()))
- : ToLowerCamel(ParseUpperCamel(field->message_type()->name()));
- } else {
- result = is_upper_camel ? ToUpperCamel(ParseLowerUnderscore(field->name()))
- : ToLowerCamel(ParseLowerUnderscore(field->name()));
- }
- if (is_map || field->is_map()) {
- // JSPB-style or proto3-style map.
- result += "Map";
- } else if (!drop_list && field->is_repeated()) {
- // Repeated field.
- result += "List";
- }
- return result;
-}
-
-TProtoStringType JSObjectFieldName(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- TProtoStringType name = JSIdent(options, field,
- /* is_upper_camel = */ false,
- /* is_map = */ false,
- /* drop_list = */ false);
- if (IsReserved(name)) {
- name = "pb_" + name;
- }
- return name;
-}
-
-TProtoStringType JSByteGetterSuffix(BytesMode bytes_mode) {
- switch (bytes_mode) {
- case BYTES_DEFAULT:
- return "";
- case BYTES_B64:
- return "B64";
- case BYTES_U8:
- return "U8";
- default:
- assert(false);
- }
- return "";
-}
-
-// Returns the field name as a capitalized portion of a getter/setter method
-// name, e.g. MyField for .getMyField().
-TProtoStringType JSGetterName(const GeneratorOptions& options,
- const FieldDescriptor* field,
- BytesMode bytes_mode = BYTES_DEFAULT,
- bool drop_list = false) {
- TProtoStringType name = JSIdent(options, field,
- /* is_upper_camel = */ true,
- /* is_map = */ false, drop_list);
- if (field->type() == FieldDescriptor::TYPE_BYTES) {
- TProtoStringType suffix = JSByteGetterSuffix(bytes_mode);
- if (!suffix.empty()) {
- name += "_as" + suffix;
- }
- }
- if (name == "Extension" || name == "JsPbMessageId") {
- // Avoid conflicts with base-class names.
- name += "$";
- }
- return name;
-}
-
-TProtoStringType JSOneofName(const OneofDescriptor* oneof) {
- return ToUpperCamel(ParseLowerUnderscore(oneof->name()));
-}
-
-// Returns the index corresponding to this field in the JSPB array (underlying
-// data storage array).
-TProtoStringType JSFieldIndex(const FieldDescriptor* field) {
- // Determine whether this field is a member of a group. Group fields are a bit
- // wonky: their "containing type" is a message type created just for the
- // group, and that type's parent type has a field with the group-message type
- // as its message type and TYPE_GROUP as its field type. For such fields, the
- // index we use is relative to the field number of the group submessage field.
- // For all other fields, we just use the field number.
- const Descriptor* containing_type = field->containing_type();
- const Descriptor* parent_type = containing_type->containing_type();
- if (parent_type != NULL) {
- for (int i = 0; i < parent_type->field_count(); i++) {
- if (parent_type->field(i)->type() == FieldDescriptor::TYPE_GROUP &&
- parent_type->field(i)->message_type() == containing_type) {
- return StrCat(field->number() - parent_type->field(i)->number());
- }
- }
- }
- return StrCat(field->number());
-}
-
-TProtoStringType JSOneofIndex(const OneofDescriptor* oneof) {
- int index = -1;
- for (int i = 0; i < oneof->containing_type()->oneof_decl_count(); i++) {
- const OneofDescriptor* o = oneof->containing_type()->oneof_decl(i);
- if (o->is_synthetic()) continue;
- // If at least one field in this oneof is not JSPB-ignored, count the oneof.
- for (int j = 0; j < o->field_count(); j++) {
- const FieldDescriptor* f = o->field(j);
- if (!IgnoreField(f)) {
- index++;
- break; // inner loop
- }
- }
- if (o == oneof) {
- break;
- }
- }
- return StrCat(index);
-}
-
-// Decodes a codepoint in \x0000 -- \xFFFF.
-uint16 DecodeUTF8Codepoint(uint8* bytes, size_t* length) {
- if (*length == 0) {
- return 0;
- }
- size_t expected = 0;
- if ((*bytes & 0x80) == 0) {
- expected = 1;
- } else if ((*bytes & 0xe0) == 0xc0) {
- expected = 2;
- } else if ((*bytes & 0xf0) == 0xe0) {
- expected = 3;
- } else {
- // Too long -- don't accept.
- *length = 0;
- return 0;
- }
-
- if (*length < expected) {
- // Not enough bytes -- don't accept.
- *length = 0;
- return 0;
- }
-
- *length = expected;
- switch (expected) {
- case 1:
- return bytes[0];
- case 2:
- return ((bytes[0] & 0x1F) << 6) | ((bytes[1] & 0x3F) << 0);
- case 3:
- return ((bytes[0] & 0x0F) << 12) | ((bytes[1] & 0x3F) << 6) |
- ((bytes[2] & 0x3F) << 0);
- default:
- return 0;
- }
-}
-
-// Escapes the contents of a string to be included within double-quotes ("") in
-// JavaScript. The input data should be a UTF-8 encoded C++ string of chars.
-// Returns false if |out| was truncated because |in| contained invalid UTF-8 or
-// codepoints outside the BMP.
-// TODO(b/115551870): Support codepoints outside the BMP.
-bool EscapeJSString(const TProtoStringType& in, TProtoStringType* out) {
- size_t decoded = 0;
- for (size_t i = 0; i < in.size(); i += decoded) {
- uint16 codepoint = 0;
- // Decode the next UTF-8 codepoint.
- size_t have_bytes = in.size() - i;
- uint8 bytes[3] = {
- static_cast<uint8>(in[i]),
- static_cast<uint8>(((i + 1) < in.size()) ? in[i + 1] : 0),
- static_cast<uint8>(((i + 2) < in.size()) ? in[i + 2] : 0),
- };
- codepoint = DecodeUTF8Codepoint(bytes, &have_bytes);
- if (have_bytes == 0) {
- return false;
- }
- decoded = have_bytes;
-
- switch (codepoint) {
- case '\'':
- *out += "\\x27";
- break;
- case '"':
- *out += "\\x22";
- break;
- case '<':
- *out += "\\x3c";
- break;
- case '=':
- *out += "\\x3d";
- break;
- case '>':
- *out += "\\x3e";
- break;
- case '&':
- *out += "\\x26";
- break;
- case '\b':
- *out += "\\b";
- break;
- case '\t':
- *out += "\\t";
- break;
- case '\n':
- *out += "\\n";
- break;
- case '\f':
- *out += "\\f";
- break;
- case '\r':
- *out += "\\r";
- break;
- case '\\':
- *out += "\\\\";
- break;
- default:
- // TODO(b/115551870): Once we're supporting codepoints outside the BMP,
- // use a single Unicode codepoint escape if the output language is
- // ECMAScript 2015 or above. Otherwise, use a surrogate pair.
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#String_literals
- if (codepoint >= 0x20 && codepoint <= 0x7e) {
- *out += static_cast<char>(codepoint);
- } else if (codepoint >= 0x100) {
- *out += StringPrintf("\\u%04x", codepoint);
- } else {
- *out += StringPrintf("\\x%02x", codepoint);
- }
- break;
- }
- }
- return true;
-}
-
-TProtoStringType EscapeBase64(const TProtoStringType& in) {
- static const char* kAlphabet =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- TProtoStringType result;
-
- for (size_t i = 0; i < in.size(); i += 3) {
- int value = (in[i] << 16) | (((i + 1) < in.size()) ? (in[i + 1] << 8) : 0) |
- (((i + 2) < in.size()) ? (in[i + 2] << 0) : 0);
- result += kAlphabet[(value >> 18) & 0x3f];
- result += kAlphabet[(value >> 12) & 0x3f];
- if ((i + 1) < in.size()) {
- result += kAlphabet[(value >> 6) & 0x3f];
- } else {
- result += '=';
- }
- if ((i + 2) < in.size()) {
- result += kAlphabet[(value >> 0) & 0x3f];
- } else {
- result += '=';
- }
- }
-
- return result;
-}
-
-// Post-process the result of SimpleFtoa/SimpleDtoa to *exactly* match the
-// original codegen's formatting (which is just .toString() on java.lang.Double
-// or java.lang.Float).
-TProtoStringType PostProcessFloat(TProtoStringType result) {
- // If inf, -inf or nan, replace with +Infinity, -Infinity or NaN.
- if (result == "inf") {
- return "Infinity";
- } else if (result == "-inf") {
- return "-Infinity";
- } else if (result == "nan") {
- return "NaN";
- }
-
- // If scientific notation (e.g., "1e10"), (i) capitalize the "e", (ii)
- // ensure that the mantissa (portion prior to the "e") has at least one
- // fractional digit (after the decimal point), and (iii) strip any unnecessary
- // leading zeroes and/or '+' signs from the exponent.
- TProtoStringType::size_type exp_pos = result.find('e');
- if (exp_pos != TProtoStringType::npos) {
- TProtoStringType mantissa = result.substr(0, exp_pos);
- TProtoStringType exponent = result.substr(exp_pos + 1);
-
- // Add ".0" to mantissa if no fractional part exists.
- if (mantissa.find('.') == TProtoStringType::npos) {
- mantissa += ".0";
- }
-
- // Strip the sign off the exponent and store as |exp_neg|.
- bool exp_neg = false;
- if (!exponent.empty() && exponent[0] == '+') {
- exponent = exponent.substr(1);
- } else if (!exponent.empty() && exponent[0] == '-') {
- exp_neg = true;
- exponent = exponent.substr(1);
- }
-
- // Strip any leading zeroes off the exponent.
- while (exponent.size() > 1 && exponent[0] == '0') {
- exponent = exponent.substr(1);
- }
-
- return mantissa + "E" + TProtoStringType(exp_neg ? "-" : "") + exponent;
- }
-
- // Otherwise, this is an ordinary decimal number. Append ".0" if result has no
- // decimal/fractional part in order to match output of original codegen.
- if (result.find('.') == TProtoStringType::npos) {
- result += ".0";
- }
-
- return result;
-}
-
-TProtoStringType FloatToString(float value) {
- TProtoStringType result = SimpleFtoa(value);
- return PostProcessFloat(result);
-}
-
-TProtoStringType DoubleToString(double value) {
- TProtoStringType result = SimpleDtoa(value);
- return PostProcessFloat(result);
-}
-
-bool InRealOneof(const FieldDescriptor* field) {
- return field->containing_oneof() &&
- !field->containing_oneof()->is_synthetic();
-}
-
-// Return true if this is an integral field that should be represented as string
-// in JS.
-bool IsIntegralFieldWithStringJSType(const FieldDescriptor* field) {
- switch (field->cpp_type()) {
- case FieldDescriptor::CPPTYPE_INT64:
- case FieldDescriptor::CPPTYPE_UINT64:
- // The default value of JSType is JS_NORMAL, which behaves the same as
- // JS_NUMBER.
- return field->options().jstype() == FieldOptions::JS_STRING;
- default:
- return false;
- }
-}
-
-TProtoStringType MaybeNumberString(const FieldDescriptor* field,
- const TProtoStringType& orig) {
- return IsIntegralFieldWithStringJSType(field) ? ("\"" + orig + "\"") : orig;
-}
-
-TProtoStringType JSFieldDefault(const FieldDescriptor* field) {
- if (field->is_repeated()) {
- return "[]";
- }
-
- switch (field->cpp_type()) {
- case FieldDescriptor::CPPTYPE_INT32:
- return MaybeNumberString(field, StrCat(field->default_value_int32()));
- case FieldDescriptor::CPPTYPE_UINT32:
- // The original codegen is in Java, and Java protobufs store unsigned
- // integer values as signed integer values. In order to exactly match the
- // output, we need to reinterpret as base-2 signed. Ugh.
- return MaybeNumberString(
- field, StrCat(static_cast<int32>(field->default_value_uint32())));
- case FieldDescriptor::CPPTYPE_INT64:
- return MaybeNumberString(field, StrCat(field->default_value_int64()));
- case FieldDescriptor::CPPTYPE_UINT64:
- // See above note for uint32 -- reinterpreting as signed.
- return MaybeNumberString(
- field, StrCat(static_cast<int64>(field->default_value_uint64())));
- case FieldDescriptor::CPPTYPE_ENUM:
- return StrCat(field->default_value_enum()->number());
- case FieldDescriptor::CPPTYPE_BOOL:
- return field->default_value_bool() ? "true" : "false";
- case FieldDescriptor::CPPTYPE_FLOAT:
- return FloatToString(field->default_value_float());
- case FieldDescriptor::CPPTYPE_DOUBLE:
- return DoubleToString(field->default_value_double());
- case FieldDescriptor::CPPTYPE_STRING:
- if (field->type() == FieldDescriptor::TYPE_STRING) {
- TProtoStringType out;
- bool is_valid = EscapeJSString(field->default_value_string(), &out);
- if (!is_valid) {
- // TODO(b/115551870): Decide whether this should be a hard error.
- GOOGLE_LOG(WARNING)
- << "The default value for field " << field->full_name()
- << " was truncated since it contained invalid UTF-8 or"
- " codepoints outside the basic multilingual plane.";
- }
- return "\"" + out + "\"";
- } else { // Bytes
- return "\"" + EscapeBase64(field->default_value_string()) + "\"";
- }
- case FieldDescriptor::CPPTYPE_MESSAGE:
- return "null";
- }
- GOOGLE_LOG(FATAL) << "Shouldn't reach here.";
- return "";
-}
-
-TProtoStringType ProtoTypeName(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- switch (field->type()) {
- case FieldDescriptor::TYPE_BOOL:
- return "bool";
- case FieldDescriptor::TYPE_INT32:
- return "int32";
- case FieldDescriptor::TYPE_UINT32:
- return "uint32";
- case FieldDescriptor::TYPE_SINT32:
- return "sint32";
- case FieldDescriptor::TYPE_FIXED32:
- return "fixed32";
- case FieldDescriptor::TYPE_SFIXED32:
- return "sfixed32";
- case FieldDescriptor::TYPE_INT64:
- return "int64";
- case FieldDescriptor::TYPE_UINT64:
- return "uint64";
- case FieldDescriptor::TYPE_SINT64:
- return "sint64";
- case FieldDescriptor::TYPE_FIXED64:
- return "fixed64";
- case FieldDescriptor::TYPE_SFIXED64:
- return "sfixed64";
- case FieldDescriptor::TYPE_FLOAT:
- return "float";
- case FieldDescriptor::TYPE_DOUBLE:
- return "double";
- case FieldDescriptor::TYPE_STRING:
- return "string";
- case FieldDescriptor::TYPE_BYTES:
- return "bytes";
- case FieldDescriptor::TYPE_GROUP:
- return GetMessagePath(options, field->message_type());
- case FieldDescriptor::TYPE_ENUM:
- return GetEnumPath(options, field->enum_type());
- case FieldDescriptor::TYPE_MESSAGE:
- return GetMessagePath(options, field->message_type());
- default:
- return "";
- }
-}
-
-TProtoStringType JSIntegerTypeName(const FieldDescriptor* field) {
- return IsIntegralFieldWithStringJSType(field) ? "string" : "number";
-}
-
-TProtoStringType JSStringTypeName(const GeneratorOptions& options,
- const FieldDescriptor* field,
- BytesMode bytes_mode) {
- if (field->type() == FieldDescriptor::TYPE_BYTES) {
- switch (bytes_mode) {
- case BYTES_DEFAULT:
- return "(string|Uint8Array)";
- case BYTES_B64:
- return "string";
- case BYTES_U8:
- return "Uint8Array";
- default:
- assert(false);
- }
- }
- return "string";
-}
-
-TProtoStringType JSTypeName(const GeneratorOptions& options,
- const FieldDescriptor* field, BytesMode bytes_mode) {
- switch (field->cpp_type()) {
- case FieldDescriptor::CPPTYPE_BOOL:
- return "boolean";
- case FieldDescriptor::CPPTYPE_INT32:
- return JSIntegerTypeName(field);
- case FieldDescriptor::CPPTYPE_INT64:
- return JSIntegerTypeName(field);
- case FieldDescriptor::CPPTYPE_UINT32:
- return JSIntegerTypeName(field);
- case FieldDescriptor::CPPTYPE_UINT64:
- return JSIntegerTypeName(field);
- case FieldDescriptor::CPPTYPE_FLOAT:
- return "number";
- case FieldDescriptor::CPPTYPE_DOUBLE:
- return "number";
- case FieldDescriptor::CPPTYPE_STRING:
- return JSStringTypeName(options, field, bytes_mode);
- case FieldDescriptor::CPPTYPE_ENUM:
- return GetEnumPath(options, field->enum_type());
- case FieldDescriptor::CPPTYPE_MESSAGE:
- return GetMessagePath(options, field->message_type());
- default:
- return "";
- }
-}
-
-// Used inside Google only -- do not remove.
-bool UseBrokenPresenceSemantics(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- return false;
-}
-
-// Returns true for fields that return "null" from accessors when they are
-// unset. This should normally only be true for non-repeated submessages, but we
-// have legacy users who relied on old behavior where accessors behaved this
-// way.
-bool ReturnsNullWhenUnset(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE &&
- field->is_optional()) {
- return true;
- }
-
- // TODO(haberman): remove this case and unconditionally return false.
- return UseBrokenPresenceSemantics(options, field) && !field->is_repeated() &&
- !field->has_default_value();
-}
-
-// In a sane world, this would be the same as ReturnsNullWhenUnset(). But in
-// the status quo, some fields declare that they never return null/undefined
-// even though they actually do:
-// * required fields
-// * optional enum fields
-// * proto3 primitive fields.
-bool DeclaredReturnTypeIsNullable(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- if (field->is_required() || field->type() == FieldDescriptor::TYPE_ENUM) {
- return false;
- }
-
- if (field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 &&
- field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) {
- return false;
- }
-
- return ReturnsNullWhenUnset(options, field);
-}
-
-bool SetterAcceptsUndefined(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- if (ReturnsNullWhenUnset(options, field)) {
- return true;
- }
-
- // Broken presence semantics always accepts undefined for setters.
- return UseBrokenPresenceSemantics(options, field);
-}
-
-bool SetterAcceptsNull(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- if (ReturnsNullWhenUnset(options, field)) {
- return true;
- }
-
- // With broken presence semantics, fields with defaults accept "null" for
- // setters, but other fields do not. This is a strange quirk of the old
- // codegen.
- return UseBrokenPresenceSemantics(options, field) &&
- field->has_default_value();
-}
-
-// Returns types which are known to by non-nullable by default.
-// The style guide requires that we omit "!" in this case.
-bool IsPrimitive(const TProtoStringType& type) {
- return type == "undefined" || type == "string" || type == "number" ||
- type == "boolean";
-}
-
-TProtoStringType JSFieldTypeAnnotation(const GeneratorOptions& options,
- const FieldDescriptor* field,
- bool is_setter_argument, bool force_present,
- bool singular_if_not_packed,
- BytesMode bytes_mode = BYTES_DEFAULT,
- bool force_singular = false) {
- TProtoStringType jstype = JSTypeName(options, field, bytes_mode);
-
- if (!force_singular && field->is_repeated() &&
- (field->is_packed() || !singular_if_not_packed)) {
- if (field->type() == FieldDescriptor::TYPE_BYTES &&
- bytes_mode == BYTES_DEFAULT) {
- jstype = "(Array<!Uint8Array>|Array<string>)";
- } else {
- if (!IsPrimitive(jstype)) {
- jstype = "!" + jstype;
- }
- jstype = "Array<" + jstype + ">";
- }
- }
-
- bool is_null_or_undefined = false;
-
- if (is_setter_argument) {
- if (SetterAcceptsNull(options, field)) {
- jstype = "?" + jstype;
- is_null_or_undefined = true;
- }
-
- if (SetterAcceptsUndefined(options, field)) {
- jstype += "|undefined";
- is_null_or_undefined = true;
- }
- } else if (force_present) {
- // Don't add null or undefined.
- } else {
- if (DeclaredReturnTypeIsNullable(options, field)) {
- jstype = "?" + jstype;
- is_null_or_undefined = true;
- }
- }
-
- if (!is_null_or_undefined && !IsPrimitive(jstype)) {
- jstype = "!" + jstype;
- }
-
- return jstype;
-}
-
-TProtoStringType JSBinaryReaderMethodType(const FieldDescriptor* field) {
- TProtoStringType name = field->type_name();
- if (name[0] >= 'a' && name[0] <= 'z') {
- name[0] = (name[0] - 'a') + 'A';
- }
- return IsIntegralFieldWithStringJSType(field) ? (name + "String") : name;
-}
-
-TProtoStringType JSBinaryReadWriteMethodName(const FieldDescriptor* field,
- bool is_writer) {
- TProtoStringType name = JSBinaryReaderMethodType(field);
- if (field->is_packed()) {
- name = "Packed" + name;
- } else if (is_writer && field->is_repeated()) {
- name = "Repeated" + name;
- }
- return name;
-}
-
-TProtoStringType JSBinaryReaderMethodName(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- return "jspb.BinaryReader.prototype.read" +
- JSBinaryReadWriteMethodName(field, /* is_writer = */ false);
-}
-
-TProtoStringType JSBinaryWriterMethodName(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- if (field->containing_type() &&
- field->containing_type()->options().message_set_wire_format()) {
- return "jspb.BinaryWriter.prototype.writeMessageSet";
- }
- return "jspb.BinaryWriter.prototype.write" +
- JSBinaryReadWriteMethodName(field, /* is_writer = */ true);
-}
-
-TProtoStringType JSTypeTag(const FieldDescriptor* desc) {
- switch (desc->type()) {
- case FieldDescriptor::TYPE_DOUBLE:
- case FieldDescriptor::TYPE_FLOAT:
- return "Float";
- case FieldDescriptor::TYPE_INT32:
- case FieldDescriptor::TYPE_UINT32:
- case FieldDescriptor::TYPE_INT64:
- case FieldDescriptor::TYPE_UINT64:
- case FieldDescriptor::TYPE_FIXED32:
- case FieldDescriptor::TYPE_FIXED64:
- case FieldDescriptor::TYPE_SINT32:
- case FieldDescriptor::TYPE_SINT64:
- case FieldDescriptor::TYPE_SFIXED32:
- case FieldDescriptor::TYPE_SFIXED64:
- if (IsIntegralFieldWithStringJSType(desc)) {
- return "StringInt";
- } else {
- return "Int";
- }
- case FieldDescriptor::TYPE_BOOL:
- return "Boolean";
- case FieldDescriptor::TYPE_STRING:
- return "String";
- case FieldDescriptor::TYPE_BYTES:
- return "Bytes";
- case FieldDescriptor::TYPE_ENUM:
- return "Enum";
- default:
- assert(false);
- }
- return "";
-}
-
-bool HasRepeatedFields(const GeneratorOptions& options,
- const Descriptor* desc) {
- for (int i = 0; i < desc->field_count(); i++) {
- if (desc->field(i)->is_repeated() && !desc->field(i)->is_map()) {
- return true;
- }
- }
- return false;
-}
-
-static const char* kRepeatedFieldArrayName = ".repeatedFields_";
-
-TProtoStringType RepeatedFieldsArrayName(const GeneratorOptions& options,
- const Descriptor* desc) {
- return HasRepeatedFields(options, desc)
- ? (GetMessagePath(options, desc) + kRepeatedFieldArrayName)
- : "null";
-}
-
-bool HasOneofFields(const Descriptor* desc) {
- for (int i = 0; i < desc->field_count(); i++) {
- if (InRealOneof(desc->field(i))) {
- return true;
- }
- }
- return false;
-}
-
-static const char* kOneofGroupArrayName = ".oneofGroups_";
-
-TProtoStringType OneofFieldsArrayName(const GeneratorOptions& options,
- const Descriptor* desc) {
- return HasOneofFields(desc)
- ? (GetMessagePath(options, desc) + kOneofGroupArrayName)
- : "null";
-}
-
-TProtoStringType RepeatedFieldNumberList(const GeneratorOptions& options,
- const Descriptor* desc) {
- std::vector<TProtoStringType> numbers;
- for (int i = 0; i < desc->field_count(); i++) {
- if (desc->field(i)->is_repeated() && !desc->field(i)->is_map()) {
- numbers.push_back(JSFieldIndex(desc->field(i)));
- }
- }
- return "[" + Join(numbers, ",") + "]";
-}
-
-TProtoStringType OneofGroupList(const Descriptor* desc) {
- // List of arrays (one per oneof), each of which is a list of field indices
- std::vector<TProtoStringType> oneof_entries;
- for (int i = 0; i < desc->oneof_decl_count(); i++) {
- const OneofDescriptor* oneof = desc->oneof_decl(i);
- if (IgnoreOneof(oneof)) {
- continue;
- }
-
- std::vector<TProtoStringType> oneof_fields;
- for (int j = 0; j < oneof->field_count(); j++) {
- if (IgnoreField(oneof->field(j))) {
- continue;
- }
- oneof_fields.push_back(JSFieldIndex(oneof->field(j)));
- }
- oneof_entries.push_back("[" + Join(oneof_fields, ",") + "]");
- }
- return "[" + Join(oneof_entries, ",") + "]";
-}
-
-TProtoStringType JSOneofArray(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- return OneofFieldsArrayName(options, field->containing_type()) + "[" +
- JSOneofIndex(field->containing_oneof()) + "]";
-}
-
-TProtoStringType RelativeTypeName(const FieldDescriptor* field) {
- assert(field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM ||
- field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE);
- // For a field with an enum or message type, compute a name relative to the
- // path name of the message type containing this field.
- TProtoStringType package = field->file()->package();
- TProtoStringType containing_type = field->containing_type()->full_name() + ".";
- TProtoStringType type = (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM)
- ? field->enum_type()->full_name()
- : field->message_type()->full_name();
-
- // |prefix| is advanced as we find separators '.' past the common package
- // prefix that yield common prefixes in the containing type's name and this
- // type's name.
- int prefix = 0;
- for (int i = 0; i < type.size() && i < containing_type.size(); i++) {
- if (type[i] != containing_type[i]) {
- break;
- }
- if (type[i] == '.' && i >= package.size()) {
- prefix = i + 1;
- }
- }
-
- return type.substr(prefix);
-}
-
-TProtoStringType JSExtensionsObjectName(const GeneratorOptions& options,
- const FileDescriptor* from_file,
- const Descriptor* desc) {
- if (desc->full_name() == "google.protobuf.bridge.MessageSet") {
- // TODO(haberman): fix this for the kImportCommonJs case.
- return "jspb.Message.messageSetExtensions";
- } else {
- return MaybeCrossFileRef(options, from_file, desc) + ".extensions";
- }
-}
-
-static const int kMapKeyField = 1;
-static const int kMapValueField = 2;
-
-const FieldDescriptor* MapFieldKey(const FieldDescriptor* field) {
- assert(field->is_map());
- return field->message_type()->FindFieldByNumber(kMapKeyField);
-}
-
-const FieldDescriptor* MapFieldValue(const FieldDescriptor* field) {
- assert(field->is_map());
- return field->message_type()->FindFieldByNumber(kMapValueField);
-}
-
-TProtoStringType FieldDefinition(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- if (field->is_map()) {
- const FieldDescriptor* key_field = MapFieldKey(field);
- const FieldDescriptor* value_field = MapFieldValue(field);
- TProtoStringType key_type = ProtoTypeName(options, key_field);
- TProtoStringType value_type;
- if (value_field->type() == FieldDescriptor::TYPE_ENUM ||
- value_field->type() == FieldDescriptor::TYPE_MESSAGE) {
- value_type = RelativeTypeName(value_field);
- } else {
- value_type = ProtoTypeName(options, value_field);
- }
- return StringPrintf("map<%s, %s> %s = %d;", key_type.c_str(),
- value_type.c_str(), field->name().c_str(),
- field->number());
- } else {
- TProtoStringType qualifier =
- field->is_repeated() ? "repeated"
- : (field->is_optional() ? "optional" : "required");
- TProtoStringType type, name;
- if (field->type() == FieldDescriptor::TYPE_ENUM ||
- field->type() == FieldDescriptor::TYPE_MESSAGE) {
- type = RelativeTypeName(field);
- name = field->name();
- } else if (field->type() == FieldDescriptor::TYPE_GROUP) {
- type = "group";
- name = field->message_type()->name();
- } else {
- type = ProtoTypeName(options, field);
- name = field->name();
- }
- return StringPrintf("%s %s %s = %d;", qualifier.c_str(), type.c_str(),
- name.c_str(), field->number());
- }
-}
-
-TProtoStringType FieldComments(const FieldDescriptor* field, BytesMode bytes_mode) {
- TProtoStringType comments;
- if (field->type() == FieldDescriptor::TYPE_BYTES && bytes_mode == BYTES_U8) {
- comments +=
- " * Note that Uint8Array is not supported on all browsers.\n"
- " * @see http://caniuse.com/Uint8Array\n";
- }
- return comments;
-}
-
-bool ShouldGenerateExtension(const FieldDescriptor* field) {
- return field->is_extension() && !IgnoreField(field);
-}
-
-bool HasExtensions(const Descriptor* desc) {
- for (int i = 0; i < desc->extension_count(); i++) {
- if (ShouldGenerateExtension(desc->extension(i))) {
- return true;
- }
- }
- for (int i = 0; i < desc->nested_type_count(); i++) {
- if (HasExtensions(desc->nested_type(i))) {
- return true;
- }
- }
- return false;
-}
-
-bool HasExtensions(const FileDescriptor* file) {
- for (int i = 0; i < file->extension_count(); i++) {
- if (ShouldGenerateExtension(file->extension(i))) {
- return true;
- }
- }
- for (int i = 0; i < file->message_type_count(); i++) {
- if (HasExtensions(file->message_type(i))) {
- return true;
- }
- }
- return false;
-}
-
-bool HasMap(const GeneratorOptions& options, const Descriptor* desc) {
- for (int i = 0; i < desc->field_count(); i++) {
- if (desc->field(i)->is_map()) {
- return true;
- }
- }
- for (int i = 0; i < desc->nested_type_count(); i++) {
- if (HasMap(options, desc->nested_type(i))) {
- return true;
- }
- }
- return false;
-}
-
-bool FileHasMap(const GeneratorOptions& options, const FileDescriptor* desc) {
- for (int i = 0; i < desc->message_type_count(); i++) {
- if (HasMap(options, desc->message_type(i))) {
- return true;
- }
- }
- return false;
-}
-
-bool IsExtendable(const Descriptor* desc) {
- return desc->extension_range_count() > 0;
-}
-
-// Returns the max index in the underlying data storage array beyond which the
-// extension object is used.
-TProtoStringType GetPivot(const Descriptor* desc) {
- static const int kDefaultPivot = 500;
-
- // Find the max field number
- int max_field_number = 0;
- for (int i = 0; i < desc->field_count(); i++) {
- if (!IgnoreField(desc->field(i)) &&
- desc->field(i)->number() > max_field_number) {
- max_field_number = desc->field(i)->number();
- }
- }
-
- int pivot = -1;
- if (IsExtendable(desc) || (max_field_number >= kDefaultPivot)) {
- pivot = ((max_field_number + 1) < kDefaultPivot) ? (max_field_number + 1)
- : kDefaultPivot;
- }
-
- return StrCat(pivot);
-}
-
-// Whether this field represents presence. For fields with presence, we
-// generate extra methods (clearFoo() and hasFoo()) for this field.
-bool HasFieldPresence(const GeneratorOptions& options,
- const FieldDescriptor* field) {
- // This returns false for repeated fields and maps, but we still do
- // generate clearFoo() methods for these through a special case elsewhere.
- return field->has_presence();
-}
-
-// We use this to implement the semantics that same file can be generated
-// multiple times, but only the last one keep the short name. Others all use
-// long name with extra information to distinguish (For message and enum, the
-// extra information is package name, for file level extension, the extra
-// information is proto's filename).
-// We never actually write the files, but we keep a set of which descriptors
-// were the final one for a given filename.
-class FileDeduplicator {
- public:
- explicit FileDeduplicator(const GeneratorOptions& options) {}
-
- // params:
- // filenames: a pair of {short filename, full filename}
- // (short filename don't have extra information, full filename
- // contains extra information)
- // desc: The Descriptor or SCC pointer or EnumDescriptor.
- bool AddFile(const std::pair<TProtoStringType, TProtoStringType> filenames,
- const void* desc) {
- if (descs_by_shortname_.find(filenames.first) !=
- descs_by_shortname_.end()) {
- // Change old pointer's actual name to full name.
- auto short_name_desc = descs_by_shortname_[filenames.first];
- allowed_descs_actual_name_[short_name_desc] =
- allowed_descs_full_name_[short_name_desc];
- }
- descs_by_shortname_[filenames.first] = desc;
- allowed_descs_actual_name_[desc] = filenames.first;
- allowed_descs_full_name_[desc] = filenames.second;
-
- return true;
- }
-
- void GetAllowedMap(std::map<const void*, TProtoStringType>* allowed_set) {
- *allowed_set = allowed_descs_actual_name_;
- }
-
- private:
- // The map that restores all the descs that are using short name as filename.
- std::map<TProtoStringType, const void*> descs_by_shortname_;
- // The final actual filename map.
- std::map<const void*, TProtoStringType> allowed_descs_actual_name_;
- // The full name map.
- std::map<const void*, TProtoStringType> allowed_descs_full_name_;
-};
-
-void DepthFirstSearch(const FileDescriptor* file,
- std::vector<const FileDescriptor*>* list,
- std::set<const FileDescriptor*>* seen) {
- if (!seen->insert(file).second) {
- return;
- }
-
- // Add all dependencies.
- for (int i = 0; i < file->dependency_count(); i++) {
- DepthFirstSearch(file->dependency(i), list, seen);
- }
-
- // Add this file.
- list->push_back(file);
-}
-
-// A functor for the predicate to remove_if() below. Returns true if a given
-// FileDescriptor is not in the given set.
-class NotInSet {
- public:
- explicit NotInSet(const std::set<const FileDescriptor*>& file_set)
- : file_set_(file_set) {}
-
- bool operator()(const FileDescriptor* file) {
- return file_set_.count(file) == 0;
- }
-
- private:
- const std::set<const FileDescriptor*>& file_set_;
-};
-
-// This function generates an ordering of the input FileDescriptors that matches
-// the logic of the old code generator. The order is significant because two
-// different input files can generate the same output file, and the last one
-// needs to win.
-void GenerateJspbFileOrder(const std::vector<const FileDescriptor*>& input,
- std::vector<const FileDescriptor*>* ordered) {
- // First generate an ordering of all reachable files (including dependencies)
- // with depth-first search. This mimics the behavior of --include_imports,
- // which is what the old codegen used.
- ordered->clear();
- std::set<const FileDescriptor*> seen;
- std::set<const FileDescriptor*> input_set;
- for (int i = 0; i < input.size(); i++) {
- DepthFirstSearch(input[i], ordered, &seen);
- input_set.insert(input[i]);
- }
-
- // Now remove the entries that are not actually in our input list.
- ordered->erase(
- std::remove_if(ordered->begin(), ordered->end(), NotInSet(input_set)),
- ordered->end());
-}
-
-// If we're generating code in file-per-type mode, avoid overwriting files
-// by choosing the last descriptor that writes each filename and permitting
-// only those to generate code.
-
-struct DepsGenerator {
- std::vector<const Descriptor*> operator()(const Descriptor* desc) const {
- std::vector<const Descriptor*> deps;
- auto maybe_add = [&](const Descriptor* d) {
- if (d) deps.push_back(d);
- };
- for (int i = 0; i < desc->field_count(); i++) {
- if (!IgnoreField(desc->field(i))) {
- maybe_add(desc->field(i)->message_type());
- }
- }
- for (int i = 0; i < desc->extension_count(); i++) {
- maybe_add(desc->extension(i)->message_type());
- maybe_add(desc->extension(i)->containing_type());
- }
- for (int i = 0; i < desc->nested_type_count(); i++) {
- maybe_add(desc->nested_type(i));
- }
- maybe_add(desc->containing_type());
-
- return deps;
- }
-};
-
-bool GenerateJspbAllowedMap(const GeneratorOptions& options,
- const std::vector<const FileDescriptor*>& files,
- std::map<const void*, TProtoStringType>* allowed_set,
- SCCAnalyzer<DepsGenerator>* analyzer) {
- std::vector<const FileDescriptor*> files_ordered;
- GenerateJspbFileOrder(files, &files_ordered);
-
- // Choose the last descriptor for each filename.
- FileDeduplicator dedup(options);
- std::set<const SCC*> added;
- for (int i = 0; i < files_ordered.size(); i++) {
- for (int j = 0; j < files_ordered[i]->message_type_count(); j++) {
- const Descriptor* desc = files_ordered[i]->message_type(j);
- if (added.insert(analyzer->GetSCC(desc)).second &&
- !dedup.AddFile(
- std::make_pair(
- GetMessagesFileName(options, analyzer->GetSCC(desc), false),
- GetMessagesFileName(options, analyzer->GetSCC(desc), true)),
- analyzer->GetSCC(desc))) {
- return false;
- }
- }
- for (int j = 0; j < files_ordered[i]->enum_type_count(); j++) {
- const EnumDescriptor* desc = files_ordered[i]->enum_type(j);
- if (!dedup.AddFile(std::make_pair(GetEnumFileName(options, desc, false),
- GetEnumFileName(options, desc, true)),
- desc)) {
- return false;
- }
- }
-
- // Pull out all free-floating extensions and generate files for those too.
- bool has_extension = false;
-
- for (int j = 0; j < files_ordered[i]->extension_count(); j++) {
- if (ShouldGenerateExtension(files_ordered[i]->extension(j))) {
- has_extension = true;
- }
- }
-
- if (has_extension) {
- if (!dedup.AddFile(
- std::make_pair(
- GetExtensionFileName(options, files_ordered[i], false),
- GetExtensionFileName(options, files_ordered[i], true)),
- files_ordered[i])) {
- return false;
- }
- }
- }
-
- dedup.GetAllowedMap(allowed_set);
-
- return true;
-}
-
-// Embeds base64 encoded GeneratedCodeInfo proto in a comment at the end of
-// file.
-void EmbedCodeAnnotations(const GeneratedCodeInfo& annotations,
- io::Printer* printer) {
- // Serialize annotations proto into base64 string.
- TProtoStringType meta_content;
- annotations.SerializeToString(&meta_content);
- TProtoStringType meta_64;
- Base64Escape(meta_content, &meta_64);
-
- // Print base64 encoded annotations at the end of output file in
- // a comment.
- printer->Print("\n// Below is base64 encoded GeneratedCodeInfo proto");
- printer->Print("\n// $encoded_proto$\n", "encoded_proto", meta_64);
-}
-
-bool IsWellKnownTypeFile(const FileDescriptor* file) {
- return HasPrefixString(file->name(), "google/protobuf/");
-}
-
-} // anonymous namespace
-
-void Generator::GenerateHeader(const GeneratorOptions& options,
- const FileDescriptor* file,
- io::Printer* printer) const {
- if (file != nullptr) {
- printer->Print("// source: $filename$\n", "filename", file->name());
- }
- printer->Print(
- "/**\n"
- " * @fileoverview\n"
- " * @enhanceable\n"
- // TODO(b/152440355): requireType/requires diverged from internal version.
- " * @suppress {missingRequire} reports error on implicit type usages.\n"
- " * @suppress {messageConventions} JS Compiler reports an "
- "error if a variable or\n"
- " * field starts with 'MSG_' and isn't a translatable "
- "message.\n"
- " * @public\n"
- " */\n"
- "// GENERATED CODE -- DO NOT EDIT!\n"
- "/* eslint-disable */\n"
- "// @ts-nocheck\n"
- "\n");
-}
-
-void Generator::FindProvidesForFile(const GeneratorOptions& options,
- io::Printer* printer,
- const FileDescriptor* file,
- std::set<TProtoStringType>* provided) const {
- for (int i = 0; i < file->message_type_count(); i++) {
- FindProvidesForMessage(options, printer, file->message_type(i), provided);
- }
- for (int i = 0; i < file->enum_type_count(); i++) {
- FindProvidesForEnum(options, printer, file->enum_type(i), provided);
- }
-}
-
-void Generator::FindProvides(const GeneratorOptions& options,
- io::Printer* printer,
- const std::vector<const FileDescriptor*>& files,
- std::set<TProtoStringType>* provided) const {
- for (int i = 0; i < files.size(); i++) {
- FindProvidesForFile(options, printer, files[i], provided);
- }
-
- printer->Print("\n");
-}
-
-void FindProvidesForOneOfEnum(const GeneratorOptions& options,
- const OneofDescriptor* oneof,
- std::set<TProtoStringType>* provided) {
- TProtoStringType name = GetMessagePath(options, oneof->containing_type()) + "." +
- JSOneofName(oneof) + "Case";
- provided->insert(name);
-}
-
-void FindProvidesForOneOfEnums(const GeneratorOptions& options,
- io::Printer* printer, const Descriptor* desc,
- std::set<TProtoStringType>* provided) {
- if (HasOneofFields(desc)) {
- for (int i = 0; i < desc->oneof_decl_count(); i++) {
- if (IgnoreOneof(desc->oneof_decl(i))) {
- continue;
- }
- FindProvidesForOneOfEnum(options, desc->oneof_decl(i), provided);
- }
- }
-}
-
-void Generator::FindProvidesForMessage(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc,
- std::set<TProtoStringType>* provided) const {
- if (IgnoreMessage(desc)) {
- return;
- }
-
- TProtoStringType name = GetMessagePath(options, desc);
- provided->insert(name);
-
- for (int i = 0; i < desc->enum_type_count(); i++) {
- FindProvidesForEnum(options, printer, desc->enum_type(i), provided);
- }
-
- FindProvidesForOneOfEnums(options, printer, desc, provided);
-
- for (int i = 0; i < desc->nested_type_count(); i++) {
- FindProvidesForMessage(options, printer, desc->nested_type(i), provided);
- }
-}
-void Generator::FindProvidesForEnum(const GeneratorOptions& options,
- io::Printer* printer,
- const EnumDescriptor* enumdesc,
- std::set<TProtoStringType>* provided) const {
- TProtoStringType name = GetEnumPath(options, enumdesc);
- provided->insert(name);
-}
-
-void Generator::FindProvidesForFields(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FieldDescriptor*>& fields,
- std::set<TProtoStringType>* provided) const {
- for (int i = 0; i < fields.size(); i++) {
- const FieldDescriptor* field = fields[i];
-
- if (IgnoreField(field)) {
- continue;
- }
-
- TProtoStringType name = GetNamespace(options, field->file()) + "." +
- JSObjectFieldName(options, field);
- provided->insert(name);
- }
-}
-
-void Generator::GenerateProvides(const GeneratorOptions& options,
- io::Printer* printer,
- std::set<TProtoStringType>* provided) const {
- for (std::set<TProtoStringType>::iterator it = provided->begin();
- it != provided->end(); ++it) {
- if (options.import_style == GeneratorOptions::kImportClosure) {
- printer->Print("goog.provide('$name$');\n", "name", *it);
- } else {
- // We aren't using Closure's import system, but we use goog.exportSymbol()
- // to construct the expected tree of objects, eg.
- //
- // goog.exportSymbol('foo.bar.Baz', null, this);
- //
- // // Later generated code expects foo.bar = {} to exist:
- // foo.bar.Baz = function() { /* ... */ }
-
- // Do not use global scope in strict mode
- if (options.import_style == GeneratorOptions::kImportCommonJsStrict) {
- TProtoStringType namespaceObject = *it;
- // Remove "proto." from the namespace object
- GOOGLE_CHECK_EQ(0, namespaceObject.compare(0, 6, "proto."));
- namespaceObject.erase(0, 6);
- printer->Print("goog.exportSymbol('$name$', null, proto);\n", "name",
- namespaceObject);
- } else {
- printer->Print("goog.exportSymbol('$name$', null, global);\n", "name",
- *it);
- }
- }
- }
-}
-
-void Generator::GenerateRequiresForSCC(const GeneratorOptions& options,
- io::Printer* printer, const SCC* scc,
- std::set<TProtoStringType>* provided) const {
- std::set<TProtoStringType> required;
- std::set<TProtoStringType> forwards;
- bool have_message = false;
- bool has_extension = false;
- bool has_map = false;
- for (auto desc : scc->descriptors) {
- if (desc->containing_type() == nullptr) {
- FindRequiresForMessage(options, desc, &required, &forwards,
- &have_message);
- has_extension = (has_extension || HasExtensions(desc));
- has_map = (has_map || HasMap(options, desc));
- }
- }
-
- GenerateRequiresImpl(options, printer, &required, &forwards, provided,
- /* require_jspb = */ have_message,
- /* require_extension = */ has_extension,
- /* require_map = */ has_map);
-}
-
-void Generator::GenerateRequiresForLibrary(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FileDescriptor*>& files,
- std::set<TProtoStringType>* provided) const {
- GOOGLE_CHECK_EQ(options.import_style, GeneratorOptions::kImportClosure);
- // For Closure imports we need to import every message type individually.
- std::set<TProtoStringType> required;
- std::set<TProtoStringType> forwards;
- bool have_extensions = false;
- bool have_map = false;
- bool have_message = false;
-
- for (int i = 0; i < files.size(); i++) {
- for (int j = 0; j < files[i]->message_type_count(); j++) {
- const Descriptor* desc = files[i]->message_type(j);
- if (!IgnoreMessage(desc)) {
- FindRequiresForMessage(options, desc, &required, &forwards,
- &have_message);
- }
- }
-
- if (!have_extensions && HasExtensions(files[i])) {
- have_extensions = true;
- }
-
- if (!have_map && FileHasMap(options, files[i])) {
- have_map = true;
- }
-
- for (int j = 0; j < files[i]->extension_count(); j++) {
- const FieldDescriptor* extension = files[i]->extension(j);
- if (IgnoreField(extension)) {
- continue;
- }
- if (extension->containing_type()->full_name() !=
- "google.protobuf.bridge.MessageSet") {
- required.insert(GetMessagePath(options, extension->containing_type()));
- }
- FindRequiresForField(options, extension, &required, &forwards);
- have_extensions = true;
- }
- }
-
- GenerateRequiresImpl(options, printer, &required, &forwards, provided,
- /* require_jspb = */ have_message,
- /* require_extension = */ have_extensions,
- /* require_map = */ have_map);
-}
-
-void Generator::GenerateRequiresForExtensions(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FieldDescriptor*>& fields,
- std::set<TProtoStringType>* provided) const {
- std::set<TProtoStringType> required;
- std::set<TProtoStringType> forwards;
- for (int i = 0; i < fields.size(); i++) {
- const FieldDescriptor* field = fields[i];
- if (IgnoreField(field)) {
- continue;
- }
- FindRequiresForExtension(options, field, &required, &forwards);
- }
-
- GenerateRequiresImpl(options, printer, &required, &forwards, provided,
- /* require_jspb = */ false,
- /* require_extension = */ fields.size() > 0,
- /* require_map = */ false);
-}
-
-void Generator::GenerateRequiresImpl(const GeneratorOptions& options,
- io::Printer* printer,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards,
- std::set<TProtoStringType>* provided,
- bool require_jspb, bool require_extension,
- bool require_map) const {
- if (require_jspb) {
- required->insert("jspb.Message");
- required->insert("jspb.BinaryReader");
- required->insert("jspb.BinaryWriter");
- }
- if (require_extension) {
- required->insert("jspb.ExtensionFieldBinaryInfo");
- required->insert("jspb.ExtensionFieldInfo");
- }
- if (require_map) {
- required->insert("jspb.Map");
- }
-
- std::set<TProtoStringType>::iterator it;
- for (it = required->begin(); it != required->end(); ++it) {
- if (provided->find(*it) != provided->end()) {
- continue;
- }
- printer->Print("goog.require('$name$');\n", "name", *it);
- }
-
- printer->Print("\n");
-
- for (it = forwards->begin(); it != forwards->end(); ++it) {
- if (provided->find(*it) != provided->end()) {
- continue;
- }
- printer->Print("goog.forwardDeclare('$name$');\n", "name", *it);
- }
-}
-
-bool NamespaceOnly(const Descriptor* desc) { return false; }
-
-void Generator::FindRequiresForMessage(const GeneratorOptions& options,
- const Descriptor* desc,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards,
- bool* have_message) const {
- if (!NamespaceOnly(desc)) {
- *have_message = true;
- for (int i = 0; i < desc->field_count(); i++) {
- const FieldDescriptor* field = desc->field(i);
- if (IgnoreField(field)) {
- continue;
- }
- FindRequiresForField(options, field, required, forwards);
- }
- }
-
- for (int i = 0; i < desc->extension_count(); i++) {
- const FieldDescriptor* field = desc->extension(i);
- if (IgnoreField(field)) {
- continue;
- }
- FindRequiresForExtension(options, field, required, forwards);
- }
-
- for (int i = 0; i < desc->nested_type_count(); i++) {
- FindRequiresForMessage(options, desc->nested_type(i), required, forwards,
- have_message);
- }
-}
-
-void Generator::FindRequiresForField(const GeneratorOptions& options,
- const FieldDescriptor* field,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards) const {
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM &&
- // N.B.: file-level extensions with enum type do *not* create
- // dependencies, as per original codegen.
- !(field->is_extension() && field->extension_scope() == nullptr)) {
- if (options.add_require_for_enums) {
- required->insert(GetEnumPath(options, field->enum_type()));
- } else {
- forwards->insert(GetEnumPath(options, field->enum_type()));
- }
- } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- if (!IgnoreMessage(field->message_type())) {
- required->insert(GetMessagePath(options, field->message_type()));
- }
- }
-}
-
-void Generator::FindRequiresForExtension(
- const GeneratorOptions& options, const FieldDescriptor* field,
- std::set<TProtoStringType>* required, std::set<TProtoStringType>* forwards) const {
- if (field->containing_type()->full_name() !=
- "google.protobuf.bridge.MessageSet") {
- required->insert(GetMessagePath(options, field->containing_type()));
- }
- FindRequiresForField(options, field, required, forwards);
-}
-
-void Generator::GenerateTestOnly(const GeneratorOptions& options,
- io::Printer* printer) const {
- if (options.testonly) {
- printer->Print("goog.setTestOnly();\n\n");
- }
- printer->Print("\n");
-}
-
-void Generator::GenerateClassesAndEnums(const GeneratorOptions& options,
- io::Printer* printer,
- const FileDescriptor* file) const {
- for (int i = 0; i < file->message_type_count(); i++) {
- GenerateClassConstructorAndDeclareExtensionFieldInfo(options, printer,
- file->message_type(i));
- }
- for (int i = 0; i < file->message_type_count(); i++) {
- GenerateClass(options, printer, file->message_type(i));
- }
- for (int i = 0; i < file->enum_type_count(); i++) {
- GenerateEnum(options, printer, file->enum_type(i));
- }
-}
-
-void Generator::GenerateClass(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- if (IgnoreMessage(desc)) {
- return;
- }
-
- if (!NamespaceOnly(desc)) {
- printer->Print("\n");
- GenerateClassFieldInfo(options, printer, desc);
-
- GenerateClassToObject(options, printer, desc);
- // These must come *before* the extension-field info generation in
- // GenerateClassRegistration so that references to the binary
- // serialization/deserialization functions may be placed in the extension
- // objects.
- GenerateClassDeserializeBinary(options, printer, desc);
- GenerateClassSerializeBinary(options, printer, desc);
- }
-
- // Recurse on nested types. These must come *before* the extension-field
- // info generation in GenerateClassRegistration so that extensions that
- // reference nested types proceed the definitions of the nested types.
- for (int i = 0; i < desc->enum_type_count(); i++) {
- GenerateEnum(options, printer, desc->enum_type(i));
- }
- for (int i = 0; i < desc->nested_type_count(); i++) {
- GenerateClass(options, printer, desc->nested_type(i));
- }
-
- if (!NamespaceOnly(desc)) {
- GenerateClassRegistration(options, printer, desc);
- GenerateClassFields(options, printer, desc);
-
- if (options.import_style != GeneratorOptions::kImportClosure) {
- for (int i = 0; i < desc->extension_count(); i++) {
- GenerateExtension(options, printer, desc->extension(i));
- }
- }
- }
-}
-
-void Generator::GenerateClassConstructor(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- printer->Print(
- "/**\n"
- " * Generated by JsPbCodeGenerator.\n"
- " * @param {Array=} opt_data Optional initial data array, typically "
- "from a\n"
- " * server response, or constructed directly in Javascript. The array "
- "is used\n"
- " * in place and becomes part of the constructed object. It is not "
- "cloned.\n"
- " * If no data is provided, the constructed object will be empty, but "
- "still\n"
- " * valid.\n"
- " * @extends {jspb.Message}\n"
- " * @constructor\n"
- " */\n"
- "$classprefix$$classname$ = function(opt_data) {\n",
- "classprefix", GetMessagePathPrefix(options, desc), "classname",
- desc->name());
- printer->Annotate("classname", desc);
- TProtoStringType message_id = GetMessageId(desc);
- printer->Print(
- " jspb.Message.initialize(this, opt_data, $messageId$, $pivot$, "
- "$rptfields$, $oneoffields$);\n",
- "messageId",
- !message_id.empty() ? ("'" + message_id + "'")
- : (IsResponse(desc) ? "''" : "0"),
- "pivot", GetPivot(desc), "rptfields",
- RepeatedFieldsArrayName(options, desc), "oneoffields",
- OneofFieldsArrayName(options, desc));
- printer->Print(
- "};\n"
- "goog.inherits($classname$, jspb.Message);\n"
- "if (goog.DEBUG && !COMPILED) {\n"
- // displayName overrides Function.prototype.displayName
- // http://google3/javascript/externs/es3.js?l=511
- " /**\n"
- " * @public\n"
- " * @override\n"
- " */\n"
- " $classname$.displayName = '$classname$';\n"
- "}\n",
- "classname", GetMessagePath(options, desc));
-}
-
-void Generator::GenerateClassConstructorAndDeclareExtensionFieldInfo(
- const GeneratorOptions& options, io::Printer* printer,
- const Descriptor* desc) const {
- if (!NamespaceOnly(desc)) {
- GenerateClassConstructor(options, printer, desc);
- if (IsExtendable(desc) &&
- desc->full_name() != "google.protobuf.bridge.MessageSet") {
- GenerateClassExtensionFieldInfo(options, printer, desc);
- }
- }
- for (int i = 0; i < desc->nested_type_count(); i++) {
- if (!IgnoreMessage(desc->nested_type(i))) {
- GenerateClassConstructorAndDeclareExtensionFieldInfo(
- options, printer, desc->nested_type(i));
- }
- }
-}
-
-void Generator::GenerateClassFieldInfo(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- if (HasRepeatedFields(options, desc)) {
- printer->Print(
- "/**\n"
- " * List of repeated fields within this message type.\n"
- " * @private {!Array<number>}\n"
- " * @const\n"
- " */\n"
- "$classname$$rptfieldarray$ = $rptfields$;\n"
- "\n",
- "classname", GetMessagePath(options, desc), "rptfieldarray",
- kRepeatedFieldArrayName, "rptfields",
- RepeatedFieldNumberList(options, desc));
- }
-
- if (HasOneofFields(desc)) {
- printer->Print(
- "/**\n"
- " * Oneof group definitions for this message. Each group defines the "
- "field\n"
- " * numbers belonging to that group. When of these fields' value is "
- "set, all\n"
- " * other fields in the group are cleared. During deserialization, if "
- "multiple\n"
- " * fields are encountered for a group, only the last value seen will "
- "be kept.\n"
- " * @private {!Array<!Array<number>>}\n"
- " * @const\n"
- " */\n"
- "$classname$$oneofgrouparray$ = $oneofgroups$;\n"
- "\n",
- "classname", GetMessagePath(options, desc), "oneofgrouparray",
- kOneofGroupArrayName, "oneofgroups", OneofGroupList(desc));
-
- for (int i = 0; i < desc->oneof_decl_count(); i++) {
- if (IgnoreOneof(desc->oneof_decl(i))) {
- continue;
- }
- GenerateOneofCaseDefinition(options, printer, desc->oneof_decl(i));
- }
- }
-}
-
-void Generator::GenerateClassXid(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- printer->Print(
- "\n"
- "\n"
- "$class$.prototype.messageXid = xid('$class$');\n",
- "class", GetMessagePath(options, desc));
-}
-
-void Generator::GenerateOneofCaseDefinition(
- const GeneratorOptions& options, io::Printer* printer,
- const OneofDescriptor* oneof) const {
- printer->Print(
- "/**\n"
- " * @enum {number}\n"
- " */\n"
- "$classname$.$oneof$Case = {\n"
- " $upcase$_NOT_SET: 0",
- "classname", GetMessagePath(options, oneof->containing_type()), "oneof",
- JSOneofName(oneof), "upcase", ToEnumCase(oneof->name()));
-
- for (int i = 0; i < oneof->field_count(); i++) {
- if (IgnoreField(oneof->field(i))) {
- continue;
- }
-
- printer->Print(
- ",\n"
- " $upcase$: $number$",
- "upcase", ToEnumCase(oneof->field(i)->name()), "number",
- JSFieldIndex(oneof->field(i)));
- printer->Annotate("upcase", oneof->field(i));
- }
-
- printer->Print(
- "\n"
- "};\n"
- "\n"
- "/**\n"
- " * @return {$class$.$oneof$Case}\n"
- " */\n"
- "$class$.prototype.get$oneof$Case = function() {\n"
- " return /** @type {$class$.$oneof$Case} */(jspb.Message."
- "computeOneofCase(this, $class$.oneofGroups_[$oneofindex$]));\n"
- "};\n"
- "\n",
- "class", GetMessagePath(options, oneof->containing_type()), "oneof",
- JSOneofName(oneof), "oneofindex", JSOneofIndex(oneof));
-}
-
-void Generator::GenerateClassToObject(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- printer->Print(
- "\n"
- "\n"
- "if (jspb.Message.GENERATE_TO_OBJECT) {\n"
- "/**\n"
- " * Creates an object representation of this proto.\n"
- " * Field names that are reserved in JavaScript and will be renamed to "
- "pb_name.\n"
- " * Optional fields that are not set will be set to undefined.\n"
- " * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n"
- " * For the list of reserved names please see:\n"
- " * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n"
- " * @param {boolean=} opt_includeInstance Deprecated. whether to include "
- "the\n"
- " * JSPB instance for transitional soy proto support:\n"
- " * http://goto/soy-param-migration\n"
- " * @return {!Object}\n"
- " */\n"
- "$classname$.prototype.toObject = function(opt_includeInstance) {\n"
- " return $classname$.toObject(opt_includeInstance, this);\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Static version of the {@see toObject} method.\n"
- " * @param {boolean|undefined} includeInstance Deprecated. Whether to "
- "include\n"
- " * the JSPB instance for transitional soy proto support:\n"
- " * http://goto/soy-param-migration\n"
- " * @param {!$classname$} msg The msg instance to transform.\n"
- " * @return {!Object}\n"
- " * @suppress {unusedLocalVariables} f is only used for nested messages\n"
- " */\n"
- "$classname$.toObject = function(includeInstance, msg) {\n"
- " var f, obj = {",
- "classname", GetMessagePath(options, desc));
-
- bool first = true;
- for (int i = 0; i < desc->field_count(); i++) {
- const FieldDescriptor* field = desc->field(i);
- if (IgnoreField(field)) {
- continue;
- }
-
- if (!first) {
- printer->Print(",\n ");
- } else {
- printer->Print("\n ");
- first = false;
- }
-
- GenerateClassFieldToObject(options, printer, field);
- }
-
- if (!first) {
- printer->Print("\n };\n\n");
- } else {
- printer->Print("\n\n };\n\n");
- }
-
- if (IsExtendable(desc)) {
- printer->Print(
- " jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), "
- "obj,\n"
- " $extObject$, $class$.prototype.getExtension,\n"
- " includeInstance);\n",
- "extObject", JSExtensionsObjectName(options, desc->file(), desc),
- "class", GetMessagePath(options, desc));
- }
-
- printer->Print(
- " if (includeInstance) {\n"
- " obj.$$jspbMessageInstance = msg;\n"
- " }\n"
- " return obj;\n"
- "};\n"
- "}\n"
- "\n"
- "\n",
- "classname", GetMessagePath(options, desc));
-}
-
-void Generator::GenerateFieldValueExpression(io::Printer* printer,
- const char* obj_reference,
- const FieldDescriptor* field,
- bool use_default) const {
- const bool is_float_or_double =
- field->cpp_type() == FieldDescriptor::CPPTYPE_FLOAT ||
- field->cpp_type() == FieldDescriptor::CPPTYPE_DOUBLE;
- const bool is_boolean = field->cpp_type() == FieldDescriptor::CPPTYPE_BOOL;
-
- const TProtoStringType with_default = use_default ? "WithDefault" : "";
- const TProtoStringType default_arg =
- use_default ? StrCat(", ", JSFieldDefault(field)) : "";
- const TProtoStringType cardinality = field->is_repeated() ? "Repeated" : "";
- TProtoStringType type = "";
- if (is_float_or_double) {
- type = "FloatingPoint";
- }
- if (is_boolean) {
- type = "Boolean";
- }
-
- // Prints the appropriate function, among:
- // - getField
- // - getBooleanField
- // - getFloatingPointField => Replaced by getOptionalFloatingPointField to
- // preserve backward compatibility.
- // - getFieldWithDefault
- // - getBooleanFieldWithDefault
- // - getFloatingPointFieldWithDefault
- // - getRepeatedField
- // - getRepeatedBooleanField
- // - getRepeatedFloatingPointField
- if (is_float_or_double && !field->is_repeated() && !use_default) {
- printer->Print(
- "jspb.Message.getOptionalFloatingPointField($obj$, "
- "$index$$default$)",
- "obj", obj_reference, "index", JSFieldIndex(field), "default",
- default_arg);
- } else {
- printer->Print(
- "jspb.Message.get$cardinality$$type$Field$with_default$($obj$, "
- "$index$$default$)",
- "cardinality", cardinality, "type", type, "with_default", with_default,
- "obj", obj_reference, "index", JSFieldIndex(field), "default",
- default_arg);
- }
-}
-
-void Generator::GenerateClassFieldToObject(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const {
- printer->Print("$fieldname$: ", "fieldname",
- JSObjectFieldName(options, field));
-
- if (field->is_map()) {
- const FieldDescriptor* value_field = MapFieldValue(field);
- // If the map values are of a message type, we must provide their static
- // toObject() method; otherwise we pass undefined for that argument.
- TProtoStringType value_to_object;
- if (value_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- value_to_object =
- GetMessagePath(options, value_field->message_type()) + ".toObject";
- } else {
- value_to_object = "undefined";
- }
- printer->Print(
- "(f = msg.get$name$()) ? f.toObject(includeInstance, $valuetoobject$) "
- ": []",
- "name", JSGetterName(options, field), "valuetoobject", value_to_object);
- } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- // Message field.
- if (field->is_repeated()) {
- {
- printer->Print(
- "jspb.Message.toObjectList(msg.get$getter$(),\n"
- " $type$.toObject, includeInstance)",
- "getter", JSGetterName(options, field), "type",
- SubmessageTypeRef(options, field));
- }
- } else {
- printer->Print(
- "(f = msg.get$getter$()) && "
- "$type$.toObject(includeInstance, f)",
- "getter", JSGetterName(options, field), "type",
- SubmessageTypeRef(options, field));
- }
- } else if (field->type() == FieldDescriptor::TYPE_BYTES) {
- // For bytes fields we want to always return the B64 data.
- printer->Print("msg.get$getter$()", "getter",
- JSGetterName(options, field, BYTES_B64));
- } else {
- bool use_default = field->has_default_value();
-
- if (field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 &&
- // Repeated fields get initialized to their default in the constructor
- // (why?), so we emit a plain getField() call for them.
- !field->is_repeated()) {
- // Proto3 puts all defaults (including implicit defaults) in toObject().
- // But for proto2 we leave the existing semantics unchanged: unset fields
- // without default are unset.
- use_default = true;
- }
-
- // We don't implement this by calling the accessors, because the semantics
- // of the accessors are changing independently of the toObject() semantics.
- // We are migrating the accessors to return defaults instead of null, but
- // it may take longer to migrate toObject (or we might not want to do it at
- // all). So we want to generate independent code.
- // The accessor for unset optional values without default should return
- // null. Those are converted to undefined in the generated object.
- if (!use_default) {
- printer->Print("(f = ");
- }
- GenerateFieldValueExpression(printer, "msg", field, use_default);
- if (!use_default) {
- printer->Print(") == null ? undefined : f");
- }
- }
-}
-
-void Generator::GenerateObjectTypedef(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- // TODO(b/122687752): Consider renaming nested messages called ObjectFormat
- // to prevent collisions.
- const TProtoStringType type_name = GetMessagePath(options, desc) + ".ObjectFormat";
-
- printer->Print(
- "/**\n"
- " * The raw object form of $messageName$ as accepted by the `fromObject` "
- "method.\n"
- " * @record\n"
- " */\n"
- "$typeName$ = function() {\n",
- "messageName", desc->name(), "typeName", type_name);
-
- for (int i = 0; i < desc->field_count(); i++) {
- if (i > 0) {
- printer->Print("\n");
- }
- printer->Print(
- " /** @type {$fieldType$|undefined} */\n"
- " this.$fieldName$;\n",
- "fieldName", JSObjectFieldName(options, desc->field(i)),
- // TODO(b/121097361): Add type checking for field values.
- "fieldType", "?");
- }
-
- printer->Print("};\n\n");
-}
-
-void Generator::GenerateClassFromObject(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- printer->Print("if (jspb.Message.GENERATE_FROM_OBJECT) {\n\n");
-
- GenerateObjectTypedef(options, printer, desc);
-
- printer->Print(
- "/**\n"
- " * Loads data from an object into a new instance of this proto.\n"
- " * @param {!$classname$.ObjectFormat} obj\n"
- " * The object representation of this proto to load the data from.\n"
- " * @return {!$classname$}\n"
- " */\n"
- "$classname$.fromObject = function(obj) {\n"
- " var msg = new $classname$();\n",
- "classname", GetMessagePath(options, desc));
-
- for (int i = 0; i < desc->field_count(); i++) {
- const FieldDescriptor* field = desc->field(i);
- if (!IgnoreField(field)) {
- GenerateClassFieldFromObject(options, printer, field);
- }
- }
-
- printer->Print(
- " return msg;\n"
- "};\n"
- "}\n\n");
-}
-
-void Generator::GenerateClassFieldFromObject(
- const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field) const {
- if (field->is_map()) {
- const FieldDescriptor* value_field = MapFieldValue(field);
- if (value_field->type() == FieldDescriptor::TYPE_MESSAGE) {
- // Since the map values are of message type, we have to do some extra work
- // to recursively call fromObject() on them before setting the map field.
- printer->Print(
- " obj.$name$ && jspb.Message.setWrapperField(\n"
- " msg, $index$, jspb.Map.fromObject(obj.$name$, $fieldclass$, "
- "$fieldclass$.fromObject));\n",
- "name", JSObjectFieldName(options, field), "index",
- JSFieldIndex(field), "fieldclass",
- GetMessagePath(options, value_field->message_type()));
- } else {
- // `msg` is a newly-constructed message object that has not yet built any
- // map containers wrapping underlying arrays, so we can simply directly
- // set the array here without fear of a stale wrapper.
- printer->Print(
- " obj.$name$ && "
- "jspb.Message.setField(msg, $index$, obj.$name$);\n",
- "name", JSObjectFieldName(options, field), "index",
- JSFieldIndex(field));
- }
- } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- // Message field (singular or repeated)
- if (field->is_repeated()) {
- {
- printer->Print(
- " obj.$name$ && "
- "jspb.Message.setRepeatedWrapperField(\n"
- " msg, $index$, obj.$name$.map(\n"
- " $fieldclass$.fromObject));\n",
- "name", JSObjectFieldName(options, field), "index",
- JSFieldIndex(field), "fieldclass",
- SubmessageTypeRef(options, field));
- }
- } else {
- printer->Print(
- " obj.$name$ && jspb.Message.setWrapperField(\n"
- " msg, $index$, $fieldclass$.fromObject(obj.$name$));\n",
- "name", JSObjectFieldName(options, field), "index",
- JSFieldIndex(field), "fieldclass", SubmessageTypeRef(options, field));
- }
- } else {
- // Simple (primitive) field.
- printer->Print(
- " obj.$name$ != null && jspb.Message.setField(msg, $index$, "
- "obj.$name$);\n",
- "name", JSObjectFieldName(options, field), "index",
- JSFieldIndex(field));
- }
-}
-
-void Generator::GenerateClassRegistration(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- // Register any extensions defined inside this message type.
- for (int i = 0; i < desc->extension_count(); i++) {
- const FieldDescriptor* extension = desc->extension(i);
- if (ShouldGenerateExtension(extension)) {
- GenerateExtension(options, printer, extension);
- }
- }
-}
-
-void Generator::GenerateClassFields(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- for (int i = 0; i < desc->field_count(); i++) {
- if (!IgnoreField(desc->field(i))) {
- GenerateClassField(options, printer, desc->field(i));
- }
- }
-}
-
-void GenerateBytesWrapper(const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field, BytesMode bytes_mode) {
- TProtoStringType type =
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false, bytes_mode);
- printer->Print(
- "/**\n"
- " * $fielddef$\n"
- "$comment$"
- " * This is a type-conversion wrapper around `get$defname$()`\n"
- " * @return {$type$}\n"
- " */\n"
- "$class$.prototype.get$name$ = function() {\n"
- " return /** @type {$type$} */ (jspb.Message.bytes$list$As$suffix$(\n"
- " this.get$defname$()));\n"
- "};\n"
- "\n"
- "\n",
- "fielddef", FieldDefinition(options, field), "comment",
- FieldComments(field, bytes_mode), "type", type, "class",
- GetMessagePath(options, field->containing_type()), "name",
- JSGetterName(options, field, bytes_mode), "list",
- field->is_repeated() ? "List" : "", "suffix",
- JSByteGetterSuffix(bytes_mode), "defname",
- JSGetterName(options, field, BYTES_DEFAULT));
-}
-
-void Generator::GenerateClassField(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const {
- if (field->is_map()) {
- const FieldDescriptor* key_field = MapFieldKey(field);
- const FieldDescriptor* value_field = MapFieldValue(field);
- // Map field: special handling to instantiate the map object on demand.
- TProtoStringType key_type =
- JSFieldTypeAnnotation(options, key_field,
- /* is_setter_argument = */ false,
- /* force_present = */ true,
- /* singular_if_not_packed = */ false);
- TProtoStringType value_type =
- JSFieldTypeAnnotation(options, value_field,
- /* is_setter_argument = */ false,
- /* force_present = */ true,
- /* singular_if_not_packed = */ false);
-
- printer->Print(
- "/**\n"
- " * $fielddef$\n"
- " * @param {boolean=} opt_noLazyCreate Do not create the map if\n"
- " * empty, instead returning `undefined`\n"
- " * @return {!jspb.Map<$keytype$,$valuetype$>}\n"
- " */\n",
- "fielddef", FieldDefinition(options, field), "keytype", key_type,
- "valuetype", value_type);
- printer->Print(
- "$class$.prototype.$gettername$ = function(opt_noLazyCreate) {\n"
- " return /** @type {!jspb.Map<$keytype$,$valuetype$>} */ (\n",
- "class", GetMessagePath(options, field->containing_type()),
- "gettername", "get" + JSGetterName(options, field), "keytype", key_type,
- "valuetype", value_type);
- printer->Annotate("gettername", field);
- printer->Print(
- " jspb.Message.getMapField(this, $index$, opt_noLazyCreate",
- "index", JSFieldIndex(field));
-
- if (value_field->type() == FieldDescriptor::TYPE_MESSAGE) {
- printer->Print(
- ",\n"
- " $messageType$",
- "messageType", GetMessagePath(options, value_field->message_type()));
- } else {
- printer->Print(
- ",\n"
- " null");
- }
-
- printer->Print("));\n");
-
- printer->Print(
- "};\n"
- "\n"
- "\n");
- } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- // Message field: special handling in order to wrap the underlying data
- // array with a message object.
-
- printer->Print(
- "/**\n"
- " * $fielddef$\n"
- "$comment$"
- " * @return {$type$}\n"
- " */\n",
- "fielddef", FieldDefinition(options, field), "comment",
- FieldComments(field, BYTES_DEFAULT), "type",
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false));
- printer->Print(
- "$class$.prototype.$gettername$ = function() {\n"
- " return /** @type{$type$} */ (\n"
- " jspb.Message.get$rpt$WrapperField(this, $wrapperclass$, "
- "$index$$required$));\n"
- "};\n"
- "\n"
- "\n",
- "class", GetMessagePath(options, field->containing_type()),
- "gettername", "get" + JSGetterName(options, field), "type",
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false),
- "rpt", (field->is_repeated() ? "Repeated" : ""), "index",
- JSFieldIndex(field), "wrapperclass", SubmessageTypeRef(options, field),
- "required",
- (field->label() == FieldDescriptor::LABEL_REQUIRED ? ", 1" : ""));
- printer->Annotate("gettername", field);
- printer->Print(
- "/**\n"
- " * @param {$optionaltype$} value\n"
- " * @return {!$class$} returns this\n"
- "*/\n"
- "$class$.prototype.$settername$ = function(value) {\n"
- " return jspb.Message.set$oneoftag$$repeatedtag$WrapperField(",
- "optionaltype",
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ true,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false),
- "class", GetMessagePath(options, field->containing_type()),
- "settername", "set" + JSGetterName(options, field), "oneoftag",
- (InRealOneof(field) ? "Oneof" : ""), "repeatedtag",
- (field->is_repeated() ? "Repeated" : ""));
- printer->Annotate("settername", field);
-
- printer->Print(
- "this, $index$$oneofgroup$, value);\n"
- "};\n"
- "\n"
- "\n",
- "index", JSFieldIndex(field), "oneofgroup",
- (InRealOneof(field) ? (", " + JSOneofArray(options, field)) : ""));
-
- if (field->is_repeated()) {
- GenerateRepeatedMessageHelperMethods(options, printer, field);
- }
-
- } else {
- bool untyped = false;
-
- // Simple (primitive) field, either singular or repeated.
-
- // TODO(b/26173701): Always use BYTES_DEFAULT for the getter return type;
- // at this point we "lie" to non-binary users and tell the return
- // type is always base64 string, pending a LSC to migrate to typed getters.
- BytesMode bytes_mode =
- field->type() == FieldDescriptor::TYPE_BYTES && !options.binary
- ? BYTES_B64
- : BYTES_DEFAULT;
- TProtoStringType typed_annotation =
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false,
- /* bytes_mode = */ bytes_mode);
- if (untyped) {
- printer->Print(
- "/**\n"
- " * @return {?} Raw field, untyped.\n"
- " */\n");
- } else {
- printer->Print(
- "/**\n"
- " * $fielddef$\n"
- "$comment$"
- " * @return {$type$}\n"
- " */\n",
- "fielddef", FieldDefinition(options, field), "comment",
- FieldComments(field, bytes_mode), "type", typed_annotation);
- }
-
- printer->Print("$class$.prototype.$gettername$ = function() {\n", "class",
- GetMessagePath(options, field->containing_type()),
- "gettername", "get" + JSGetterName(options, field));
- printer->Annotate("gettername", field);
-
- if (untyped) {
- printer->Print(" return ");
- } else {
- printer->Print(" return /** @type {$type$} */ (", "type",
- typed_annotation);
- }
-
- bool use_default = !ReturnsNullWhenUnset(options, field);
-
- // Raw fields with no default set should just return undefined.
- if (untyped && !field->has_default_value()) {
- use_default = false;
- }
-
- // Repeated fields get initialized to their default in the constructor
- // (why?), so we emit a plain getField() call for them.
- if (field->is_repeated()) {
- use_default = false;
- }
-
- GenerateFieldValueExpression(printer, "this", field, use_default);
-
- if (untyped) {
- printer->Print(
- ";\n"
- "};\n"
- "\n"
- "\n");
- } else {
- printer->Print(
- ");\n"
- "};\n"
- "\n"
- "\n");
- }
-
- if (field->type() == FieldDescriptor::TYPE_BYTES && !untyped) {
- GenerateBytesWrapper(options, printer, field, BYTES_B64);
- GenerateBytesWrapper(options, printer, field, BYTES_U8);
- }
-
- printer->Print(
- "/**\n"
- " * @param {$optionaltype$} value\n"
- " * @return {!$class$} returns this\n"
- " */\n",
- "class", GetMessagePath(options, field->containing_type()),
- "optionaltype",
- untyped ? "*"
- : JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ true,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false));
-
- if (field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 &&
- !field->is_repeated() && !field->is_map() &&
- !HasFieldPresence(options, field)) {
- // Proto3 non-repeated and non-map fields without presence use the
- // setProto3*Field function.
- printer->Print(
- "$class$.prototype.$settername$ = function(value) {\n"
- " return jspb.Message.setProto3$typetag$Field(this, $index$, "
- "value);"
- "\n"
- "};\n"
- "\n"
- "\n",
- "class", GetMessagePath(options, field->containing_type()),
- "settername", "set" + JSGetterName(options, field), "typetag",
- JSTypeTag(field), "index", JSFieldIndex(field));
- printer->Annotate("settername", field);
- } else {
- // Otherwise, use the regular setField function.
- printer->Print(
- "$class$.prototype.$settername$ = function(value) {\n"
- " return jspb.Message.set$oneoftag$Field(this, $index$",
- "class", GetMessagePath(options, field->containing_type()),
- "settername", "set" + JSGetterName(options, field), "oneoftag",
- (InRealOneof(field) ? "Oneof" : ""), "index", JSFieldIndex(field));
- printer->Annotate("settername", field);
- printer->Print(
- "$oneofgroup$, $type$value$rptvalueinit$$typeclose$);\n"
- "};\n"
- "\n"
- "\n",
- "type",
- untyped ? "/** @type{string|number|boolean|Array|undefined} */(" : "",
- "typeclose", untyped ? ")" : "", "oneofgroup",
- (InRealOneof(field) ? (", " + JSOneofArray(options, field)) : ""),
- "rptvalueinit", (field->is_repeated() ? " || []" : ""));
- }
-
- if (untyped) {
- printer->Print(
- "/**\n"
- " * Clears the value.\n"
- " * @return {!$class$} returns this\n"
- " */\n",
- "class", GetMessagePath(options, field->containing_type()));
- }
-
- if (field->is_repeated()) {
- GenerateRepeatedPrimitiveHelperMethods(options, printer, field, untyped);
- }
- }
-
- // Generate clearFoo() method for map fields, repeated fields, and other
- // fields with presence.
- if (field->is_map()) {
- // clang-format off
- printer->Print(
- "/**\n"
- " * Clears values from the map. The map will be non-null.\n"
- " * @return {!$class$} returns this\n"
- " */\n"
- "$class$.prototype.$clearername$ = function() {\n"
- " this.$gettername$().clear();\n"
- " return this;"
- "};\n"
- "\n"
- "\n",
- "class", GetMessagePath(options, field->containing_type()),
- "clearername", "clear" + JSGetterName(options, field),
- "gettername", "get" + JSGetterName(options, field));
- // clang-format on
- printer->Annotate("clearername", field);
- } else if (field->is_repeated() ||
- (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE &&
- !field->is_required())) {
- // Fields where we can delegate to the regular setter.
- // clang-format off
- printer->Print(
- "/**\n"
- " * $jsdoc$\n"
- " * @return {!$class$} returns this\n"
- " */\n"
- "$class$.prototype.$clearername$ = function() {\n"
- " return this.$settername$($clearedvalue$);\n"
- "};\n"
- "\n"
- "\n",
- "jsdoc", field->is_repeated()
- ? "Clears the list making it empty but non-null."
- : "Clears the message field making it undefined.",
- "class", GetMessagePath(options, field->containing_type()),
- "clearername", "clear" + JSGetterName(options, field),
- "settername", "set" + JSGetterName(options, field),
- "clearedvalue", (field->is_repeated() ? "[]" : "undefined"));
- // clang-format on
- printer->Annotate("clearername", field);
- } else if (HasFieldPresence(options, field)) {
- // Fields where we can't delegate to the regular setter because it doesn't
- // accept "undefined" as an argument.
- // clang-format off
- printer->Print(
- "/**\n"
- " * Clears the field making it undefined.\n"
- " * @return {!$class$} returns this\n"
- " */\n"
- "$class$.prototype.$clearername$ = function() {\n"
- " return jspb.Message.set$maybeoneof$Field(this, "
- "$index$$maybeoneofgroup$, ",
- "class", GetMessagePath(options, field->containing_type()),
- "clearername", "clear" + JSGetterName(options, field),
- "maybeoneof", (InRealOneof(field) ? "Oneof" : ""),
- "maybeoneofgroup", (InRealOneof(field)
- ? (", " + JSOneofArray(options, field))
- : ""),
- "index", JSFieldIndex(field));
- // clang-format on
- printer->Annotate("clearername", field);
- printer->Print(
- "$clearedvalue$);\n"
- "};\n"
- "\n"
- "\n",
- "clearedvalue", (field->is_repeated() ? "[]" : "undefined"));
- }
-
- if (HasFieldPresence(options, field)) {
- printer->Print(
- "/**\n"
- " * Returns whether this field is set.\n"
- " * @return {boolean}\n"
- " */\n"
- "$class$.prototype.$hasername$ = function() {\n"
- " return jspb.Message.getField(this, $index$) != null;\n"
- "};\n"
- "\n"
- "\n",
- "class", GetMessagePath(options, field->containing_type()), "hasername",
- "has" + JSGetterName(options, field), "index", JSFieldIndex(field));
- printer->Annotate("hasername", field);
- }
-}
-
-void Generator::GenerateRepeatedPrimitiveHelperMethods(
- const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field, bool untyped) const {
- // clang-format off
- printer->Print(
- "/**\n"
- " * @param {$optionaltype$} value\n"
- " * @param {number=} opt_index\n"
- " * @return {!$class$} returns this\n"
- " */\n"
- "$class$.prototype.$addername$ = function(value, opt_index) {\n"
- " return jspb.Message.addToRepeatedField(this, "
- "$index$",
- "class", GetMessagePath(options, field->containing_type()), "addername",
- "add" + JSGetterName(options, field, BYTES_DEFAULT,
- /* drop_list = */ true),
- "optionaltype",
- JSFieldTypeAnnotation(
- options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ true,
- /* singular_if_not_packed = */ false,
- BYTES_DEFAULT,
- /* force_singular = */ true),
- "index", JSFieldIndex(field));
- printer->Annotate("addername", field);
- printer->Print(
- "$oneofgroup$, $type$value$rptvalueinit$$typeclose$, "
- "opt_index);\n"
- "};\n"
- "\n"
- "\n",
- "type", untyped ? "/** @type{string|number|boolean|!Uint8Array} */(" : "",
- "typeclose", untyped ? ")" : "", "oneofgroup",
- (InRealOneof(field) ? (", " + JSOneofArray(options, field)) : ""),
- "rptvalueinit", "");
- // clang-format on
-}
-
-void Generator::GenerateRepeatedMessageHelperMethods(
- const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field) const {
- printer->Print(
- "/**\n"
- " * @param {!$optionaltype$=} opt_value\n"
- " * @param {number=} opt_index\n"
- " * @return {!$optionaltype$}\n"
- " */\n"
- "$class$.prototype.$addername$ = function(opt_value, opt_index) {\n"
- " return jspb.Message.addTo$repeatedtag$WrapperField(",
- "optionaltype", JSTypeName(options, field, BYTES_DEFAULT), "class",
- GetMessagePath(options, field->containing_type()), "addername",
- "add" + JSGetterName(options, field, BYTES_DEFAULT,
- /* drop_list = */ true),
- "repeatedtag", (field->is_repeated() ? "Repeated" : ""));
-
- printer->Annotate("addername", field);
- printer->Print(
- "this, $index$$oneofgroup$, opt_value, $ctor$, opt_index);\n"
- "};\n"
- "\n"
- "\n",
- "index", JSFieldIndex(field), "oneofgroup",
- (InRealOneof(field) ? (", " + JSOneofArray(options, field)) : ""), "ctor",
- GetMessagePath(options, field->message_type()));
-}
-
-void Generator::GenerateClassExtensionFieldInfo(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- if (IsExtendable(desc)) {
- printer->Print(
- "\n"
- "/**\n"
- " * The extensions registered with this message class. This is a "
- "map of\n"
- " * extension field number to fieldInfo object.\n"
- " *\n"
- " * For example:\n"
- " * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, "
- "ctor: proto.example.MyMessage} }\n"
- " *\n"
- " * fieldName contains the JsCompiler renamed field name property "
- "so that it\n"
- " * works in OPTIMIZED mode.\n"
- " *\n"
- " * @type {!Object<number, jspb.ExtensionFieldInfo>}\n"
- " */\n"
- "$class$.extensions = {};\n"
- "\n",
- "class", GetMessagePath(options, desc));
-
- printer->Print(
- "\n"
- "/**\n"
- " * The extensions registered with this message class. This is a "
- "map of\n"
- " * extension field number to fieldInfo object.\n"
- " *\n"
- " * For example:\n"
- " * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, "
- "ctor: proto.example.MyMessage} }\n"
- " *\n"
- " * fieldName contains the JsCompiler renamed field name property "
- "so that it\n"
- " * works in OPTIMIZED mode.\n"
- " *\n"
- " * @type {!Object<number, jspb.ExtensionFieldBinaryInfo>}\n"
- " */\n"
- "$class$.extensionsBinary = {};\n"
- "\n",
- "class", GetMessagePath(options, desc));
- }
-}
-
-void Generator::GenerateClassDeserializeBinary(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- // TODO(cfallin): Handle lazy decoding when requested by field option and/or
- // by default for 'bytes' fields and packed repeated fields.
-
- printer->Print(
- "/**\n"
- " * Deserializes binary data (in protobuf wire format).\n"
- " * @param {jspb.ByteSource} bytes The bytes to deserialize.\n"
- " * @return {!$class$}\n"
- " */\n"
- "$class$.deserializeBinary = function(bytes) {\n"
- " var reader = new jspb.BinaryReader(bytes);\n"
- " var msg = new $class$;\n"
- " return $class$.deserializeBinaryFromReader(msg, reader);\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Deserializes binary data (in protobuf wire format) from the\n"
- " * given reader into the given message object.\n"
- " * @param {!$class$} msg The message object to deserialize into.\n"
- " * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n"
- " * @return {!$class$}\n"
- " */\n"
- "$class$.deserializeBinaryFromReader = function(msg, reader) {\n"
- " while (reader.nextField()) {\n",
- "class", GetMessagePath(options, desc));
- printer->Print(
- " if (reader.isEndGroup()) {\n"
- " break;\n"
- " }\n"
- " var field = reader.getFieldNumber();\n"
- " switch (field) {\n");
-
- for (int i = 0; i < desc->field_count(); i++) {
- if (!IgnoreField(desc->field(i))) {
- GenerateClassDeserializeBinaryField(options, printer, desc->field(i));
- }
- }
-
- printer->Print(" default:\n");
- if (IsExtendable(desc)) {
- printer->Print(
- " jspb.Message.readBinaryExtension(msg, reader,\n"
- " $extobj$Binary,\n"
- " $class$.prototype.getExtension,\n"
- " $class$.prototype.setExtension);\n"
- " break;\n"
- " }\n",
- "extobj", JSExtensionsObjectName(options, desc->file(), desc), "class",
- GetMessagePath(options, desc));
- } else {
- printer->Print(
- " reader.skipField();\n"
- " break;\n"
- " }\n");
- }
-
- printer->Print(
- " }\n"
- " return msg;\n"
- "};\n"
- "\n"
- "\n");
-}
-
-void Generator::GenerateClassDeserializeBinaryField(
- const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field) const {
- printer->Print(" case $num$:\n", "num", StrCat(field->number()));
-
- if (field->is_map()) {
- const FieldDescriptor* key_field = MapFieldKey(field);
- const FieldDescriptor* value_field = MapFieldValue(field);
- printer->Print(
- " var value = msg.get$name$();\n"
- " reader.readMessage(value, function(message, reader) {\n",
- "name", JSGetterName(options, field));
-
- printer->Print(
- " jspb.Map.deserializeBinary(message, reader, "
- "$keyReaderFn$, $valueReaderFn$",
- "keyReaderFn", JSBinaryReaderMethodName(options, key_field),
- "valueReaderFn", JSBinaryReaderMethodName(options, value_field));
-
- if (value_field->type() == FieldDescriptor::TYPE_MESSAGE) {
- printer->Print(", $messageType$.deserializeBinaryFromReader",
- "messageType",
- GetMessagePath(options, value_field->message_type()));
- } else {
- printer->Print(", null");
- }
- printer->Print(", $defaultKey$", "defaultKey", JSFieldDefault(key_field));
- if (value_field->type() == FieldDescriptor::TYPE_MESSAGE) {
- printer->Print(", new $messageType$()", "messageType",
- GetMessagePath(options, value_field->message_type()));
- } else {
- printer->Print(", $defaultValue$", "defaultValue",
- JSFieldDefault(value_field));
- }
- printer->Print(");\n");
- printer->Print(" });\n");
- } else {
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- printer->Print(
- " var value = new $fieldclass$;\n"
- " reader.read$msgOrGroup$($grpfield$value,"
- "$fieldclass$.deserializeBinaryFromReader);\n",
- "fieldclass", SubmessageTypeRef(options, field), "msgOrGroup",
- (field->type() == FieldDescriptor::TYPE_GROUP) ? "Group" : "Message",
- "grpfield",
- (field->type() == FieldDescriptor::TYPE_GROUP)
- ? (StrCat(field->number()) + ", ")
- : "");
- } else if (field->is_packable()) {
- printer->Print(
- " var values = /** @type {$fieldtype$} */ "
- "(reader.isDelimited() "
- "? reader.readPacked$reader$() : [reader.read$reader$()]);\n",
- "fieldtype",
- JSFieldTypeAnnotation(options, field, false, true,
- /* singular_if_not_packed */ false, BYTES_U8),
- "reader", JSBinaryReaderMethodType(field));
- } else {
- printer->Print(
- " var value = /** @type {$fieldtype$} */ "
- "(reader.read$reader$());\n",
- "fieldtype",
- JSFieldTypeAnnotation(options, field, false, true,
- /* singular_if_not_packed */ true, BYTES_U8),
- "reader",
- JSBinaryReadWriteMethodName(field, /* is_writer = */ false));
- }
-
- if (field->is_packable()) {
- printer->Print(
- " for (var i = 0; i < values.length; i++) {\n"
- " msg.add$name$(values[i]);\n"
- " }\n",
- "name",
- JSGetterName(options, field, BYTES_DEFAULT, /* drop_list = */ true));
- } else if (field->is_repeated()) {
- printer->Print(
- " msg.add$name$(value);\n", "name",
- JSGetterName(options, field, BYTES_DEFAULT, /* drop_list = */ true));
- } else {
- // Singular fields, and packed repeated fields, receive a |value| either
- // as the field's value or as the array of all the field's values; set
- // this as the field's value directly.
- printer->Print(" msg.set$name$(value);\n", "name",
- JSGetterName(options, field));
- }
- }
-
- printer->Print(" break;\n");
-}
-
-void Generator::GenerateClassSerializeBinary(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const {
- printer->Print(
- "/**\n"
- " * Serializes the message to binary data (in protobuf wire format).\n"
- " * @return {!Uint8Array}\n"
- " */\n"
- "$class$.prototype.serializeBinary = function() {\n"
- " var writer = new jspb.BinaryWriter();\n"
- " $class$.serializeBinaryToWriter(this, writer);\n"
- " return writer.getResultBuffer();\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Serializes the given message to binary data (in protobuf wire\n"
- " * format), writing to the given BinaryWriter.\n"
- " * @param {!$class$} message\n"
- " * @param {!jspb.BinaryWriter} writer\n"
- " * @suppress {unusedLocalVariables} f is only used for nested messages\n"
- " */\n"
- "$class$.serializeBinaryToWriter = function(message, "
- "writer) {\n"
- " var f = undefined;\n",
- "class", GetMessagePath(options, desc));
-
- for (int i = 0; i < desc->field_count(); i++) {
- if (!IgnoreField(desc->field(i))) {
- GenerateClassSerializeBinaryField(options, printer, desc->field(i));
- }
- }
-
- if (IsExtendable(desc)) {
- printer->Print(
- " jspb.Message.serializeBinaryExtensions(message, writer,\n"
- " $extobj$Binary, $class$.prototype.getExtension);\n",
- "extobj", JSExtensionsObjectName(options, desc->file(), desc), "class",
- GetMessagePath(options, desc));
- }
-
- printer->Print(
- "};\n"
- "\n"
- "\n");
-}
-
-void Generator::GenerateClassSerializeBinaryField(
- const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field) const {
- if (HasFieldPresence(options, field) &&
- field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) {
- TProtoStringType typed_annotation =
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ false,
- /* singular_if_not_packed = */ false,
- /* bytes_mode = */ BYTES_DEFAULT);
- printer->Print(
- " f = /** @type {$type$} */ "
- "(jspb.Message.getField(message, $index$));\n",
- "index", JSFieldIndex(field), "type", typed_annotation);
- } else {
- printer->Print(
- " f = message.get$name$($nolazy$);\n", "name",
- JSGetterName(options, field, BYTES_U8),
- // No lazy creation for maps containers -- fastpath the empty case.
- "nolazy", field->is_map() ? "true" : "");
- }
-
- // Print an `if (condition)` statement that evaluates to true if the field
- // goes on the wire.
- if (field->is_map()) {
- printer->Print(" if (f && f.getLength() > 0) {\n");
- } else if (field->is_repeated()) {
- printer->Print(" if (f.length > 0) {\n");
- } else {
- if (HasFieldPresence(options, field)) {
- printer->Print(" if (f != null) {\n");
- } else {
- // No field presence: serialize onto the wire only if value is
- // non-default. Defaults are documented here:
- // https://goto.google.com/lhdfm
- switch (field->cpp_type()) {
- case FieldDescriptor::CPPTYPE_INT32:
- case FieldDescriptor::CPPTYPE_INT64:
- case FieldDescriptor::CPPTYPE_UINT32:
- case FieldDescriptor::CPPTYPE_UINT64: {
- if (IsIntegralFieldWithStringJSType(field)) {
- // We can use `parseInt` here even though it will not be precise for
- // 64-bit quantities because we are only testing for zero/nonzero,
- // and JS numbers (64-bit floating point values, i.e., doubles) are
- // integer-precise in the range that includes zero.
- printer->Print(" if (parseInt(f, 10) !== 0) {\n");
- } else {
- printer->Print(" if (f !== 0) {\n");
- }
- break;
- }
-
- case FieldDescriptor::CPPTYPE_ENUM:
- case FieldDescriptor::CPPTYPE_FLOAT:
- case FieldDescriptor::CPPTYPE_DOUBLE:
- printer->Print(" if (f !== 0.0) {\n");
- break;
- case FieldDescriptor::CPPTYPE_BOOL:
- printer->Print(" if (f) {\n");
- break;
- case FieldDescriptor::CPPTYPE_STRING:
- printer->Print(" if (f.length > 0) {\n");
- break;
- default:
- assert(false);
- break;
- }
- }
- }
-
- // Write the field on the wire.
- if (field->is_map()) {
- const FieldDescriptor* key_field = MapFieldKey(field);
- const FieldDescriptor* value_field = MapFieldValue(field);
- printer->Print(
- " f.serializeBinary($index$, writer, "
- "$keyWriterFn$, $valueWriterFn$",
- "index", StrCat(field->number()), "keyWriterFn",
- JSBinaryWriterMethodName(options, key_field), "valueWriterFn",
- JSBinaryWriterMethodName(options, value_field));
-
- if (value_field->type() == FieldDescriptor::TYPE_MESSAGE) {
- printer->Print(", $messageType$.serializeBinaryToWriter", "messageType",
- GetMessagePath(options, value_field->message_type()));
- }
-
- printer->Print(");\n");
- } else {
- printer->Print(
- " writer.write$method$(\n"
- " $index$,\n"
- " f",
- "method", JSBinaryReadWriteMethodName(field, /* is_writer = */ true),
- "index", StrCat(field->number()));
-
- if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE &&
- !field->is_map()) {
- printer->Print(
- ",\n"
- " $submsg$.serializeBinaryToWriter\n",
- "submsg", SubmessageTypeRef(options, field));
- } else {
- printer->Print("\n");
- }
-
- printer->Print(" );\n");
- }
-
- // Close the `if`.
- printer->Print(" }\n");
-}
-
-void Generator::GenerateEnum(const GeneratorOptions& options,
- io::Printer* printer,
- const EnumDescriptor* enumdesc) const {
- printer->Print(
- "/**\n"
- " * @enum {number}\n"
- " */\n"
- "$enumprefix$$name$ = {\n",
- "enumprefix", GetEnumPathPrefix(options, enumdesc), "name",
- enumdesc->name());
- printer->Annotate("name", enumdesc);
-
- std::set<TProtoStringType> used_name;
- std::vector<int> valid_index;
- for (int i = 0; i < enumdesc->value_count(); i++) {
- if (enumdesc->options().allow_alias() &&
- !used_name.insert(ToEnumCase(enumdesc->value(i)->name())).second) {
- continue;
- }
- valid_index.push_back(i);
- }
- for (auto i : valid_index) {
- const EnumValueDescriptor* value = enumdesc->value(i);
- printer->Print(" $name$: $value$$comma$\n", "name",
- ToEnumCase(value->name()), "value", StrCat(value->number()),
- "comma", (i == valid_index.back()) ? "" : ",");
- printer->Annotate("name", value);
- }
-
- printer->Print(
- "};\n"
- "\n");
-}
-
-void Generator::GenerateExtension(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const {
- TProtoStringType extension_scope =
- (field->extension_scope()
- ? GetMessagePath(options, field->extension_scope())
- : GetNamespace(options, field->file()));
-
- const TProtoStringType extension_object_name = JSObjectFieldName(options, field);
- printer->Print(
- "\n"
- "/**\n"
- " * A tuple of {field number, class constructor} for the extension\n"
- " * field named `$nameInComment$`.\n"
- " * @type {!jspb.ExtensionFieldInfo<$extensionType$>}\n"
- " */\n"
- "$class$.$name$ = new jspb.ExtensionFieldInfo(\n",
- "nameInComment", extension_object_name, "name", extension_object_name,
- "class", extension_scope, "extensionType",
- JSFieldTypeAnnotation(options, field,
- /* is_setter_argument = */ false,
- /* force_present = */ true,
- /* singular_if_not_packed = */ false));
- printer->Annotate("name", field);
- printer->Print(
- " $index$,\n"
- " {$name$: 0},\n"
- " $ctor$,\n"
- " /** @type {?function((boolean|undefined),!jspb.Message=): "
- "!Object} */ (\n"
- " $toObject$),\n"
- " $repeated$);\n",
- "index", StrCat(field->number()), "name", extension_object_name, "ctor",
- (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE
- ? SubmessageTypeRef(options, field)
- : TProtoStringType("null")),
- "toObject",
- (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE
- ? (SubmessageTypeRef(options, field) + ".toObject")
- : TProtoStringType("null")),
- "repeated", (field->is_repeated() ? "1" : "0"));
-
- printer->Print(
- "\n"
- "$extendName$Binary[$index$] = new jspb.ExtensionFieldBinaryInfo(\n"
- " $class$.$name$,\n"
- " $binaryReaderFn$,\n"
- " $binaryWriterFn$,\n"
- " $binaryMessageSerializeFn$,\n"
- " $binaryMessageDeserializeFn$,\n",
- "extendName",
- JSExtensionsObjectName(options, field->file(), field->containing_type()),
- "index", StrCat(field->number()), "class", extension_scope, "name",
- extension_object_name, "binaryReaderFn",
- JSBinaryReaderMethodName(options, field), "binaryWriterFn",
- JSBinaryWriterMethodName(options, field), "binaryMessageSerializeFn",
- (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE)
- ? (SubmessageTypeRef(options, field) + ".serializeBinaryToWriter")
- : "undefined",
- "binaryMessageDeserializeFn",
- (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE)
- ? (SubmessageTypeRef(options, field) + ".deserializeBinaryFromReader")
- : "undefined");
-
- printer->Print(" $isPacked$);\n", "isPacked",
- (field->is_packed() ? "true" : "false"));
-
- printer->Print(
- "// This registers the extension field with the extended class, so that\n"
- "// toObject() will function correctly.\n"
- "$extendName$[$index$] = $class$.$name$;\n"
- "\n",
- "extendName",
- JSExtensionsObjectName(options, field->file(), field->containing_type()),
- "index", StrCat(field->number()), "class", extension_scope, "name",
- extension_object_name);
-}
-
-bool GeneratorOptions::ParseFromOptions(
- const std::vector<std::pair<TProtoStringType, TProtoStringType> >& options,
- TProtoStringType* error) {
- for (int i = 0; i < options.size(); i++) {
- if (options[i].first == "add_require_for_enums") {
- if (options[i].second != "") {
- *error = "Unexpected option value for add_require_for_enums";
- return false;
- }
- add_require_for_enums = true;
- } else if (options[i].first == "binary") {
- if (options[i].second != "") {
- *error = "Unexpected option value for binary";
- return false;
- }
- binary = true;
- } else if (options[i].first == "testonly") {
- if (options[i].second != "") {
- *error = "Unexpected option value for testonly";
- return false;
- }
- testonly = true;
-
- } else if (options[i].first == "error_on_name_conflict") {
- GOOGLE_LOG(WARNING) << "Ignoring error_on_name_conflict option, this "
- "will be removed in a future release";
- } else if (options[i].first == "output_dir") {
- output_dir = options[i].second;
- } else if (options[i].first == "namespace_prefix") {
- namespace_prefix = options[i].second;
- } else if (options[i].first == "library") {
- library = options[i].second;
- } else if (options[i].first == "import_style") {
- if (options[i].second == "closure") {
- import_style = kImportClosure;
- } else if (options[i].second == "commonjs") {
- import_style = kImportCommonJs;
- } else if (options[i].second == "commonjs_strict") {
- import_style = kImportCommonJsStrict;
- } else if (options[i].second == "browser") {
- import_style = kImportBrowser;
- } else if (options[i].second == "es6") {
- import_style = kImportEs6;
- } else {
- *error = "Unknown import style " + options[i].second + ", expected " +
- "one of: closure, commonjs, browser, es6.";
- }
- } else if (options[i].first == "extension") {
- extension = options[i].second;
- } else if (options[i].first == "one_output_file_per_input_file") {
- if (!options[i].second.empty()) {
- *error = "Unexpected option value for one_output_file_per_input_file";
- return false;
- }
- one_output_file_per_input_file = true;
- } else if (options[i].first == "annotate_code") {
- if (!options[i].second.empty()) {
- *error = "Unexpected option value for annotate_code";
- return false;
- }
- annotate_code = true;
- } else {
- // Assume any other option is an output directory, as long as it is a bare
- // `key` rather than a `key=value` option.
- if (options[i].second != "") {
- *error = "Unknown option: " + options[i].first;
- return false;
- }
- output_dir = options[i].first;
- }
- }
-
- if (import_style != kImportClosure &&
- (add_require_for_enums || testonly || !library.empty() ||
- extension != ".js" || one_output_file_per_input_file)) {
- *error =
- "The add_require_for_enums, testonly, library, extension, and "
- "one_output_file_per_input_file options should only be "
- "used for import_style=closure";
- return false;
- }
-
- return true;
-}
-
-GeneratorOptions::OutputMode GeneratorOptions::output_mode() const {
- // We use one output file per input file if we are not using Closure or if
- // this is explicitly requested.
- if (import_style != kImportClosure || one_output_file_per_input_file) {
- return kOneOutputFilePerInputFile;
- }
-
- // If a library name is provided, we put everything in that one file.
- if (!library.empty()) {
- return kEverythingInOneFile;
- }
-
- // Otherwise, we create one output file per SCC.
- return kOneOutputFilePerSCC;
-}
-
-void Generator::GenerateFilesInDepOrder(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FileDescriptor*>& files) const {
- // Build a std::set over all files so that the DFS can detect when it recurses
- // into a dep not specified in the user's command line.
- std::set<const FileDescriptor*> all_files(files.begin(), files.end());
- // Track the in-progress set of files that have been generated already.
- std::set<const FileDescriptor*> generated;
- for (int i = 0; i < files.size(); i++) {
- GenerateFileAndDeps(options, printer, files[i], &all_files, &generated);
- }
-}
-
-void Generator::GenerateFileAndDeps(
- const GeneratorOptions& options, io::Printer* printer,
- const FileDescriptor* root, std::set<const FileDescriptor*>* all_files,
- std::set<const FileDescriptor*>* generated) const {
- // Skip if already generated.
- if (generated->find(root) != generated->end()) {
- return;
- }
- generated->insert(root);
-
- // Generate all dependencies before this file's content.
- for (int i = 0; i < root->dependency_count(); i++) {
- const FileDescriptor* dep = root->dependency(i);
- GenerateFileAndDeps(options, printer, dep, all_files, generated);
- }
-
- // Generate this file's content. Only generate if the file is part of the
- // original set requested to be generated; i.e., don't take all transitive
- // deps down to the roots.
- if (all_files->find(root) != all_files->end()) {
- GenerateClassesAndEnums(options, printer, root);
- }
-}
-
-bool Generator::GenerateFile(const FileDescriptor* file,
- const GeneratorOptions& options,
- GeneratorContext* context,
- bool use_short_name) const {
- TProtoStringType filename =
- options.output_dir + "/" +
- GetJSFilename(options, use_short_name
- ? file->name().substr(file->name().rfind('/'))
- : file->name());
- std::unique_ptr<io::ZeroCopyOutputStream> output(context->Open(filename));
- GOOGLE_CHECK(output);
- GeneratedCodeInfo annotations;
- io::AnnotationProtoCollector<GeneratedCodeInfo> annotation_collector(
- &annotations);
- io::Printer printer(output.get(), '$',
- options.annotate_code ? &annotation_collector : nullptr);
-
- GenerateFile(options, &printer, file);
-
- if (printer.failed()) {
- return false;
- }
-
- if (options.annotate_code) {
- EmbedCodeAnnotations(annotations, &printer);
- }
-
- return true;
-}
-
-void Generator::GenerateFile(const GeneratorOptions& options,
- io::Printer* printer,
- const FileDescriptor* file) const {
- GenerateHeader(options, file, printer);
-
- // Generate "require" statements.
- if ((options.import_style == GeneratorOptions::kImportCommonJs ||
- options.import_style == GeneratorOptions::kImportCommonJsStrict)) {
- printer->Print("var jspb = require('google-protobuf');\n");
- printer->Print("var goog = jspb;\n");
-
- // Do not use global scope in strict mode
- if (options.import_style == GeneratorOptions::kImportCommonJsStrict) {
- printer->Print("var proto = {};\n\n");
- } else {
- // To get the global object we call a function with .call(null), this will
- // set "this" inside the function to the global object. This does not work
- // if we are running in strict mode ("use strict"), so we fallback to the
- // following things (in order from first to last):
- // - window: defined in browsers
- // - global: defined in most server side environments like NodeJS
- // - self: defined inside Web Workers (WorkerGlobalScope)
- // - Function('return this')(): this will work on most platforms, but it
- // may be blocked by things like CSP.
- // Function('') is almost the same as eval('')
- printer->Print(
- "var global = (function() { return this || window || global || self "
- "|| Function('return this')(); }).call(null);\n\n");
- }
-
- for (int i = 0; i < file->dependency_count(); i++) {
- const TProtoStringType& name = file->dependency(i)->name();
- printer->Print(
- "var $alias$ = require('$file$');\n"
- "goog.object.extend(proto, $alias$);\n",
- "alias", ModuleAlias(name), "file",
- GetRootPath(file->name(), name) + GetJSFilename(options, name));
- }
- }
-
- std::set<TProtoStringType> provided;
- std::set<const FieldDescriptor*> extensions;
- for (int i = 0; i < file->extension_count(); i++) {
- // We honor the jspb::ignore option here only when working with
- // Closure-style imports. Use of this option is discouraged and so we want
- // to avoid adding new support for it.
- if (options.import_style == GeneratorOptions::kImportClosure &&
- IgnoreField(file->extension(i))) {
- continue;
- }
- provided.insert(GetNamespace(options, file) + "." +
- JSObjectFieldName(options, file->extension(i)));
- extensions.insert(file->extension(i));
- }
-
- FindProvidesForFile(options, printer, file, &provided);
- GenerateProvides(options, printer, &provided);
- std::vector<const FileDescriptor*> files;
- files.push_back(file);
- if (options.import_style == GeneratorOptions::kImportClosure) {
- GenerateRequiresForLibrary(options, printer, files, &provided);
- }
-
- GenerateClassesAndEnums(options, printer, file);
-
- // Generate code for top-level extensions. Extensions nested inside messages
- // are emitted inside GenerateClassesAndEnums().
- for (std::set<const FieldDescriptor*>::const_iterator it = extensions.begin();
- it != extensions.end(); ++it) {
- GenerateExtension(options, printer, *it);
- }
-
- // if provided is empty, do not export anything
- if (options.import_style == GeneratorOptions::kImportCommonJs &&
- !provided.empty()) {
- printer->Print("goog.object.extend(exports, $package$);\n", "package",
- GetNamespace(options, file));
- } else if (options.import_style == GeneratorOptions::kImportCommonJsStrict) {
- printer->Print("goog.object.extend(exports, proto);\n", "package",
- GetNamespace(options, file));
- }
-
- // Emit well-known type methods.
- for (FileToc* toc = well_known_types_js; toc->name != NULL; toc++) {
- TProtoStringType name = TProtoStringType("google/protobuf/") + toc->name;
- if (name == StripProto(file->name()) + ".js") {
- printer->Print(toc->data);
- }
- }
-}
-
-bool Generator::GenerateAll(const std::vector<const FileDescriptor*>& files,
- const TProtoStringType& parameter,
- GeneratorContext* context,
- TProtoStringType* error) const {
- std::vector<std::pair<TProtoStringType, TProtoStringType> > option_pairs;
- ParseGeneratorParameter(parameter, &option_pairs);
- GeneratorOptions options;
- if (!options.ParseFromOptions(option_pairs, error)) {
- return false;
- }
-
- if (options.output_mode() == GeneratorOptions::kEverythingInOneFile) {
- // All output should go in a single file.
- TProtoStringType filename = options.output_dir + "/" + options.library +
- options.GetFileNameExtension();
- std::unique_ptr<io::ZeroCopyOutputStream> output(context->Open(filename));
- GOOGLE_CHECK(output.get());
- GeneratedCodeInfo annotations;
- io::AnnotationProtoCollector<GeneratedCodeInfo> annotation_collector(
- &annotations);
- io::Printer printer(
- output.get(), '$',
- options.annotate_code ? &annotation_collector : nullptr);
-
- // Pull out all extensions -- we need these to generate all
- // provides/requires.
- std::vector<const FieldDescriptor*> extensions;
- for (int i = 0; i < files.size(); i++) {
- for (int j = 0; j < files[i]->extension_count(); j++) {
- const FieldDescriptor* extension = files[i]->extension(j);
- extensions.push_back(extension);
- }
- }
-
- if (files.size() == 1) {
- GenerateHeader(options, files[0], &printer);
- } else {
- GenerateHeader(options, nullptr, &printer);
- }
-
- std::set<TProtoStringType> provided;
- FindProvides(options, &printer, files, &provided);
- FindProvidesForFields(options, &printer, extensions, &provided);
- GenerateProvides(options, &printer, &provided);
- GenerateTestOnly(options, &printer);
- GenerateRequiresForLibrary(options, &printer, files, &provided);
-
- GenerateFilesInDepOrder(options, &printer, files);
-
- for (int i = 0; i < extensions.size(); i++) {
- if (ShouldGenerateExtension(extensions[i])) {
- GenerateExtension(options, &printer, extensions[i]);
- }
- }
-
- if (printer.failed()) {
- return false;
- }
- if (options.annotate_code) {
- EmbedCodeAnnotations(annotations, &printer);
- }
- } else if (options.output_mode() == GeneratorOptions::kOneOutputFilePerSCC) {
- std::set<const Descriptor*> have_printed;
- SCCAnalyzer<DepsGenerator> analyzer;
- std::map<const void*, TProtoStringType> allowed_map;
- if (!GenerateJspbAllowedMap(options, files, &allowed_map, &analyzer)) {
- return false;
- }
-
- bool generated = false;
- for (int i = 0; i < files.size(); i++) {
- const FileDescriptor* file = files[i];
- // Force well known type to generate in a whole file.
- if (IsWellKnownTypeFile(file)) {
- if (!GenerateFile(file, options, context, true)) {
- return false;
- }
- generated = true;
- continue;
- }
- for (int j = 0; j < file->message_type_count(); j++) {
- const Descriptor* desc = file->message_type(j);
- if (have_printed.count(desc) ||
- allowed_map.count(analyzer.GetSCC(desc)) == 0) {
- continue;
- }
-
- generated = true;
- const SCC* scc = analyzer.GetSCC(desc);
- const TProtoStringType& filename = allowed_map[scc];
- std::unique_ptr<io::ZeroCopyOutputStream> output(
- context->Open(filename));
- GOOGLE_CHECK(output.get());
- GeneratedCodeInfo annotations;
- io::AnnotationProtoCollector<GeneratedCodeInfo> annotation_collector(
- &annotations);
- io::Printer printer(
- output.get(), '$',
- options.annotate_code ? &annotation_collector : nullptr);
-
- GenerateHeader(options, file, &printer);
-
- std::set<TProtoStringType> provided;
- for (auto one_desc : scc->descriptors) {
- if (one_desc->containing_type() == nullptr) {
- FindProvidesForMessage(options, &printer, one_desc, &provided);
- }
- }
- GenerateProvides(options, &printer, &provided);
- GenerateTestOnly(options, &printer);
- GenerateRequiresForSCC(options, &printer, scc, &provided);
-
- for (auto one_desc : scc->descriptors) {
- if (one_desc->containing_type() == nullptr) {
- GenerateClassConstructorAndDeclareExtensionFieldInfo(
- options, &printer, one_desc);
- }
- }
- for (auto one_desc : scc->descriptors) {
- if (one_desc->containing_type() == nullptr) {
- GenerateClass(options, &printer, one_desc);
- }
- }
-
- for (auto one_desc : scc->descriptors) {
- have_printed.insert(one_desc);
- }
-
- if (printer.failed()) {
- return false;
- }
- if (options.annotate_code) {
- EmbedCodeAnnotations(annotations, &printer);
- }
- }
- for (int j = 0; j < file->enum_type_count(); j++) {
- const EnumDescriptor* enumdesc = file->enum_type(j);
- if (allowed_map.count(enumdesc) == 0) {
- continue;
- }
-
- generated = true;
- const TProtoStringType& filename = allowed_map[enumdesc];
- std::unique_ptr<io::ZeroCopyOutputStream> output(
- context->Open(filename));
- GOOGLE_CHECK(output.get());
- GeneratedCodeInfo annotations;
- io::AnnotationProtoCollector<GeneratedCodeInfo> annotation_collector(
- &annotations);
- io::Printer printer(
- output.get(), '$',
- options.annotate_code ? &annotation_collector : nullptr);
-
- GenerateHeader(options, file, &printer);
-
- std::set<TProtoStringType> provided;
- FindProvidesForEnum(options, &printer, enumdesc, &provided);
- GenerateProvides(options, &printer, &provided);
- GenerateTestOnly(options, &printer);
-
- GenerateEnum(options, &printer, enumdesc);
-
- if (printer.failed()) {
- return false;
- }
- if (options.annotate_code) {
- EmbedCodeAnnotations(annotations, &printer);
- }
- }
- // File-level extensions (message-level extensions are generated under
- // the enclosing message).
- if (allowed_map.count(file) == 1) {
- generated = true;
- const TProtoStringType& filename = allowed_map[file];
-
- std::unique_ptr<io::ZeroCopyOutputStream> output(
- context->Open(filename));
- GOOGLE_CHECK(output.get());
- GeneratedCodeInfo annotations;
- io::AnnotationProtoCollector<GeneratedCodeInfo> annotation_collector(
- &annotations);
- io::Printer printer(
- output.get(), '$',
- options.annotate_code ? &annotation_collector : nullptr);
-
- GenerateHeader(options, file, &printer);
-
- std::set<TProtoStringType> provided;
- std::vector<const FieldDescriptor*> fields;
-
- for (int j = 0; j < files[i]->extension_count(); j++) {
- if (ShouldGenerateExtension(files[i]->extension(j))) {
- fields.push_back(files[i]->extension(j));
- }
- }
-
- FindProvidesForFields(options, &printer, fields, &provided);
- GenerateProvides(options, &printer, &provided);
- GenerateTestOnly(options, &printer);
- GenerateRequiresForExtensions(options, &printer, fields, &provided);
-
- for (int j = 0; j < files[i]->extension_count(); j++) {
- if (ShouldGenerateExtension(files[i]->extension(j))) {
- GenerateExtension(options, &printer, files[i]->extension(j));
- }
- }
- if (options.annotate_code) {
- EmbedCodeAnnotations(annotations, &printer);
- }
- }
- }
- if (!generated) {
- TProtoStringType filename = options.output_dir + "/" +
- "empty_no_content_void_file" +
- options.GetFileNameExtension();
- std::unique_ptr<io::ZeroCopyOutputStream> output(context->Open(filename));
- }
- } else /* options.output_mode() == kOneOutputFilePerInputFile */ {
- // Generate one output file per input (.proto) file.
-
- for (int i = 0; i < files.size(); i++) {
- const FileDescriptor* file = files[i];
- if (!GenerateFile(file, options, context, false)) {
- return false;
- }
- }
- }
- return true;
-}
-
-} // namespace js
-} // namespace compiler
-} // namespace protobuf
-} // namespace google
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.h
deleted file mode 100644
index 6486382e63..0000000000
--- a/contrib/libs/protoc/src/google/protobuf/compiler/js/js_generator.h
+++ /dev/null
@@ -1,336 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Generates JavaScript code for a given .proto file.
-//
-#ifndef GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
-#define GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
-
-#include <set>
-#include <string>
-
-#include <google/protobuf/stubs/logging.h>
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/scc.h>
-#include <google/protobuf/compiler/code_generator.h>
-
-#include <google/protobuf/port_def.inc>
-
-namespace google {
-namespace protobuf {
-
-class Descriptor;
-class EnumDescriptor;
-class FieldDescriptor;
-class OneofDescriptor;
-class FileDescriptor;
-
-namespace io {
-class Printer;
-}
-
-namespace compiler {
-namespace js {
-
-struct GeneratorOptions {
- // Output path.
- TProtoStringType output_dir;
- // Namespace prefix.
- TProtoStringType namespace_prefix;
- // Enable binary-format support?
- bool binary;
- // What style of imports should be used.
- enum ImportStyle {
- kImportClosure, // goog.require()
- kImportCommonJs, // require()
- kImportCommonJsStrict, // require() with no global export
- kImportBrowser, // no import statements
- kImportEs6, // import { member } from ''
- } import_style;
-
- GeneratorOptions()
- : output_dir("."),
- namespace_prefix(""),
- binary(false),
- import_style(kImportClosure),
- add_require_for_enums(false),
- testonly(false),
- library(""),
- extension(".js"),
- one_output_file_per_input_file(false),
- annotate_code(false) {}
-
- bool ParseFromOptions(
- const std::vector<std::pair<TProtoStringType, TProtoStringType> >& options,
- TProtoStringType* error);
-
- // Returns the file name extension to use for generated code.
- TProtoStringType GetFileNameExtension() const {
- return import_style == kImportClosure ? extension : "_pb.js";
- }
-
- enum OutputMode {
- // Create an output file for each input .proto file.
- kOneOutputFilePerInputFile,
- // Create an output file for each type.
- kOneOutputFilePerSCC,
- // Put everything in a single file named by the library option.
- kEverythingInOneFile,
- };
-
- // Indicates how to output the generated code based on the provided options.
- OutputMode output_mode() const;
-
- // The remaining options are only relevant when we are using kImportClosure.
-
- // Add a `goog.requires()` call for each enum type used. If not set, a
- // forward declaration with `goog.forwardDeclare` is produced instead.
- bool add_require_for_enums;
- // Set this as a test-only module via `goog.setTestOnly();`.
- bool testonly;
- // Create a library with name <name>_lib.js rather than a separate .js file
- // per type?
- TProtoStringType library;
- // The extension to use for output file names.
- TProtoStringType extension;
- // Create a separate output file for each input file?
- bool one_output_file_per_input_file;
- // If true, we should append annotations as comments on the last line for
- // generated .js file. Annotations used by tools like https://kythe.io
- // to provide cross-references between .js and .proto files. Annotations
- // are encoded as base64 proto of GeneratedCodeInfo message (see
- // descriptor.proto).
- bool annotate_code;
-};
-
-// CodeGenerator implementation which generates a JavaScript source file and
-// header. If you create your own protocol compiler binary and you want it to
-// support JavaScript output, you can do so by registering an instance of this
-// CodeGenerator with the CommandLineInterface in your main() function.
-class PROTOC_EXPORT Generator : public CodeGenerator {
- public:
- Generator() {}
- virtual ~Generator() {}
-
- bool Generate(const FileDescriptor* file, const TProtoStringType& parameter,
- GeneratorContext* context, TProtoStringType* error) const override {
- *error = "Unimplemented Generate() method. Call GenerateAll() instead.";
- return false;
- }
-
- bool HasGenerateAll() const override { return true; }
-
- bool GenerateAll(const std::vector<const FileDescriptor*>& files,
- const TProtoStringType& parameter, GeneratorContext* context,
- TProtoStringType* error) const override;
-
- uint64_t GetSupportedFeatures() const override {
- return FEATURE_PROTO3_OPTIONAL;
- }
-
- private:
- void GenerateHeader(const GeneratorOptions& options,
- const FileDescriptor* file, io::Printer* printer) const;
-
- // Generate goog.provides() calls.
- void FindProvides(const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FileDescriptor*>& file,
- std::set<TProtoStringType>* provided) const;
- void FindProvidesForFile(const GeneratorOptions& options,
- io::Printer* printer, const FileDescriptor* file,
- std::set<TProtoStringType>* provided) const;
- void FindProvidesForMessage(const GeneratorOptions& options,
- io::Printer* printer, const Descriptor* desc,
- std::set<TProtoStringType>* provided) const;
- void FindProvidesForEnum(const GeneratorOptions& options,
- io::Printer* printer, const EnumDescriptor* enumdesc,
- std::set<TProtoStringType>* provided) const;
- // For extension fields at file scope.
- void FindProvidesForFields(const GeneratorOptions& options,
- io::Printer* printer,
- const std::vector<const FieldDescriptor*>& fields,
- std::set<TProtoStringType>* provided) const;
- // Print the goog.provides() found by the methods above.
- void GenerateProvides(const GeneratorOptions& options, io::Printer* printer,
- std::set<TProtoStringType>* provided) const;
-
- // Generate goog.setTestOnly() if indicated.
- void GenerateTestOnly(const GeneratorOptions& options,
- io::Printer* printer) const;
-
- // Generate goog.requires() calls.
- void GenerateRequiresForLibrary(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FileDescriptor*>& files,
- std::set<TProtoStringType>* provided) const;
- void GenerateRequiresForSCC(const GeneratorOptions& options,
- io::Printer* printer, const SCC* scc,
- std::set<TProtoStringType>* provided) const;
- // For extension fields at file scope.
- void GenerateRequiresForExtensions(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FieldDescriptor*>& fields,
- std::set<TProtoStringType>* provided) const;
- void GenerateRequiresImpl(const GeneratorOptions& options,
- io::Printer* printer,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards,
- std::set<TProtoStringType>* provided, bool require_jspb,
- bool require_extension, bool require_map) const;
- void FindRequiresForMessage(const GeneratorOptions& options,
- const Descriptor* desc,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards,
- bool* have_message) const;
- void FindRequiresForField(const GeneratorOptions& options,
- const FieldDescriptor* field,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards) const;
- void FindRequiresForExtension(const GeneratorOptions& options,
- const FieldDescriptor* field,
- std::set<TProtoStringType>* required,
- std::set<TProtoStringType>* forwards) const;
- // Generate all things in a proto file into one file.
- // If use_short_name is true, the generated file's name will only be short
- // name that without directory, otherwise filename equals file->name()
- bool GenerateFile(const FileDescriptor* file, const GeneratorOptions& options,
- GeneratorContext* context, bool use_short_name) const;
- void GenerateFile(const GeneratorOptions& options, io::Printer* printer,
- const FileDescriptor* file) const;
-
- // Generate definitions for all message classes and enums in all files,
- // processing the files in dependence order.
- void GenerateFilesInDepOrder(
- const GeneratorOptions& options, io::Printer* printer,
- const std::vector<const FileDescriptor*>& file) const;
- // Helper for above.
- void GenerateFileAndDeps(const GeneratorOptions& options,
- io::Printer* printer, const FileDescriptor* root,
- std::set<const FileDescriptor*>* all_files,
- std::set<const FileDescriptor*>* generated) const;
-
- // Generate definitions for all message classes and enums.
- void GenerateClassesAndEnums(const GeneratorOptions& options,
- io::Printer* printer,
- const FileDescriptor* file) const;
-
- void GenerateFieldValueExpression(io::Printer* printer,
- const char* obj_reference,
- const FieldDescriptor* field,
- bool use_default) const;
-
- // Generate definition for one class.
- void GenerateClass(const GeneratorOptions& options, io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassConstructor(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassFieldInfo(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassConstructorAndDeclareExtensionFieldInfo(
- const GeneratorOptions& options, io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassXid(const GeneratorOptions& options, io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateOneofCaseDefinition(const GeneratorOptions& options,
- io::Printer* printer,
- const OneofDescriptor* oneof) const;
- void GenerateObjectTypedef(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassToObject(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassFieldToObject(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const;
- void GenerateClassFromObject(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassFieldFromObject(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const;
- void GenerateClassRegistration(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassFields(const GeneratorOptions& options,
- io::Printer* printer, const Descriptor* desc) const;
- void GenerateClassField(const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* desc) const;
- void GenerateClassExtensionFieldInfo(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassDeserialize(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassDeserializeBinary(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassDeserializeBinaryField(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const;
- void GenerateClassSerializeBinary(const GeneratorOptions& options,
- io::Printer* printer,
- const Descriptor* desc) const;
- void GenerateClassSerializeBinaryField(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const;
-
- // Generate definition for one enum.
- void GenerateEnum(const GeneratorOptions& options, io::Printer* printer,
- const EnumDescriptor* enumdesc) const;
-
- // Generate an extension definition.
- void GenerateExtension(const GeneratorOptions& options, io::Printer* printer,
- const FieldDescriptor* field) const;
-
- // Generate addFoo() method for repeated primitive fields.
- void GenerateRepeatedPrimitiveHelperMethods(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field,
- bool untyped) const;
-
- // Generate addFoo() method for repeated message fields.
- void GenerateRepeatedMessageHelperMethods(const GeneratorOptions& options,
- io::Printer* printer,
- const FieldDescriptor* field) const;
-
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator);
-};
-
-} // namespace js
-} // namespace compiler
-} // namespace protobuf
-} // namespace google
-
-#include <google/protobuf/port_undef.inc>
-
-#endif // GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.cc b/contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.cc
deleted file mode 100644
index 5cb73657e7..0000000000
--- a/contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.cc
+++ /dev/null
@@ -1,270 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <google/protobuf/compiler/js/well_known_types_embed.h>
-
-struct FileToc well_known_types_js[] = {
- {"any.js",
- "/* This code will be inserted into generated code for\n"
- " * google/protobuf/any.proto. */\n"
- "\n"
- "/**\n"
- " * Returns the type name contained in this instance, if any.\n"
- " * @return {string|undefined}\n"
- " */\n"
- "proto.google.protobuf.Any.prototype.getTypeName = function() {\n"
- " return this.getTypeUrl().split('/').pop();\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Packs the given message instance into this Any.\n"
- " * For binary format usage only.\n"
- " * @param {!Uint8Array} serialized The serialized data to pack.\n"
- " * @param {string} name The type name of this message object.\n"
- " * @param {string=} opt_typeUrlPrefix the type URL prefix.\n"
- " */\n"
- "proto.google.protobuf.Any.prototype.pack = function(serialized, name,\n"
- " opt_typeUrlPrefix) "
- "{\n"
- " if (!opt_typeUrlPrefix) {\n"
- " opt_typeUrlPrefix = 'type.googleapis.com/';\n"
- " }\n"
- "\n"
- " if (opt_typeUrlPrefix.substr(-1) != '/') {\n"
- " this.setTypeUrl(opt_typeUrlPrefix + '/' + name);\n"
- " } else {\n"
- " this.setTypeUrl(opt_typeUrlPrefix + name);\n"
- " }\n"
- "\n"
- " this.setValue(serialized);\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * @template T\n"
- " * Unpacks this Any into the given message object.\n"
- " * @param {function(Uint8Array):T} deserialize Function that will "
- "deserialize\n"
- " * the binary data properly.\n"
- " * @param {string} name The expected type name of this message object.\n"
- " * @return {?T} If the name matched the expected name, returns the "
- "deserialized\n"
- " * object, otherwise returns null.\n"
- " */\n"
- "proto.google.protobuf.Any.prototype.unpack = function(deserialize, name) "
- "{\n"
- " if (this.getTypeName() == name) {\n"
- " return deserialize(this.getValue_asU8());\n"
- " } else {\n"
- " return null;\n"
- " }\n"
- "};\n"
- },
- {"timestamp.js",
- "/* This code will be inserted into generated code for\n"
- " * google/protobuf/timestamp.proto. */\n"
- "\n"
- "/**\n"
- " * Returns a JavaScript 'Date' object corresponding to this Timestamp.\n"
- " * @return {!Date}\n"
- " */\n"
- "proto.google.protobuf.Timestamp.prototype.toDate = function() {\n"
- " var seconds = this.getSeconds();\n"
- " var nanos = this.getNanos();\n"
- "\n"
- " return new Date((seconds * 1000) + (nanos / 1000000));\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Sets the value of this Timestamp object to be the given Date.\n"
- " * @param {!Date} value The value to set.\n"
- " */\n"
- "proto.google.protobuf.Timestamp.prototype.fromDate = function(value) {\n"
- " this.setSeconds(Math.floor(value.getTime() / 1000));\n"
- " this.setNanos(value.getMilliseconds() * 1000000);\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Factory method that returns a Timestamp object with value equal to\n"
- " * the given Date.\n"
- " * @param {!Date} value The value to set.\n"
- " * @return {!proto.google.protobuf.Timestamp}\n"
- " */\n"
- "proto.google.protobuf.Timestamp.fromDate = function(value) {\n"
- " var timestamp = new proto.google.protobuf.Timestamp();\n"
- " timestamp.fromDate(value);\n"
- " return timestamp;\n"
- "};\n"},
- {"struct.js",
- "/* This code will be inserted into generated code for\n"
- " * google/protobuf/struct.proto. */\n"
- "\n"
- "/**\n"
- " * Typedef representing plain JavaScript values that can go into a\n"
- " * Struct.\n"
- " * @typedef {null|number|string|boolean|Array|Object}\n"
- " */\n"
- "proto.google.protobuf.JavaScriptValue;\n"
- "\n"
- "\n"
- "/**\n"
- " * Converts this Value object to a plain JavaScript value.\n"
- " * @return {?proto.google.protobuf.JavaScriptValue} a plain JavaScript\n"
- " * value representing this Struct.\n"
- " */\n"
- "proto.google.protobuf.Value.prototype.toJavaScript = function() {\n"
- " var kindCase = proto.google.protobuf.Value.KindCase;\n"
- " switch (this.getKindCase()) {\n"
- " case kindCase.NULL_VALUE:\n"
- " return null;\n"
- " case kindCase.NUMBER_VALUE:\n"
- " return this.getNumberValue();\n"
- " case kindCase.STRING_VALUE:\n"
- " return this.getStringValue();\n"
- " case kindCase.BOOL_VALUE:\n"
- " return this.getBoolValue();\n"
- " case kindCase.STRUCT_VALUE:\n"
- " return this.getStructValue().toJavaScript();\n"
- " case kindCase.LIST_VALUE:\n"
- " return this.getListValue().toJavaScript();\n"
- " default:\n"
- " throw new Error('Unexpected struct type');\n"
- " }\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Converts this JavaScript value to a new Value proto.\n"
- " * @param {!proto.google.protobuf.JavaScriptValue} value The value to\n"
- " * convert.\n"
- " * @return {!proto.google.protobuf.Value} The newly constructed value.\n"
- " */\n"
- "proto.google.protobuf.Value.fromJavaScript = function(value) {\n"
- " var ret = new proto.google.protobuf.Value();\n"
- " switch (goog.typeOf(value)) {\n"
- " case 'string':\n"
- " ret.setStringValue(/** @type {string} */ (value));\n"
- " break;\n"
- " case 'number':\n"
- " ret.setNumberValue(/** @type {number} */ (value));\n"
- " break;\n"
- " case 'boolean':\n"
- " ret.setBoolValue(/** @type {boolean} */ (value));\n"
- " break;\n"
- " case 'null':\n"
- " ret.setNullValue(proto.google.protobuf.NullValue.NULL_VALUE);\n"
- " break;\n"
- " case 'array':\n"
- " ret.setListValue(proto.google.protobuf.ListValue.fromJavaScript(\n"
- " /** @type{!Array} */ (value)));\n"
- " break;\n"
- " case 'object':\n"
- " ret.setStructValue(proto.google.protobuf.Struct.fromJavaScript(\n"
- " /** @type{!Object} */ (value)));\n"
- " break;\n"
- " default:\n"
- " throw new Error('Unexpected struct type.');\n"
- " }\n"
- "\n"
- " return ret;\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Converts this ListValue object to a plain JavaScript array.\n"
- " * @return {!Array} a plain JavaScript array representing this List.\n"
- " */\n"
- "proto.google.protobuf.ListValue.prototype.toJavaScript = function() {\n"
- " var ret = [];\n"
- " var values = this.getValuesList();\n"
- "\n"
- " for (var i = 0; i < values.length; i++) {\n"
- " ret[i] = values[i].toJavaScript();\n"
- " }\n"
- "\n"
- " return ret;\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Constructs a ListValue protobuf from this plain JavaScript array.\n"
- " * @param {!Array} array a plain JavaScript array\n"
- " * @return {proto.google.protobuf.ListValue} a new ListValue object\n"
- " */\n"
- "proto.google.protobuf.ListValue.fromJavaScript = function(array) {\n"
- " var ret = new proto.google.protobuf.ListValue();\n"
- "\n"
- " for (var i = 0; i < array.length; i++) {\n"
- " "
- "ret.addValues(proto.google.protobuf.Value.fromJavaScript(array[i]));\n"
- " }\n"
- "\n"
- " return ret;\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Converts this Struct object to a plain JavaScript object.\n"
- " * @return {!Object<string, !proto.google.protobuf.JavaScriptValue>} a "
- "plain\n"
- " * JavaScript object representing this Struct.\n"
- " */\n"
- "proto.google.protobuf.Struct.prototype.toJavaScript = function() {\n"
- " var ret = {};\n"
- "\n"
- " this.getFieldsMap().forEach(function(value, key) {\n"
- " ret[key] = value.toJavaScript();\n"
- " });\n"
- "\n"
- " return ret;\n"
- "};\n"
- "\n"
- "\n"
- "/**\n"
- " * Constructs a Struct protobuf from this plain JavaScript object.\n"
- " * @param {!Object} obj a plain JavaScript object\n"
- " * @return {proto.google.protobuf.Struct} a new Struct object\n"
- " */\n"
- "proto.google.protobuf.Struct.fromJavaScript = function(obj) {\n"
- " var ret = new proto.google.protobuf.Struct();\n"
- " var map = ret.getFieldsMap();\n"
- "\n"
- " for (var property in obj) {\n"
- " var val = obj[property];\n"
- " map.set(property, proto.google.protobuf.Value.fromJavaScript(val));\n"
- " }\n"
- "\n"
- " return ret;\n"
- "};\n"},
- {NULL, NULL} // Terminate the list.
-};
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.h b/contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.h
deleted file mode 100644
index 174c665e45..0000000000
--- a/contrib/libs/protoc/src/google/protobuf/compiler/js/well_known_types_embed.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__
-#define GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__
-
-#include <stddef.h>
-
-struct FileToc {
- const char* name;
- const char* data;
-};
-
-extern struct FileToc well_known_types_js[];
-
-#endif // GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/main.cc b/contrib/libs/protoc/src/google/protobuf/compiler/main.cc
index 08d77a639c..39609468ab 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/main.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/main.cc
@@ -28,16 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/cpp/cpp_generator.h>
-#include <google/protobuf/compiler/java/java_generator.h>
-#include <google/protobuf/compiler/java/java_kotlin_generator.h>
-#include <google/protobuf/compiler/js/js_generator.h>
+#include <google/protobuf/compiler/cpp/generator.h>
+#include <google/protobuf/compiler/java/generator.h>
+#include <google/protobuf/compiler/java/kotlin_generator.h>
#include <google/protobuf/compiler/command_line_interface.h>
-#include <google/protobuf/compiler/python/python_generator.h>
-#include <google/protobuf/compiler/python/python_pyi_generator.h>
#include <google/protobuf/compiler/csharp/csharp_generator.h>
#include <google/protobuf/compiler/objectivec/objectivec_generator.h>
#include <google/protobuf/compiler/php/php_generator.h>
+#include <google/protobuf/compiler/python/generator.h>
+#include <google/protobuf/compiler/python/pyi_generator.h>
#include <google/protobuf/compiler/ruby/ruby_generator.h>
// Must be included last.
@@ -102,11 +101,6 @@ int ProtobufMain(int argc, char* argv[]) {
cli.RegisterGenerator("--objc_out", "--objc_opt", &objc_generator,
"Generate Objective-C header and source.");
- // JavaScript
- js::Generator js_generator;
- cli.RegisterGenerator("--js_out", "--js_opt", &js_generator,
- "Generate JavaScript source.");
-
return cli.Run(argc, argv);
}
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
index 9f87d2c71e..bcecc7b373 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
@@ -34,7 +34,6 @@
#include <google/protobuf/compiler/objectivec/objectivec_enum_field.h>
#include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
#include <google/protobuf/io/printer.h>
-#include <google/protobuf/wire_format.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
index 8c27a3702f..fea75f7a84 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
@@ -56,7 +56,7 @@ class EnumFieldGenerator : public SingleFieldGenerator {
bool include_external_types) const override;
protected:
- EnumFieldGenerator(const FieldDescriptor* descriptor);
+ explicit EnumFieldGenerator(const FieldDescriptor* descriptor);
virtual ~EnumFieldGenerator();
};
@@ -67,7 +67,7 @@ class RepeatedEnumFieldGenerator : public RepeatedFieldGenerator {
virtual void FinishInitialization() override;
protected:
- RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor);
+ explicit RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor);
virtual ~RepeatedEnumFieldGenerator();
};
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
index cd0ad8a016..e73a664db1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.cc
@@ -37,7 +37,6 @@
#include <google/protobuf/compiler/objectivec/objectivec_message_field.h>
#include <google/protobuf/compiler/objectivec/objectivec_primitive_field.h>
#include <google/protobuf/io/printer.h>
-#include <google/protobuf/wire_format.h>
#include <google/protobuf/stubs/strutil.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.h
index bc1fb11b8a..3e968946fa 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_field.h
@@ -95,7 +95,7 @@ class FieldGenerator {
TProtoStringType raw_field_name() const { return variable("raw_field_name"); }
protected:
- FieldGenerator(const FieldDescriptor* descriptor);
+ explicit FieldGenerator(const FieldDescriptor* descriptor);
virtual void FinishInitialization(void);
bool WantsHasProperty(void) const;
@@ -119,7 +119,7 @@ class SingleFieldGenerator : public FieldGenerator {
virtual bool RuntimeUsesHasBit(void) const override;
protected:
- SingleFieldGenerator(const FieldDescriptor* descriptor);
+ explicit SingleFieldGenerator(const FieldDescriptor* descriptor);
};
// Subclass with common support for when the field ends up as an ObjC Object.
@@ -134,7 +134,7 @@ class ObjCObjFieldGenerator : public SingleFieldGenerator {
virtual void GeneratePropertyDeclaration(io::Printer* printer) const override;
protected:
- ObjCObjFieldGenerator(const FieldDescriptor* descriptor);
+ explicit ObjCObjFieldGenerator(const FieldDescriptor* descriptor);
};
class RepeatedFieldGenerator : public ObjCObjFieldGenerator {
@@ -152,14 +152,14 @@ class RepeatedFieldGenerator : public ObjCObjFieldGenerator {
virtual bool RuntimeUsesHasBit(void) const override;
protected:
- RepeatedFieldGenerator(const FieldDescriptor* descriptor);
+ explicit RepeatedFieldGenerator(const FieldDescriptor* descriptor);
virtual void FinishInitialization(void) override;
};
// Convenience class which constructs FieldGenerators for a Descriptor.
class FieldGeneratorMap {
public:
- FieldGeneratorMap(const Descriptor* descriptor);
+ explicit FieldGeneratorMap(const Descriptor* descriptor);
~FieldGeneratorMap();
FieldGeneratorMap(const FieldGeneratorMap&) = delete;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.cc
index 0f4828c3ac..e1bb09f996 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.cc
@@ -117,46 +117,77 @@ bool FileContainsExtensions(const FileDescriptor* file) {
return false;
}
-// Helper for CollectMinimalFileDepsContainingExtensionsWorker that marks all
-// deps as visited and prunes them from the needed files list.
-void PruneFileAndDepsMarkingAsVisited(
- const FileDescriptor* file,
- std::vector<const FileDescriptor*>* files,
- std::set<const FileDescriptor*>* files_visited) {
- std::vector<const FileDescriptor*>::iterator iter =
- std::find(files->begin(), files->end(), file);
- if (iter != files->end()) {
- files->erase(iter);
- }
- files_visited->insert(file);
+bool IsDirectDependency(const FileDescriptor* dep, const FileDescriptor* file) {
for (int i = 0; i < file->dependency_count(); i++) {
- PruneFileAndDepsMarkingAsVisited(file->dependency(i), files, files_visited);
+ if (dep == file->dependency(i)) {
+ return true;
+ }
}
+ return false;
}
-// Helper for CollectMinimalFileDepsContainingExtensions.
-void CollectMinimalFileDepsContainingExtensionsWorker(
- const FileDescriptor* file,
- std::vector<const FileDescriptor*>* files,
- std::set<const FileDescriptor*>* files_visited) {
- if (files_visited->find(file) != files_visited->end()) {
- return;
- }
- files_visited->insert(file);
-
- if (FileContainsExtensions(file)) {
- files->push_back(file);
- for (int i = 0; i < file->dependency_count(); i++) {
- const FileDescriptor* dep = file->dependency(i);
- PruneFileAndDepsMarkingAsVisited(dep, files, files_visited);
- }
- } else {
- for (int i = 0; i < file->dependency_count(); i++) {
- const FileDescriptor* dep = file->dependency(i);
- CollectMinimalFileDepsContainingExtensionsWorker(dep, files,
- files_visited);
+struct FileDescriptorsOrderedByName {
+ inline bool operator()(const FileDescriptor* a,
+ const FileDescriptor* b) const {
+ return a->name() < b->name();
+ }
+};
+
+} // namespace
+
+FileGenerator::CommonState::CommonState() { }
+
+const FileGenerator::CommonState::MinDepsEntry&
+FileGenerator::CommonState::CollectMinimalFileDepsContainingExtensionsInternal(
+ const FileDescriptor* file) {
+ auto it = deps_info_cache_.find(file);
+ if (it != deps_info_cache_.end()) {
+ return it->second;
+ }
+
+ std::set<const FileDescriptor*> min_deps_collector;
+ std::set<const FileDescriptor*> covered_deps_collector;
+ std::set<const FileDescriptor*> to_prune;
+ for (int i = 0; i < file->dependency_count(); i++) {
+ const FileDescriptor* dep = file->dependency(i);
+ MinDepsEntry dep_info =
+ CollectMinimalFileDepsContainingExtensionsInternal(dep);
+
+ // Everything the dep covered, this file will also cover.
+ covered_deps_collector.insert(dep_info.covered_deps.begin(), dep_info.covered_deps.end());
+ // Prune everything from the dep's covered list in case another dep lists it
+ // as a min dep.
+ to_prune.insert(dep_info.covered_deps.begin(), dep_info.covered_deps.end());
+
+ // Does the dep have any extensions...
+ if (dep_info.has_extensions) {
+ // Yes -> Add this file, prune its min_deps and add them to the covered deps.
+ min_deps_collector.insert(dep);
+ to_prune.insert(dep_info.min_deps.begin(), dep_info.min_deps.end());
+ covered_deps_collector.insert(dep_info.min_deps.begin(), dep_info.min_deps.end());
+ } else {
+ // No -> Just use its min_deps.
+ min_deps_collector.insert(dep_info.min_deps.begin(), dep_info.min_deps.end());
}
}
+
+ const bool file_has_exts = FileContainsExtensions(file);
+
+ // Fast path: if nothing to prune or there was only one dep, the prune work is
+ // a waste, skip it.
+ if (to_prune.empty() || file->dependency_count() == 1) {
+ return deps_info_cache_.insert(
+ {file, {file_has_exts, min_deps_collector, covered_deps_collector}}).first->second;
+ }
+
+ std::set<const FileDescriptor*> min_deps;
+ std::copy_if(min_deps_collector.begin(), min_deps_collector.end(),
+ std::inserter(min_deps, min_deps.end()),
+ [&](const FileDescriptor* value){
+ return to_prune.find(value) == to_prune.end();
+ });
+ return deps_info_cache_.insert(
+ {file, {file_has_exts, min_deps, covered_deps_collector}}).first->second;
}
// Collect the deps of the given file that contain extensions. This can be used to
@@ -168,32 +199,23 @@ void CollectMinimalFileDepsContainingExtensionsWorker(
// There are comments about what the expected code should be line and limited
// testing objectivec/Tests/GPBUnittestProtos2.m around compilation (#imports
// specifically).
-void CollectMinimalFileDepsContainingExtensions(
- const FileDescriptor* file,
- std::vector<const FileDescriptor*>* files) {
- std::set<const FileDescriptor*> files_visited;
- for (int i = 0; i < file->dependency_count(); i++) {
- const FileDescriptor* dep = file->dependency(i);
- CollectMinimalFileDepsContainingExtensionsWorker(dep, files,
- &files_visited);
- }
+const std::vector<const FileDescriptor*>
+FileGenerator::CommonState::CollectMinimalFileDepsContainingExtensions(
+ const FileDescriptor* file) {
+ std::set<const FileDescriptor*> min_deps =
+ CollectMinimalFileDepsContainingExtensionsInternal(file).min_deps;
+ // Sort the list since pointer order isn't stable across runs.
+ std::vector<const FileDescriptor*> result(min_deps.begin(), min_deps.end());
+ std::sort(result.begin(), result.end(), FileDescriptorsOrderedByName());
+ return result;
}
-bool IsDirectDependency(const FileDescriptor* dep, const FileDescriptor* file) {
- for (int i = 0; i < file->dependency_count(); i++) {
- if (dep == file->dependency(i)) {
- return true;
- }
- }
- return false;
-}
-
-} // namespace
-
FileGenerator::FileGenerator(const FileDescriptor* file,
- const GenerationOptions& generation_options)
+ const GenerationOptions& generation_options,
+ CommonState& common_state)
: file_(file),
generation_options_(generation_options),
+ common_state_(common_state),
root_class_name_(FileClassName(file)),
is_bundled_proto_(IsProtobufLibraryBundledProtoFile(file)) {
for (int i = 0; i < file_->enum_type_count(); i++) {
@@ -374,8 +396,8 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"\n");
}
- std::vector<const FileDescriptor*> deps_with_extensions;
- CollectMinimalFileDepsContainingExtensions(file_, &deps_with_extensions);
+ std::vector<const FileDescriptor*> deps_with_extensions =
+ common_state_.CollectMinimalFileDepsContainingExtensions(file_);
// The bundled protos (WKTs) don't use of forward declarations.
bool headers_use_forward_declarations =
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.h
index 6d2c970f81..de37930eb3 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_file.h
@@ -31,8 +31,9 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_FILE_H__
#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_FILE_H__
-#include <string>
+#include <map>
#include <set>
+#include <string>
#include <vector>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/io/printer.h>
@@ -59,8 +60,29 @@ class FileGenerator {
bool headers_use_forward_declarations;
};
+ // Wrapper for some common state that is shared between file generations to
+ // improve performance when more than one file is generated at a time.
+ struct CommonState {
+ CommonState();
+
+ const std::vector<const FileDescriptor*>
+ CollectMinimalFileDepsContainingExtensions(const FileDescriptor* file);
+
+ private:
+ struct MinDepsEntry {
+ bool has_extensions;
+ std::set<const FileDescriptor*> min_deps;
+ // `covered_deps` are the transtive deps of `min_deps_w_exts` that also
+ // have extensions.
+ std::set<const FileDescriptor*> covered_deps;
+ };
+ const MinDepsEntry& CollectMinimalFileDepsContainingExtensionsInternal(const FileDescriptor* file);
+ std::map<const FileDescriptor*, MinDepsEntry> deps_info_cache_;
+ };
+
FileGenerator(const FileDescriptor* file,
- const GenerationOptions& generation_options);
+ const GenerationOptions& generation_options,
+ CommonState& common_state);
~FileGenerator();
FileGenerator(const FileGenerator&) = delete;
@@ -72,6 +94,7 @@ class FileGenerator {
private:
const FileDescriptor* file_;
const GenerationOptions& generation_options_;
+ CommonState& common_state_;
TProtoStringType root_class_name_;
bool is_bundled_proto_;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
index 552d7e7273..586cdb025b 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
@@ -269,9 +269,10 @@ bool ObjectiveCGenerator::GenerateAll(
return false;
}
+ FileGenerator::CommonState state;
for (int i = 0; i < files.size(); i++) {
const FileDescriptor* file = files[i];
- FileGenerator file_generator(file, generation_options);
+ FileGenerator file_generator(file, generation_options, state);
TProtoStringType filepath = FilePath(file);
// Generate header.
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_map_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
index 2ec2e43435..a75aa961d8 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
@@ -50,7 +50,7 @@ class MapFieldGenerator : public RepeatedFieldGenerator {
MapFieldGenerator& operator=(const MapFieldGenerator&) = delete;
protected:
- MapFieldGenerator(const FieldDescriptor* descriptor);
+ explicit MapFieldGenerator(const FieldDescriptor* descriptor);
virtual ~MapFieldGenerator();
virtual void DetermineObjectiveCClassDefinitions(
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message.cc
index ab5b29628f..bf73592e56 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message.cc
@@ -41,8 +41,6 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
-#include <google/protobuf/wire_format.h>
-#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
index 828b75c868..8ae073a12a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
@@ -34,7 +34,6 @@
#include <google/protobuf/compiler/objectivec/objectivec_message_field.h>
#include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
#include <google/protobuf/io/printer.h>
-#include <google/protobuf/wire_format.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
index 44b5aabcfd..50ddb633cc 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
@@ -44,7 +44,7 @@ class MessageFieldGenerator : public ObjCObjFieldGenerator {
friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
protected:
- MessageFieldGenerator(const FieldDescriptor* descriptor);
+ explicit MessageFieldGenerator(const FieldDescriptor* descriptor);
MessageFieldGenerator(const MessageFieldGenerator&) = delete;
MessageFieldGenerator& operator=(const MessageFieldGenerator&) = delete;
@@ -63,7 +63,7 @@ class RepeatedMessageFieldGenerator : public RepeatedFieldGenerator {
friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
protected:
- RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor);
+ explicit RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor);
virtual ~RepeatedMessageFieldGenerator();
RepeatedMessageFieldGenerator(const RepeatedMessageFieldGenerator&) = delete;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
index c8233b1441..f83e2691ae 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
@@ -35,8 +35,6 @@
#include <google/protobuf/compiler/objectivec/objectivec_primitive_field.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/stubs/strutil.h>
-#include <google/protobuf/wire_format.h>
-#include <google/protobuf/wire_format_lite.h>
namespace google {
namespace protobuf {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
index 291d11a2e3..06a1528a82 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
@@ -31,8 +31,6 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_PRIMITIVE_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_PRIMITIVE_FIELD_H__
-#include <map>
-#include <string>
#include <google/protobuf/compiler/objectivec/objectivec_field.h>
namespace google {
@@ -44,7 +42,7 @@ class PrimitiveFieldGenerator : public SingleFieldGenerator {
friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
protected:
- PrimitiveFieldGenerator(const FieldDescriptor* descriptor);
+ explicit PrimitiveFieldGenerator(const FieldDescriptor* descriptor);
virtual ~PrimitiveFieldGenerator();
PrimitiveFieldGenerator(const PrimitiveFieldGenerator&) = delete;
@@ -60,7 +58,7 @@ class PrimitiveObjFieldGenerator : public ObjCObjFieldGenerator {
friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
protected:
- PrimitiveObjFieldGenerator(const FieldDescriptor* descriptor);
+ explicit PrimitiveObjFieldGenerator(const FieldDescriptor* descriptor);
virtual ~PrimitiveObjFieldGenerator();
PrimitiveObjFieldGenerator(const PrimitiveObjFieldGenerator&) = delete;
@@ -72,7 +70,7 @@ class RepeatedPrimitiveFieldGenerator : public RepeatedFieldGenerator {
friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
protected:
- RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor);
+ explicit RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor);
virtual ~RepeatedPrimitiveFieldGenerator();
RepeatedPrimitiveFieldGenerator(const RepeatedPrimitiveFieldGenerator&) =
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/parser.cc b/contrib/libs/protoc/src/google/protobuf/compiler/parser.cc
index 332556e9c4..2900d324d2 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/parser.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/parser.cc
@@ -64,32 +64,33 @@ namespace {
typedef std::unordered_map<TProtoStringType, FieldDescriptorProto::Type> TypeNameMap;
-TypeNameMap MakeTypeNameTable() {
- TypeNameMap result;
-
- result["double"] = FieldDescriptorProto::TYPE_DOUBLE;
- result["float"] = FieldDescriptorProto::TYPE_FLOAT;
- result["uint64"] = FieldDescriptorProto::TYPE_UINT64;
- result["fixed64"] = FieldDescriptorProto::TYPE_FIXED64;
- result["fixed32"] = FieldDescriptorProto::TYPE_FIXED32;
- result["bool"] = FieldDescriptorProto::TYPE_BOOL;
- result["string"] = FieldDescriptorProto::TYPE_STRING;
- result["group"] = FieldDescriptorProto::TYPE_GROUP;
-
- result["bytes"] = FieldDescriptorProto::TYPE_BYTES;
- result["uint32"] = FieldDescriptorProto::TYPE_UINT32;
- result["sfixed32"] = FieldDescriptorProto::TYPE_SFIXED32;
- result["sfixed64"] = FieldDescriptorProto::TYPE_SFIXED64;
- result["int32"] = FieldDescriptorProto::TYPE_INT32;
- result["int64"] = FieldDescriptorProto::TYPE_INT64;
- result["sint32"] = FieldDescriptorProto::TYPE_SINT32;
- result["sint64"] = FieldDescriptorProto::TYPE_SINT64;
-
- return result;
+const TypeNameMap& GetTypeNameTable() {
+ static auto* table = new auto([]() {
+ TypeNameMap result;
+
+ result["double"] = FieldDescriptorProto::TYPE_DOUBLE;
+ result["float"] = FieldDescriptorProto::TYPE_FLOAT;
+ result["uint64"] = FieldDescriptorProto::TYPE_UINT64;
+ result["fixed64"] = FieldDescriptorProto::TYPE_FIXED64;
+ result["fixed32"] = FieldDescriptorProto::TYPE_FIXED32;
+ result["bool"] = FieldDescriptorProto::TYPE_BOOL;
+ result["string"] = FieldDescriptorProto::TYPE_STRING;
+ result["group"] = FieldDescriptorProto::TYPE_GROUP;
+
+ result["bytes"] = FieldDescriptorProto::TYPE_BYTES;
+ result["uint32"] = FieldDescriptorProto::TYPE_UINT32;
+ result["sfixed32"] = FieldDescriptorProto::TYPE_SFIXED32;
+ result["sfixed64"] = FieldDescriptorProto::TYPE_SFIXED64;
+ result["int32"] = FieldDescriptorProto::TYPE_INT32;
+ result["int64"] = FieldDescriptorProto::TYPE_INT64;
+ result["sint32"] = FieldDescriptorProto::TYPE_SINT32;
+ result["sint64"] = FieldDescriptorProto::TYPE_SINT64;
+
+ return result;
+ }());
+ return *table;
}
-const TypeNameMap kTypeNames = MakeTypeNameTable();
-
// Camel-case the field name and append "Entry" for generated map entry name.
// e.g. map<KeyType, ValueType> foo_map => FooMapEntry
TProtoStringType MapEntryName(const TProtoStringType& field_name) {
@@ -972,37 +973,14 @@ bool Parser::ParseMessageFieldNoLabel(
if (TryConsume("map")) {
if (LookingAt("<")) {
map_field.is_map_field = true;
+ DO(ParseMapType(&map_field, field, location));
} else {
// False positive
type_parsed = true;
type_name = "map";
}
}
- if (map_field.is_map_field) {
- if (field->has_oneof_index()) {
- AddError("Map fields are not allowed in oneofs.");
- return false;
- }
- if (field->has_label()) {
- AddError(
- "Field labels (required/optional/repeated) are not allowed on "
- "map fields.");
- return false;
- }
- if (field->has_extendee()) {
- AddError("Map fields are not allowed to be extensions.");
- return false;
- }
- field->set_label(FieldDescriptorProto::LABEL_REPEATED);
- DO(Consume("<"));
- DO(ParseType(&map_field.key_type, &map_field.key_type_name));
- DO(Consume(","));
- DO(ParseType(&map_field.value_type, &map_field.value_type_name));
- DO(Consume(">"));
- // Defer setting of the type name of the map field until the
- // field name is parsed. Add the source location though.
- location.AddPath(FieldDescriptorProto::kTypeNameFieldNumber);
- } else {
+ if (!map_field.is_map_field) {
// Handle the case where no explicit label is given for a non-map field.
if (!field->has_label() && DefaultToOptionalFields()) {
field->set_label(FieldDescriptorProto::LABEL_OPTIONAL);
@@ -1014,8 +992,8 @@ bool Parser::ParseMessageFieldNoLabel(
field->set_label(FieldDescriptorProto::LABEL_OPTIONAL);
}
- // Handle the case where the actual type is a message or enum named "map",
- // which we already consumed in the code above.
+ // Handle the case where the actual type is a message or enum named
+ // "map", which we already consumed in the code above.
if (!type_parsed) {
DO(ParseType(&type, &type_name));
}
@@ -1123,6 +1101,34 @@ bool Parser::ParseMessageFieldNoLabel(
return true;
}
+bool Parser::ParseMapType(MapField* map_field, FieldDescriptorProto* field,
+ LocationRecorder& type_name_location) {
+ if (field->has_oneof_index()) {
+ AddError("Map fields are not allowed in oneofs.");
+ return false;
+ }
+ if (field->has_label()) {
+ AddError(
+ "Field labels (required/optional/repeated) are not allowed on "
+ "map fields.");
+ return false;
+ }
+ if (field->has_extendee()) {
+ AddError("Map fields are not allowed to be extensions.");
+ return false;
+ }
+ field->set_label(FieldDescriptorProto::LABEL_REPEATED);
+ DO(Consume("<"));
+ DO(ParseType(&map_field->key_type, &map_field->key_type_name));
+ DO(Consume(","));
+ DO(ParseType(&map_field->value_type, &map_field->value_type_name));
+ DO(Consume(">"));
+ // Defer setting of the type name of the map field until the
+ // field name is parsed. Add the source location though.
+ type_name_location.AddPath(FieldDescriptorProto::kTypeNameFieldNumber);
+ return true;
+}
+
void Parser::GenerateMapEntry(const MapField& map_field,
FieldDescriptorProto* field,
RepeatedPtrField<DescriptorProto>* messages) {
@@ -2261,8 +2267,9 @@ bool Parser::ParseLabel(FieldDescriptorProto::Label* label,
bool Parser::ParseType(FieldDescriptorProto::Type* type,
TProtoStringType* type_name) {
- TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text);
- if (iter != kTypeNames.end()) {
+ const auto& type_names_table = GetTypeNameTable();
+ auto iter = type_names_table.find(input_->current().text);
+ if (iter != type_names_table.end()) {
*type = iter->second;
input_->Next();
} else {
@@ -2274,8 +2281,9 @@ bool Parser::ParseType(FieldDescriptorProto::Type* type,
bool Parser::ParseUserDefinedType(TProtoStringType* type_name) {
type_name->clear();
- TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text);
- if (iter != kTypeNames.end()) {
+ const auto& type_names_table = GetTypeNameTable();
+ auto iter = type_names_table.find(input_->current().text);
+ if (iter != type_names_table.end()) {
// Note: The only place enum types are allowed is for field types, but
// if we are parsing a field type then we would not get here because
// primitives are allowed there as well. So this error message doesn't
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/parser.h b/contrib/libs/protoc/src/google/protobuf/compiler/parser.h
index f60a97c44c..c92b5f28f4 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/parser.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/parser.h
@@ -122,6 +122,7 @@ class PROTOBUF_EXPORT Parser {
private:
class LocationRecorder;
+ struct MapField;
// =================================================================
// Error recovery helpers
@@ -378,6 +379,9 @@ class PROTOBUF_EXPORT Parser {
const LocationRecorder& field_location,
const FileDescriptorProto* containing_file);
+ bool ParseMapType(MapField* map_field, FieldDescriptorProto* field,
+ LocationRecorder& type_name_location);
+
// Parse an "extensions" declaration.
bool ParseExtensions(DescriptorProto* message,
const LocationRecorder& extensions_location,
@@ -480,7 +484,7 @@ class PROTOBUF_EXPORT Parser {
// Parses a single part of a multipart option name. A multipart name consists
// of names separated by dots. Each name is either an identifier or a series
// of identifiers separated by dots and enclosed in parentheses. E.g.,
- // "foo.(bar.baz).qux".
+ // "foo.(bar.baz).moo".
bool ParseOptionNamePart(UninterpretedOption* uninterpreted_option,
const LocationRecorder& part_location,
const FileDescriptorProto* containing_file);
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/php/php_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/php/php_generator.cc
index b06200a986..ecaccec339 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/php/php_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/php/php_generator.cc
@@ -50,29 +50,29 @@ const TProtoStringType kDescriptorMetadataFile =
const TProtoStringType kDescriptorDirName = "Google/Protobuf/Internal";
const TProtoStringType kDescriptorPackageName = "Google\\Protobuf\\Internal";
const char* const kReservedNames[] = {
- "abstract", "and", "array", "as", "break",
- "callable", "case", "catch", "class", "clone",
- "const", "continue", "declare", "default", "die",
- "do", "echo", "else", "elseif", "empty",
- "enddeclare", "endfor", "endforeach", "endif", "endswitch",
- "endwhile", "eval", "exit", "extends", "final",
- "finally", "fn", "for", "foreach", "function",
- "global", "goto", "if", "implements", "include",
- "include_once", "instanceof", "insteadof", "interface", "isset",
- "list", "match", "namespace", "new", "or",
- "parent", "print", "private", "protected", "public",
- "require", "require_once", "return", "self", "static",
- "switch", "throw", "trait", "try", "unset",
- "use", "var", "while", "xor", "yield",
- "int", "float", "bool", "string", "true",
- "false", "null", "void", "iterable"};
+ "abstract", "and", "array", "as", "break",
+ "callable", "case", "catch", "class", "clone",
+ "const", "continue", "declare", "default", "die",
+ "do", "echo", "else", "elseif", "empty",
+ "enddeclare", "endfor", "endforeach", "endif", "endswitch",
+ "endwhile", "eval", "exit", "extends", "final",
+ "finally", "fn", "for", "foreach", "function",
+ "global", "goto", "if", "implements", "include",
+ "include_once", "instanceof", "insteadof", "interface", "isset",
+ "list", "match", "namespace", "new", "or",
+ "parent", "print", "private", "protected", "public",
+ "readonly", "require", "require_once", "return", "self",
+ "static", "switch", "throw", "trait", "try",
+ "unset", "use", "var", "while", "xor",
+ "yield", "int", "float", "bool", "string",
+ "true", "false", "null", "void", "iterable"};
const char* const kValidConstantNames[] = {
"int", "float", "bool", "string", "true",
"false", "null", "void", "iterable", "parent",
- "self"
+ "self", "readonly"
};
-const int kReservedNamesSize = 79;
-const int kValidConstantNamesSize = 11;
+const int kReservedNamesSize = 80;
+const int kValidConstantNamesSize = 12;
const int kFieldSetter = 1;
const int kFieldGetter = 2;
const int kFieldProperty = 3;
@@ -422,6 +422,16 @@ TProtoStringType LegacyGeneratedClassFileName(const DescriptorType* desc,
return result + ".php";
}
+template <typename DescriptorType>
+TProtoStringType LegacyReadOnlyGeneratedClassFileName(const DescriptorType* desc,
+ const Options& options) {
+ TProtoStringType php_namespace = RootPhpNamespace(desc, options);
+ if (!php_namespace.empty()) {
+ return php_namespace + "/" + desc->name() + ".php";
+ }
+ return desc->name() + ".php";
+}
+
TProtoStringType GeneratedServiceFileName(const ServiceDescriptor* service,
const Options& options) {
TProtoStringType result = FullClassName(service, options) + "Interface";
@@ -492,9 +502,9 @@ TProtoStringType PhpSetterTypeName(const FieldDescriptor* field,
// accommodate for edge case with multiple types.
size_t start_pos = type.find("|");
if (start_pos != TProtoStringType::npos) {
- type.replace(start_pos, 1, "[]|");
+ type.replace(start_pos, 1, ">|array<");
}
- type += "[]|\\Google\\Protobuf\\Internal\\RepeatedField";
+ type = "array<" + type + ">|\\Google\\Protobuf\\Internal\\RepeatedField";
}
return type;
}
@@ -1304,6 +1314,33 @@ void LegacyGenerateClassFile(const FileDescriptor* file,
"fullname", newname);
}
+template <typename DescriptorType>
+void LegacyReadOnlyGenerateClassFile(const FileDescriptor* file,
+ const DescriptorType* desc, const Options& options,
+ GeneratorContext* generator_context) {
+ TProtoStringType filename = LegacyReadOnlyGeneratedClassFileName(desc, options);
+ std::unique_ptr<io::ZeroCopyOutputStream> output(
+ generator_context->Open(filename));
+ io::Printer printer(output.get(), '^');
+
+ GenerateHead(file, &printer);
+
+ TProtoStringType php_namespace = RootPhpNamespace(desc, options);
+ if (!php_namespace.empty()) {
+ printer.Print(
+ "namespace ^name^;\n\n",
+ "name", php_namespace);
+ }
+ TProtoStringType newname = FullClassName(desc, options);
+ printer.Print("class_exists(^new^::class); // autoload the new class, which "
+ "will also create an alias to the deprecated class\n",
+ "new", GeneratedClassNameImpl(desc));
+ printer.Print("@trigger_error(__NAMESPACE__ . '\\^old^ is deprecated and will be removed in "
+ "the next major release. Use ^fullname^ instead', E_USER_DEPRECATED);\n\n",
+ "old", desc->name(),
+ "fullname", newname);
+}
+
void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en,
const Options& options,
GeneratorContext* generator_context) {
@@ -1339,11 +1376,18 @@ void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en,
"name", fullname);
Indent(&printer);
+ bool hasReserved = false;
for (int i = 0; i < en->value_count(); i++) {
const EnumValueDescriptor* value = en->value(i);
GenerateEnumValueDocComment(&printer, value);
+
+ TProtoStringType prefix = ConstantNamePrefix(value->name());
+ if (!prefix.empty()) {
+ hasReserved = true;
+ }
+
printer.Print("const ^name^ = ^number^;\n",
- "name", ConstantNamePrefix(value->name()) + value->name(),
+ "name", prefix + value->name(),
"number", IntToString(value->number()));
}
@@ -1351,8 +1395,9 @@ void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en,
Indent(&printer);
for (int i = 0; i < en->value_count(); i++) {
const EnumValueDescriptor* value = en->value(i);
- printer.Print("self::^name^ => '^name^',\n",
- "name", ConstantNamePrefix(value->name()) + value->name());
+ printer.Print("self::^constant^ => '^name^',\n",
+ "constant", ConstantNamePrefix(value->name()) + value->name(),
+ "name", value->name());
}
Outdent(&printer);
printer.Print("];\n");
@@ -1382,12 +1427,22 @@ void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en,
printer.Print("$const = __CLASS__ . '::' . strtoupper($name);\n"
"if (!defined($const)) {\n");
Indent(&printer);
+ if (hasReserved) {
+ printer.Print("$pbconst = __CLASS__. '::PB' . strtoupper($name);\n"
+ "if (!defined($pbconst)) {\n");
+ Indent(&printer);
+ }
printer.Print("throw new UnexpectedValueException(sprintf(\n");
Indent(&printer);
Indent(&printer);
printer.Print("'Enum %s has no value defined for name %s', __CLASS__, $name));\n");
Outdent(&printer);
Outdent(&printer);
+ if (hasReserved) {
+ Outdent(&printer);
+ printer.Print("}\n"
+ "return constant($pbconst);\n");
+ }
Outdent(&printer);
printer.Print("}\n"
"return constant($const);\n");
@@ -1407,6 +1462,19 @@ void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en,
"old", LegacyFullClassName(en, options));
LegacyGenerateClassFile(file, en, options, generator_context);
}
+
+ // Write legacy file for backwards compatibility with "readonly" keywword
+ TProtoStringType lower = en->name();
+ lower.to_lower();
+ if (lower == "readonly") {
+ printer.Print(
+ "// Adding a class alias for backwards compatibility with the \"readonly\" keyword.\n");
+ printer.Print(
+ "class_alias(^new^::class, __NAMESPACE__ . '\\^old^');\n\n",
+ "new", fullname,
+ "old", en->name());
+ LegacyReadOnlyGenerateClassFile(file, en, options, generator_context);
+ }
}
void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message,
@@ -1523,6 +1591,19 @@ void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message,
LegacyGenerateClassFile(file, message, options, generator_context);
}
+ // Write legacy file for backwards compatibility with "readonly" keywword
+ TProtoStringType lower = message->name();
+ lower.to_lower();
+ if (lower == "readonly") {
+ printer.Print(
+ "// Adding a class alias for backwards compatibility with the \"readonly\" keyword.\n");
+ printer.Print(
+ "class_alias(^new^::class, __NAMESPACE__ . '\\^old^');\n\n",
+ "new", fullname,
+ "old", message->name());
+ LegacyReadOnlyGenerateClassFile(file, message, options, generator_context);
+ }
+
// Nested messages and enums.
for (int i = 0; i < message->nested_type_count(); i++) {
GenerateMessageFile(file, message->nested_type(i), options,
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/plugin.cc b/contrib/libs/protoc/src/google/protobuf/compiler/plugin.cc
index 2d7fc6fcb5..68e23498c1 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/plugin.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/plugin.cc
@@ -45,9 +45,10 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/compiler/plugin.pb.h>
#include <google/protobuf/compiler/code_generator.h>
-#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/descriptor.h>
+#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/io_win32.h>
+#include <google/protobuf/io/zero_copy_stream_impl.h>
namespace google {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.cc b/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.cc
index 34126b9d9a..55fa2a6981 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.cc
@@ -23,11 +23,13 @@ namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
namespace compiler {
PROTOBUF_CONSTEXPR Version::Version(
- ::_pbi::ConstantInitialized)
- : suffix_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , major_(0)
- , minor_(0)
- , patch_(0){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.suffix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.major_)*/0
+ , /*decltype(_impl_.minor_)*/0
+ , /*decltype(_impl_.patch_)*/0} {}
struct VersionDefaultTypeInternal {
PROTOBUF_CONSTEXPR VersionDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -38,11 +40,13 @@ struct VersionDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VersionDefaultTypeInternal _Version_default_instance_;
PROTOBUF_CONSTEXPR CodeGeneratorRequest::CodeGeneratorRequest(
- ::_pbi::ConstantInitialized)
- : file_to_generate_()
- , proto_file_()
- , parameter_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , compiler_version_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.file_to_generate_)*/{}
+ , /*decltype(_impl_.proto_file_)*/{}
+ , /*decltype(_impl_.parameter_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.compiler_version_)*/nullptr} {}
struct CodeGeneratorRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR CodeGeneratorRequestDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -53,11 +57,13 @@ struct CodeGeneratorRequestDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
PROTOBUF_CONSTEXPR CodeGeneratorResponse_File::CodeGeneratorResponse_File(
- ::_pbi::ConstantInitialized)
- : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , insertion_point_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , content_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , generated_code_info_(nullptr){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.insertion_point_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.content_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.generated_code_info_)*/nullptr} {}
struct CodeGeneratorResponse_FileDefaultTypeInternal {
PROTOBUF_CONSTEXPR CodeGeneratorResponse_FileDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -68,10 +74,12 @@ struct CodeGeneratorResponse_FileDefaultTypeInternal {
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_;
PROTOBUF_CONSTEXPR CodeGeneratorResponse::CodeGeneratorResponse(
- ::_pbi::ConstantInitialized)
- : file_()
- , error_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
- , supported_features_(arc_ui64{0u}){}
+ ::_pbi::ConstantInitialized): _impl_{
+ /*decltype(_impl_._has_bits_)*/{}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , /*decltype(_impl_.file_)*/{}
+ , /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
+ , /*decltype(_impl_.supported_features_)*/arc_ui64{0u}} {}
struct CodeGeneratorResponseDefaultTypeInternal {
PROTOBUF_CONSTEXPR CodeGeneratorResponseDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
@@ -88,57 +96,57 @@ static const ::_pb::EnumDescriptor* file_level_enum_descriptors_google_2fprotobu
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr;
const arc_ui32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, major_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, minor_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, patch_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, suffix_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _impl_.major_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _impl_.minor_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _impl_.patch_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _impl_.suffix_),
1,
2,
3,
0,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, file_to_generate_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, parameter_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, proto_file_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, compiler_version_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _impl_.file_to_generate_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _impl_.parameter_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _impl_.proto_file_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _impl_.compiler_version_),
~0u,
0,
~0u,
1,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, name_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, insertion_point_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, content_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, generated_code_info_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _impl_.name_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _impl_.insertion_point_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _impl_.content_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _impl_.generated_code_info_),
0,
1,
2,
3,
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _has_bits_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, error_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, supported_features_),
- PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, file_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _impl_.error_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _impl_.supported_features_),
+ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _impl_.file_),
0,
1,
~0u,
@@ -225,7 +233,7 @@ constexpr int CodeGeneratorResponse::Feature_ARRAYSIZE;
class Version::_Internal {
public:
- using HasBits = decltype(std::declval<Version>()._has_bits_);
+ using HasBits = decltype(std::declval<Version>()._impl_._has_bits_);
static void set_has_major(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
@@ -243,36 +251,51 @@ class Version::_Internal {
Version::Version(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.Version)
}
Version::Version(const Version& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ Version* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.suffix_){}
+ , decltype(_impl_.major_){}
+ , decltype(_impl_.minor_){}
+ , decltype(_impl_.patch_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- suffix_.InitDefault();
+ _impl_.suffix_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- suffix_.Set("", GetArenaForAllocation());
+ _impl_.suffix_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_suffix()) {
- suffix_.Set(from._internal_suffix(),
- GetArenaForAllocation());
+ _this->_impl_.suffix_.Set(from._internal_suffix(),
+ _this->GetArenaForAllocation());
}
- ::memcpy(&major_, &from.major_,
- static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
- reinterpret_cast<char*>(&major_)) + sizeof(patch_));
+ ::memcpy(&_impl_.major_, &from._impl_.major_,
+ static_cast<size_t>(reinterpret_cast<char*>(&_impl_.patch_) -
+ reinterpret_cast<char*>(&_impl_.major_)) + sizeof(_impl_.patch_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
}
-inline void Version::SharedCtor() {
-suffix_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- suffix_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&major_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
- reinterpret_cast<char*>(&major_)) + sizeof(patch_));
+inline void Version::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.suffix_){}
+ , decltype(_impl_.major_){0}
+ , decltype(_impl_.minor_){0}
+ , decltype(_impl_.patch_){0}
+ };
+ _impl_.suffix_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.suffix_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Version::~Version() {
@@ -286,11 +309,11 @@ Version::~Version() {
inline void Version::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- suffix_.Destroy();
+ _impl_.suffix_.Destroy();
}
void Version::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void Version::Clear() {
@@ -299,16 +322,16 @@ void Version::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- suffix_.ClearNonDefaultToEmpty();
+ _impl_.suffix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x0000000eu) {
- ::memset(&major_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&patch_) -
- reinterpret_cast<char*>(&major_)) + sizeof(patch_));
+ ::memset(&_impl_.major_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&_impl_.patch_) -
+ reinterpret_cast<char*>(&_impl_.major_)) + sizeof(_impl_.patch_));
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -323,7 +346,7 @@ const char* Version::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_major(&has_bits);
- major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -332,7 +355,7 @@ const char* Version::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_minor(&has_bits);
- minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -341,7 +364,7 @@ const char* Version::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_patch(&has_bits);
- patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
+ _impl_.patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -374,7 +397,7 @@ const char* Version::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -388,7 +411,7 @@ uint8_t* Version::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional int32 major = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
@@ -433,7 +456,7 @@ size_t Version::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional string suffix = 4;
if (cached_has_bits & 0x00000001u) {
@@ -458,45 +481,41 @@ size_t Version::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Version::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Version::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Version::GetClassData() const { return &_class_data_; }
-void Version::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<Version *>(to)->MergeFrom(
- static_cast<const Version &>(from));
-}
-
-void Version::MergeFrom(const Version& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
- GOOGLE_DCHECK_NE(&from, this);
+void Version::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<Version*>(&to_msg);
+ auto& from = static_cast<const Version&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_suffix(from._internal_suffix());
+ _this->_internal_set_suffix(from._internal_suffix());
}
if (cached_has_bits & 0x00000002u) {
- major_ = from.major_;
+ _this->_impl_.major_ = from._impl_.major_;
}
if (cached_has_bits & 0x00000004u) {
- minor_ = from.minor_;
+ _this->_impl_.minor_ = from._impl_.minor_;
}
if (cached_has_bits & 0x00000008u) {
- patch_ = from.patch_;
+ _this->_impl_.patch_ = from._impl_.patch_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Version::CopyFrom(const Version& from) {
@@ -515,17 +534,17 @@ void Version::InternalSwap(Version* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &suffix_, lhs_arena,
- &other->suffix_, rhs_arena
+ &_impl_.suffix_, lhs_arena,
+ &other->_impl_.suffix_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(Version, patch_)
- + sizeof(Version::patch_)
- - PROTOBUF_FIELD_OFFSET(Version, major_)>(
- reinterpret_cast<char*>(&major_),
- reinterpret_cast<char*>(&other->major_));
+ PROTOBUF_FIELD_OFFSET(Version, _impl_.patch_)
+ + sizeof(Version::_impl_.patch_)
+ - PROTOBUF_FIELD_OFFSET(Version, _impl_.major_)>(
+ reinterpret_cast<char*>(&_impl_.major_),
+ reinterpret_cast<char*>(&other->_impl_.major_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Version::GetMetadata() const {
@@ -538,7 +557,7 @@ void Version::InternalSwap(Version* other) {
class CodeGeneratorRequest::_Internal {
public:
- using HasBits = decltype(std::declval<CodeGeneratorRequest>()._has_bits_);
+ using HasBits = decltype(std::declval<CodeGeneratorRequest>()._impl_._has_bits_);
static void set_has_parameter(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -550,47 +569,59 @@ class CodeGeneratorRequest::_Internal {
const ::PROTOBUF_NAMESPACE_ID::compiler::Version&
CodeGeneratorRequest::_Internal::compiler_version(const CodeGeneratorRequest* msg) {
- return *msg->compiler_version_;
+ return *msg->_impl_.compiler_version_;
}
void CodeGeneratorRequest::clear_proto_file() {
- proto_file_.Clear();
+ _impl_.proto_file_.Clear();
}
CodeGeneratorRequest::CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- file_to_generate_(arena),
- proto_file_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- file_to_generate_(from.file_to_generate_),
- proto_file_(from.proto_file_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ CodeGeneratorRequest* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.file_to_generate_){from._impl_.file_to_generate_}
+ , decltype(_impl_.proto_file_){from._impl_.proto_file_}
+ , decltype(_impl_.parameter_){}
+ , decltype(_impl_.compiler_version_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- parameter_.InitDefault();
+ _impl_.parameter_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- parameter_.Set("", GetArenaForAllocation());
+ _impl_.parameter_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_parameter()) {
- parameter_.Set(from._internal_parameter(),
- GetArenaForAllocation());
+ _this->_impl_.parameter_.Set(from._internal_parameter(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_compiler_version()) {
- compiler_version_ = new ::PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_);
- } else {
- compiler_version_ = nullptr;
+ _this->_impl_.compiler_version_ = new ::PROTOBUF_NAMESPACE_ID::compiler::Version(*from._impl_.compiler_version_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
-inline void CodeGeneratorRequest::SharedCtor() {
-parameter_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- parameter_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-compiler_version_ = nullptr;
+inline void CodeGeneratorRequest::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.file_to_generate_){arena}
+ , decltype(_impl_.proto_file_){arena}
+ , decltype(_impl_.parameter_){}
+ , decltype(_impl_.compiler_version_){nullptr}
+ };
+ _impl_.parameter_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.parameter_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
CodeGeneratorRequest::~CodeGeneratorRequest() {
@@ -604,12 +635,14 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
inline void CodeGeneratorRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- parameter_.Destroy();
- if (this != internal_default_instance()) delete compiler_version_;
+ _impl_.file_to_generate_.~RepeatedPtrField();
+ _impl_.proto_file_.~RepeatedPtrField();
+ _impl_.parameter_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.compiler_version_;
}
void CodeGeneratorRequest::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void CodeGeneratorRequest::Clear() {
@@ -618,19 +651,19 @@ void CodeGeneratorRequest::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- file_to_generate_.Clear();
- proto_file_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.file_to_generate_.Clear();
+ _impl_.proto_file_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- parameter_.ClearNonDefaultToEmpty();
+ _impl_.parameter_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(compiler_version_ != nullptr);
- compiler_version_->Clear();
+ GOOGLE_DCHECK(_impl_.compiler_version_ != nullptr);
+ _impl_.compiler_version_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -707,7 +740,7 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::_pbi::ParseC
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -731,7 +764,7 @@ uint8_t* CodeGeneratorRequest::_InternalSerialize(
target = stream->WriteString(1, s, target);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string parameter = 2;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -775,20 +808,20 @@ size_t CodeGeneratorRequest::ByteSizeLong() const {
// repeated string file_to_generate = 1;
total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(file_to_generate_.size());
- for (int i = 0, n = file_to_generate_.size(); i < n; i++) {
+ ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.file_to_generate_.size());
+ for (int i = 0, n = _impl_.file_to_generate_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- file_to_generate_.Get(i));
+ _impl_.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->proto_file_) {
+ for (const auto& msg : this->_impl_.proto_file_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string parameter = 2;
if (cached_has_bits & 0x00000001u) {
@@ -801,44 +834,41 @@ size_t CodeGeneratorRequest::ByteSizeLong() const {
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *compiler_version_);
+ *_impl_.compiler_version_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CodeGeneratorRequest::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
CodeGeneratorRequest::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CodeGeneratorRequest::GetClassData() const { return &_class_data_; }
-void CodeGeneratorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<CodeGeneratorRequest *>(to)->MergeFrom(
- static_cast<const CodeGeneratorRequest &>(from));
-}
-
-void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
- GOOGLE_DCHECK_NE(&from, this);
+void CodeGeneratorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<CodeGeneratorRequest*>(&to_msg);
+ auto& from = static_cast<const CodeGeneratorRequest&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- file_to_generate_.MergeFrom(from.file_to_generate_);
- proto_file_.MergeFrom(from.proto_file_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.file_to_generate_.MergeFrom(from._impl_.file_to_generate_);
+ _this->_impl_.proto_file_.MergeFrom(from._impl_.proto_file_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_parameter(from._internal_parameter());
+ _this->_internal_set_parameter(from._internal_parameter());
}
if (cached_has_bits & 0x00000002u) {
- _internal_mutable_compiler_version()->::PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from._internal_compiler_version());
+ _this->_internal_mutable_compiler_version()->::PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(
+ from._internal_compiler_version());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
@@ -849,7 +879,7 @@ void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
}
bool CodeGeneratorRequest::IsInitialized() const {
- if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(proto_file_))
+ if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.proto_file_))
return false;
return true;
}
@@ -859,14 +889,14 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- file_to_generate_.InternalSwap(&other->file_to_generate_);
- proto_file_.InternalSwap(&other->proto_file_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.file_to_generate_.InternalSwap(&other->_impl_.file_to_generate_);
+ _impl_.proto_file_.InternalSwap(&other->_impl_.proto_file_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &parameter_, lhs_arena,
- &other->parameter_, rhs_arena
+ &_impl_.parameter_, lhs_arena,
+ &other->_impl_.parameter_, rhs_arena
);
- swap(compiler_version_, other->compiler_version_);
+ swap(_impl_.compiler_version_, other->_impl_.compiler_version_);
}
::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorRequest::GetMetadata() const {
@@ -879,7 +909,7 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
class CodeGeneratorResponse_File::_Internal {
public:
- using HasBits = decltype(std::declval<CodeGeneratorResponse_File>()._has_bits_);
+ using HasBits = decltype(std::declval<CodeGeneratorResponse_File>()._impl_._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -897,68 +927,84 @@ class CodeGeneratorResponse_File::_Internal {
const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&
CodeGeneratorResponse_File::_Internal::generated_code_info(const CodeGeneratorResponse_File* msg) {
- return *msg->generated_code_info_;
+ return *msg->_impl_.generated_code_info_;
}
void CodeGeneratorResponse_File::clear_generated_code_info() {
- if (generated_code_info_ != nullptr) generated_code_info_->Clear();
- _has_bits_[0] &= ~0x00000008u;
+ if (_impl_.generated_code_info_ != nullptr) _impl_.generated_code_info_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
CodeGeneratorResponse_File::CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ CodeGeneratorResponse_File* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.insertion_point_){}
+ , decltype(_impl_.content_){}
+ , decltype(_impl_.generated_code_info_){nullptr}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.InitDefault();
+ _impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
+ _impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
- name_.Set(from._internal_name(),
- GetArenaForAllocation());
+ _this->_impl_.name_.Set(from._internal_name(),
+ _this->GetArenaForAllocation());
}
- insertion_point_.InitDefault();
+ _impl_.insertion_point_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- insertion_point_.Set("", GetArenaForAllocation());
+ _impl_.insertion_point_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_insertion_point()) {
- insertion_point_.Set(from._internal_insertion_point(),
- GetArenaForAllocation());
+ _this->_impl_.insertion_point_.Set(from._internal_insertion_point(),
+ _this->GetArenaForAllocation());
}
- content_.InitDefault();
+ _impl_.content_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- content_.Set("", GetArenaForAllocation());
+ _impl_.content_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_content()) {
- content_.Set(from._internal_content(),
- GetArenaForAllocation());
+ _this->_impl_.content_.Set(from._internal_content(),
+ _this->GetArenaForAllocation());
}
if (from._internal_has_generated_code_info()) {
- generated_code_info_ = new ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo(*from.generated_code_info_);
- } else {
- generated_code_info_ = nullptr;
+ _this->_impl_.generated_code_info_ = new ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo(*from._impl_.generated_code_info_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
-inline void CodeGeneratorResponse_File::SharedCtor() {
-name_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-insertion_point_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- insertion_point_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-content_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- content_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-generated_code_info_ = nullptr;
+inline void CodeGeneratorResponse_File::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.name_){}
+ , decltype(_impl_.insertion_point_){}
+ , decltype(_impl_.content_){}
+ , decltype(_impl_.generated_code_info_){nullptr}
+ };
+ _impl_.name_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.name_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.insertion_point_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.insertion_point_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.content_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.content_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
@@ -972,14 +1018,14 @@ CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
inline void CodeGeneratorResponse_File::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.Destroy();
- insertion_point_.Destroy();
- content_.Destroy();
- if (this != internal_default_instance()) delete generated_code_info_;
+ _impl_.name_.Destroy();
+ _impl_.insertion_point_.Destroy();
+ _impl_.content_.Destroy();
+ if (this != internal_default_instance()) delete _impl_.generated_code_info_;
}
void CodeGeneratorResponse_File::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void CodeGeneratorResponse_File::Clear() {
@@ -988,23 +1034,23 @@ void CodeGeneratorResponse_File::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
+ _impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
- insertion_point_.ClearNonDefaultToEmpty();
+ _impl_.insertion_point_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
- content_.ClearNonDefaultToEmpty();
+ _impl_.content_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
- GOOGLE_DCHECK(generated_code_info_ != nullptr);
- generated_code_info_->Clear();
+ GOOGLE_DCHECK(_impl_.generated_code_info_ != nullptr);
+ _impl_.generated_code_info_->Clear();
}
}
- _has_bits_.Clear();
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1075,7 +1121,7 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::_pbi::
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -1089,7 +1135,7 @@ uint8_t* CodeGeneratorResponse_File::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1143,7 +1189,7 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
@@ -1170,48 +1216,45 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const {
if (cached_has_bits & 0x00000008u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *generated_code_info_);
+ *_impl_.generated_code_info_);
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CodeGeneratorResponse_File::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
CodeGeneratorResponse_File::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CodeGeneratorResponse_File::GetClassData() const { return &_class_data_; }
-void CodeGeneratorResponse_File::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<CodeGeneratorResponse_File *>(to)->MergeFrom(
- static_cast<const CodeGeneratorResponse_File &>(from));
-}
-
-void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- GOOGLE_DCHECK_NE(&from, this);
+void CodeGeneratorResponse_File::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<CodeGeneratorResponse_File*>(&to_msg);
+ auto& from = static_cast<const CodeGeneratorResponse_File&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
+ _this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
- _internal_set_insertion_point(from._internal_insertion_point());
+ _this->_internal_set_insertion_point(from._internal_insertion_point());
}
if (cached_has_bits & 0x00000004u) {
- _internal_set_content(from._internal_content());
+ _this->_internal_set_content(from._internal_content());
}
if (cached_has_bits & 0x00000008u) {
- _internal_mutable_generated_code_info()->::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo::MergeFrom(from._internal_generated_code_info());
+ _this->_internal_mutable_generated_code_info()->::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo::MergeFrom(
+ from._internal_generated_code_info());
}
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
@@ -1230,20 +1273,20 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other)
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &name_, lhs_arena,
- &other->name_, rhs_arena
+ &_impl_.name_, lhs_arena,
+ &other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &insertion_point_, lhs_arena,
- &other->insertion_point_, rhs_arena
+ &_impl_.insertion_point_, lhs_arena,
+ &other->_impl_.insertion_point_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &content_, lhs_arena,
- &other->content_, rhs_arena
+ &_impl_.content_, lhs_arena,
+ &other->_impl_.content_, rhs_arena
);
- swap(generated_code_info_, other->generated_code_info_);
+ swap(_impl_.generated_code_info_, other->_impl_.generated_code_info_);
}
::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse_File::GetMetadata() const {
@@ -1256,7 +1299,7 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other)
class CodeGeneratorResponse::_Internal {
public:
- using HasBits = decltype(std::declval<CodeGeneratorResponse>()._has_bits_);
+ using HasBits = decltype(std::declval<CodeGeneratorResponse>()._impl_._has_bits_);
static void set_has_error(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
@@ -1267,34 +1310,48 @@ class CodeGeneratorResponse::_Internal {
CodeGeneratorResponse::CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- file_(arena) {
- SharedCtor();
+ : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
+ SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- file_(from.file_) {
+ : ::PROTOBUF_NAMESPACE_ID::Message() {
+ CodeGeneratorResponse* const _this = this; (void)_this;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){from._impl_._has_bits_}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.file_){from._impl_.file_}
+ , decltype(_impl_.error_){}
+ , decltype(_impl_.supported_features_){}};
+
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- error_.InitDefault();
+ _impl_.error_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- error_.Set("", GetArenaForAllocation());
+ _impl_.error_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_error()) {
- error_.Set(from._internal_error(),
- GetArenaForAllocation());
+ _this->_impl_.error_.Set(from._internal_error(),
+ _this->GetArenaForAllocation());
}
- supported_features_ = from.supported_features_;
+ _this->_impl_.supported_features_ = from._impl_.supported_features_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
-inline void CodeGeneratorResponse::SharedCtor() {
-error_.InitDefault();
-#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- error_.Set("", GetArenaForAllocation());
-#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
-supported_features_ = arc_ui64{0u};
+inline void CodeGeneratorResponse::SharedCtor(
+ ::_pb::Arena* arena, bool is_message_owned) {
+ (void)arena;
+ (void)is_message_owned;
+ new (&_impl_) Impl_{
+ decltype(_impl_._has_bits_){}
+ , /*decltype(_impl_._cached_size_)*/{}
+ , decltype(_impl_.file_){arena}
+ , decltype(_impl_.error_){}
+ , decltype(_impl_.supported_features_){arc_ui64{0u}}
+ };
+ _impl_.error_.InitDefault();
+ #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
+ _impl_.error_.Set("", GetArenaForAllocation());
+ #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
CodeGeneratorResponse::~CodeGeneratorResponse() {
@@ -1308,11 +1365,12 @@ CodeGeneratorResponse::~CodeGeneratorResponse() {
inline void CodeGeneratorResponse::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- error_.Destroy();
+ _impl_.file_.~RepeatedPtrField();
+ _impl_.error_.Destroy();
}
void CodeGeneratorResponse::SetCachedSize(int size) const {
- _cached_size_.Set(size);
+ _impl_._cached_size_.Set(size);
}
void CodeGeneratorResponse::Clear() {
@@ -1321,13 +1379,13 @@ void CodeGeneratorResponse::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- file_.Clear();
- cached_has_bits = _has_bits_[0];
+ _impl_.file_.Clear();
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
- error_.ClearNonDefaultToEmpty();
+ _impl_.error_.ClearNonDefaultToEmpty();
}
- supported_features_ = arc_ui64{0u};
- _has_bits_.Clear();
+ _impl_.supported_features_ = arc_ui64{0u};
+ _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -1354,7 +1412,7 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::_pbi::Parse
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_supported_features(&has_bits);
- supported_features_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
+ _impl_.supported_features_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -1388,7 +1446,7 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::_pbi::Parse
CHK_(ptr != nullptr);
} // while
message_done:
- _has_bits_.Or(has_bits);
+ _impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
@@ -1402,7 +1460,7 @@ uint8_t* CodeGeneratorResponse::_InternalSerialize(
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
// optional string error = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1445,12 +1503,12 @@ size_t CodeGeneratorResponse::ByteSizeLong() const {
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
total_size += 1UL * this->_internal_file_size();
- for (const auto& msg : this->file_) {
+ for (const auto& msg : this->_impl_.file_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
- cached_has_bits = _has_bits_[0];
+ cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string error = 1;
if (cached_has_bits & 0x00000001u) {
@@ -1465,40 +1523,36 @@ size_t CodeGeneratorResponse::ByteSizeLong() const {
}
}
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
+ return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CodeGeneratorResponse::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
+ ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
CodeGeneratorResponse::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CodeGeneratorResponse::GetClassData() const { return &_class_data_; }
-void CodeGeneratorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<CodeGeneratorResponse *>(to)->MergeFrom(
- static_cast<const CodeGeneratorResponse &>(from));
-}
-
-void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
- GOOGLE_DCHECK_NE(&from, this);
+void CodeGeneratorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
+ auto* const _this = static_cast<CodeGeneratorResponse*>(&to_msg);
+ auto& from = static_cast<const CodeGeneratorResponse&>(from_msg);
+ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
+ GOOGLE_DCHECK_NE(&from, _this);
arc_ui32 cached_has_bits = 0;
(void) cached_has_bits;
- file_.MergeFrom(from.file_);
- cached_has_bits = from._has_bits_[0];
+ _this->_impl_.file_.MergeFrom(from._impl_.file_);
+ cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
- _internal_set_error(from._internal_error());
+ _this->_internal_set_error(from._internal_error());
}
if (cached_has_bits & 0x00000002u) {
- supported_features_ = from.supported_features_;
+ _this->_impl_.supported_features_ = from._impl_.supported_features_;
}
- _has_bits_[0] |= cached_has_bits;
+ _this->_impl_._has_bits_[0] |= cached_has_bits;
}
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
+ _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
@@ -1517,13 +1571,13 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- file_.InternalSwap(&other->file_);
+ swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
+ _impl_.file_.InternalSwap(&other->_impl_.file_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &error_, lhs_arena,
- &other->error_, rhs_arena
+ &_impl_.error_, lhs_arena,
+ &other->_impl_.error_, rhs_arena
);
- swap(supported_features_, other->supported_features_);
+ swap(_impl_.supported_features_, other->_impl_.supported_features_);
}
::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse::GetMetadata() const {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.h b/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.h
index 64d7be56fd..ac9253cc58 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/plugin.pb.h
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3020000
+#if PROTOBUF_VERSION < 3021000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3020002 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3021003 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -189,9 +189,11 @@ class PROTOC_EXPORT Version final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const Version& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const Version& from);
+ void MergeFrom( const Version& from) {
+ Version::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -200,10 +202,10 @@ class PROTOC_EXPORT Version final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Version* other);
@@ -297,12 +299,15 @@ class PROTOC_EXPORT Version final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr suffix_;
- arc_i32 major_;
- arc_i32 minor_;
- arc_i32 patch_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr suffix_;
+ arc_i32 major_;
+ arc_i32 minor_;
+ arc_i32 patch_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
// -------------------------------------------------------------------
@@ -394,9 +399,11 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const CodeGeneratorRequest& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const CodeGeneratorRequest& from);
+ void MergeFrom( const CodeGeneratorRequest& from) {
+ CodeGeneratorRequest::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -405,10 +412,10 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(CodeGeneratorRequest* other);
@@ -523,12 +530,15 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> file_to_generate_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto > proto_file_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr parameter_;
- ::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType> file_to_generate_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto > proto_file_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr parameter_;
+ ::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
// -------------------------------------------------------------------
@@ -620,9 +630,11 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const CodeGeneratorResponse_File& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const CodeGeneratorResponse_File& from);
+ void MergeFrom( const CodeGeneratorResponse_File& from) {
+ CodeGeneratorResponse_File::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -631,10 +643,10 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(CodeGeneratorResponse_File* other);
@@ -743,12 +755,15 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr insertion_point_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_;
- ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr insertion_point_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_;
+ ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
// -------------------------------------------------------------------
@@ -840,9 +855,11 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const CodeGeneratorResponse& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
- void MergeFrom(const CodeGeneratorResponse& from);
+ void MergeFrom( const CodeGeneratorResponse& from) {
+ CodeGeneratorResponse::MergeImpl(*this, from);
+ }
private:
- static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
+ static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
@@ -851,10 +868,10 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
+ int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
- void SharedCtor();
+ void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(CodeGeneratorResponse* other);
@@ -971,11 +988,14 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
- mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
- ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File > file_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_;
- arc_ui64 supported_features_;
+ struct Impl_ {
+ ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
+ mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
+ ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File > file_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_;
+ arc_ui64 supported_features_;
+ };
+ union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
};
// ===================================================================
@@ -991,26 +1011,26 @@ class PROTOC_EXPORT CodeGeneratorResponse final :
// optional int32 major = 1;
inline bool Version::_internal_has_major() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool Version::has_major() const {
return _internal_has_major();
}
inline void Version::clear_major() {
- major_ = 0;
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.major_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline arc_i32 Version::_internal_major() const {
- return major_;
+ return _impl_.major_;
}
inline arc_i32 Version::major() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major)
return _internal_major();
}
inline void Version::_internal_set_major(arc_i32 value) {
- _has_bits_[0] |= 0x00000002u;
- major_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.major_ = value;
}
inline void Version::set_major(arc_i32 value) {
_internal_set_major(value);
@@ -1019,26 +1039,26 @@ inline void Version::set_major(arc_i32 value) {
// optional int32 minor = 2;
inline bool Version::_internal_has_minor() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool Version::has_minor() const {
return _internal_has_minor();
}
inline void Version::clear_minor() {
- minor_ = 0;
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.minor_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline arc_i32 Version::_internal_minor() const {
- return minor_;
+ return _impl_.minor_;
}
inline arc_i32 Version::minor() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor)
return _internal_minor();
}
inline void Version::_internal_set_minor(arc_i32 value) {
- _has_bits_[0] |= 0x00000004u;
- minor_ = value;
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.minor_ = value;
}
inline void Version::set_minor(arc_i32 value) {
_internal_set_minor(value);
@@ -1047,26 +1067,26 @@ inline void Version::set_minor(arc_i32 value) {
// optional int32 patch = 3;
inline bool Version::_internal_has_patch() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
return value;
}
inline bool Version::has_patch() const {
return _internal_has_patch();
}
inline void Version::clear_patch() {
- patch_ = 0;
- _has_bits_[0] &= ~0x00000008u;
+ _impl_.patch_ = 0;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
inline arc_i32 Version::_internal_patch() const {
- return patch_;
+ return _impl_.patch_;
}
inline arc_i32 Version::patch() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch)
return _internal_patch();
}
inline void Version::_internal_set_patch(arc_i32 value) {
- _has_bits_[0] |= 0x00000008u;
- patch_ = value;
+ _impl_._has_bits_[0] |= 0x00000008u;
+ _impl_.patch_ = value;
}
inline void Version::set_patch(arc_i32 value) {
_internal_set_patch(value);
@@ -1075,15 +1095,15 @@ inline void Version::set_patch(arc_i32 value) {
// optional string suffix = 4;
inline bool Version::_internal_has_suffix() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool Version::has_suffix() const {
return _internal_has_suffix();
}
inline void Version::clear_suffix() {
- suffix_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.suffix_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& Version::suffix() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.suffix)
@@ -1092,8 +1112,8 @@ inline const TProtoStringType& Version::suffix() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void Version::set_suffix(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- suffix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.suffix_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
}
inline TProtoStringType* Version::mutable_suffix() {
@@ -1102,40 +1122,40 @@ inline TProtoStringType* Version::mutable_suffix() {
return _s;
}
inline const TProtoStringType& Version::_internal_suffix() const {
- return suffix_.Get();
+ return _impl_.suffix_.Get();
}
inline void Version::_internal_set_suffix(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- suffix_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.suffix_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* Version::_internal_mutable_suffix() {
- _has_bits_[0] |= 0x00000001u;
- return suffix_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.suffix_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* Version::release_suffix() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix)
if (!_internal_has_suffix()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = suffix_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.suffix_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (suffix_.IsDefault()) {
- suffix_.Set("", GetArenaForAllocation());
+ if (_impl_.suffix_.IsDefault()) {
+ _impl_.suffix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void Version::set_allocated_suffix(TProtoStringType* suffix) {
if (suffix != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- suffix_.SetAllocated(suffix, GetArenaForAllocation());
+ _impl_.suffix_.SetAllocated(suffix, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (suffix_.IsDefault()) {
- suffix_.Set("", GetArenaForAllocation());
+ if (_impl_.suffix_.IsDefault()) {
+ _impl_.suffix_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix)
@@ -1147,13 +1167,13 @@ inline void Version::set_allocated_suffix(TProtoStringType* suffix) {
// repeated string file_to_generate = 1;
inline int CodeGeneratorRequest::_internal_file_to_generate_size() const {
- return file_to_generate_.size();
+ return _impl_.file_to_generate_.size();
}
inline int CodeGeneratorRequest::file_to_generate_size() const {
return _internal_file_to_generate_size();
}
inline void CodeGeneratorRequest::clear_file_to_generate() {
- file_to_generate_.Clear();
+ _impl_.file_to_generate_.Clear();
}
inline TProtoStringType* CodeGeneratorRequest::add_file_to_generate() {
TProtoStringType* _s = _internal_add_file_to_generate();
@@ -1161,7 +1181,7 @@ inline TProtoStringType* CodeGeneratorRequest::add_file_to_generate() {
return _s;
}
inline const TProtoStringType& CodeGeneratorRequest::_internal_file_to_generate(int index) const {
- return file_to_generate_.Get(index);
+ return _impl_.file_to_generate_.Get(index);
}
inline const TProtoStringType& CodeGeneratorRequest::file_to_generate(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
@@ -1169,68 +1189,68 @@ inline const TProtoStringType& CodeGeneratorRequest::file_to_generate(int index)
}
inline TProtoStringType* CodeGeneratorRequest::mutable_file_to_generate(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
- return file_to_generate_.Mutable(index);
+ return _impl_.file_to_generate_.Mutable(index);
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const TProtoStringType& value) {
- file_to_generate_.Mutable(index)->assign(value);
+ _impl_.file_to_generate_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, TProtoStringType&& value) {
- file_to_generate_.Mutable(index)->assign(std::move(value));
+ _impl_.file_to_generate_.Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
- file_to_generate_.Mutable(index)->assign(value);
+ _impl_.file_to_generate_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, size_t size) {
- file_to_generate_.Mutable(index)->assign(
+ _impl_.file_to_generate_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline TProtoStringType* CodeGeneratorRequest::_internal_add_file_to_generate() {
- return file_to_generate_.Add();
+ return _impl_.file_to_generate_.Add();
}
inline void CodeGeneratorRequest::add_file_to_generate(const TProtoStringType& value) {
- file_to_generate_.Add()->assign(value);
+ _impl_.file_to_generate_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(TProtoStringType&& value) {
- file_to_generate_.Add(std::move(value));
+ _impl_.file_to_generate_.Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value) {
GOOGLE_DCHECK(value != nullptr);
- file_to_generate_.Add()->assign(value);
+ _impl_.file_to_generate_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t size) {
- file_to_generate_.Add()->assign(reinterpret_cast<const char*>(value), size);
+ _impl_.file_to_generate_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>&
CodeGeneratorRequest::file_to_generate() const {
// @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
- return file_to_generate_;
+ return _impl_.file_to_generate_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<TProtoStringType>*
CodeGeneratorRequest::mutable_file_to_generate() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
- return &file_to_generate_;
+ return &_impl_.file_to_generate_;
}
// optional string parameter = 2;
inline bool CodeGeneratorRequest::_internal_has_parameter() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool CodeGeneratorRequest::has_parameter() const {
return _internal_has_parameter();
}
inline void CodeGeneratorRequest::clear_parameter() {
- parameter_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.parameter_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& CodeGeneratorRequest::parameter() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.parameter)
@@ -1239,8 +1259,8 @@ inline const TProtoStringType& CodeGeneratorRequest::parameter() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void CodeGeneratorRequest::set_parameter(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- parameter_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.parameter_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
inline TProtoStringType* CodeGeneratorRequest::mutable_parameter() {
@@ -1249,40 +1269,40 @@ inline TProtoStringType* CodeGeneratorRequest::mutable_parameter() {
return _s;
}
inline const TProtoStringType& CodeGeneratorRequest::_internal_parameter() const {
- return parameter_.Get();
+ return _impl_.parameter_.Get();
}
inline void CodeGeneratorRequest::_internal_set_parameter(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- parameter_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.parameter_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorRequest::_internal_mutable_parameter() {
- _has_bits_[0] |= 0x00000001u;
- return parameter_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.parameter_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorRequest::release_parameter() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter)
if (!_internal_has_parameter()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = parameter_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.parameter_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (parameter_.IsDefault()) {
- parameter_.Set("", GetArenaForAllocation());
+ if (_impl_.parameter_.IsDefault()) {
+ _impl_.parameter_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void CodeGeneratorRequest::set_allocated_parameter(TProtoStringType* parameter) {
if (parameter != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- parameter_.SetAllocated(parameter, GetArenaForAllocation());
+ _impl_.parameter_.SetAllocated(parameter, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (parameter_.IsDefault()) {
- parameter_.Set("", GetArenaForAllocation());
+ if (_impl_.parameter_.IsDefault()) {
+ _impl_.parameter_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter)
@@ -1290,29 +1310,29 @@ inline void CodeGeneratorRequest::set_allocated_parameter(TProtoStringType* para
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
inline int CodeGeneratorRequest::_internal_proto_file_size() const {
- return proto_file_.size();
+ return _impl_.proto_file_.size();
}
inline int CodeGeneratorRequest::proto_file_size() const {
return _internal_proto_file_size();
}
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
- return proto_file_.Mutable(index);
+ return _impl_.proto_file_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >*
CodeGeneratorRequest::mutable_proto_file() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
- return &proto_file_;
+ return &_impl_.proto_file_;
}
inline const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::_internal_proto_file(int index) const {
- return proto_file_.Get(index);
+ return _impl_.proto_file_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
return _internal_proto_file(index);
}
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::_internal_add_proto_file() {
- return proto_file_.Add();
+ return _impl_.proto_file_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() {
::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _add = _internal_add_proto_file();
@@ -1322,24 +1342,24 @@ inline ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::add_p
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::FileDescriptorProto >&
CodeGeneratorRequest::proto_file() const {
// @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file)
- return proto_file_;
+ return _impl_.proto_file_;
}
// optional .google.protobuf.compiler.Version compiler_version = 3;
inline bool CodeGeneratorRequest::_internal_has_compiler_version() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
- PROTOBUF_ASSUME(!value || compiler_version_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.compiler_version_ != nullptr);
return value;
}
inline bool CodeGeneratorRequest::has_compiler_version() const {
return _internal_has_compiler_version();
}
inline void CodeGeneratorRequest::clear_compiler_version() {
- if (compiler_version_ != nullptr) compiler_version_->Clear();
- _has_bits_[0] &= ~0x00000002u;
+ if (_impl_.compiler_version_ != nullptr) _impl_.compiler_version_->Clear();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::_internal_compiler_version() const {
- const ::PROTOBUF_NAMESPACE_ID::compiler::Version* p = compiler_version_;
+ const ::PROTOBUF_NAMESPACE_ID::compiler::Version* p = _impl_.compiler_version_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::compiler::Version&>(
::PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_);
}
@@ -1350,20 +1370,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::c
inline void CodeGeneratorRequest::unsafe_arena_set_allocated_compiler_version(
::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compiler_version_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.compiler_version_);
}
- compiler_version_ = compiler_version;
+ _impl_.compiler_version_ = compiler_version;
if (compiler_version) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_;
- compiler_version_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::compiler::Version* temp = _impl_.compiler_version_;
+ _impl_.compiler_version_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -1377,18 +1397,18 @@ inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::release
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::unsafe_arena_release_compiler_version() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
- _has_bits_[0] &= ~0x00000002u;
- ::PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_;
- compiler_version_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ ::PROTOBUF_NAMESPACE_ID::compiler::Version* temp = _impl_.compiler_version_;
+ _impl_.compiler_version_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::_internal_mutable_compiler_version() {
- _has_bits_[0] |= 0x00000002u;
- if (compiler_version_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000002u;
+ if (_impl_.compiler_version_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::compiler::Version>(GetArenaForAllocation());
- compiler_version_ = p;
+ _impl_.compiler_version_ = p;
}
- return compiler_version_;
+ return _impl_.compiler_version_;
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
::PROTOBUF_NAMESPACE_ID::compiler::Version* _msg = _internal_mutable_compiler_version();
@@ -1398,7 +1418,7 @@ inline ::PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable
inline void CodeGeneratorRequest::set_allocated_compiler_version(::PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete compiler_version_;
+ delete _impl_.compiler_version_;
}
if (compiler_version) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -1407,11 +1427,11 @@ inline void CodeGeneratorRequest::set_allocated_compiler_version(::PROTOBUF_NAME
compiler_version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, compiler_version, submessage_arena);
}
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- compiler_version_ = compiler_version;
+ _impl_.compiler_version_ = compiler_version;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
}
@@ -1421,15 +1441,15 @@ inline void CodeGeneratorRequest::set_allocated_compiler_version(::PROTOBUF_NAME
// optional string name = 1;
inline bool CodeGeneratorResponse_File::_internal_has_name() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool CodeGeneratorResponse_File::has_name() const {
return _internal_has_name();
}
inline void CodeGeneratorResponse_File::clear_name() {
- name_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.name_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& CodeGeneratorResponse_File::name() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name)
@@ -1438,8 +1458,8 @@ inline const TProtoStringType& CodeGeneratorResponse_File::name() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void CodeGeneratorResponse_File::set_name(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
inline TProtoStringType* CodeGeneratorResponse_File::mutable_name() {
@@ -1448,40 +1468,40 @@ inline TProtoStringType* CodeGeneratorResponse_File::mutable_name() {
return _s;
}
inline const TProtoStringType& CodeGeneratorResponse_File::_internal_name() const {
- return name_.Get();
+ return _impl_.name_.Get();
}
inline void CodeGeneratorResponse_File::_internal_set_name(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- name_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.name_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse_File::_internal_mutable_name() {
- _has_bits_[0] |= 0x00000001u;
- return name_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.name_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse_File::release_name() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name)
if (!_internal_has_name()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = name_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.name_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void CodeGeneratorResponse_File::set_allocated_name(TProtoStringType* name) {
if (name != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- name_.SetAllocated(name, GetArenaForAllocation());
+ _impl_.name_.SetAllocated(name, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (name_.IsDefault()) {
- name_.Set("", GetArenaForAllocation());
+ if (_impl_.name_.IsDefault()) {
+ _impl_.name_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name)
@@ -1489,15 +1509,15 @@ inline void CodeGeneratorResponse_File::set_allocated_name(TProtoStringType* nam
// optional string insertion_point = 2;
inline bool CodeGeneratorResponse_File::_internal_has_insertion_point() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool CodeGeneratorResponse_File::has_insertion_point() const {
return _internal_has_insertion_point();
}
inline void CodeGeneratorResponse_File::clear_insertion_point() {
- insertion_point_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.insertion_point_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const TProtoStringType& CodeGeneratorResponse_File::insertion_point() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
@@ -1506,8 +1526,8 @@ inline const TProtoStringType& CodeGeneratorResponse_File::insertion_point() con
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void CodeGeneratorResponse_File::set_insertion_point(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000002u;
- insertion_point_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.insertion_point_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
inline TProtoStringType* CodeGeneratorResponse_File::mutable_insertion_point() {
@@ -1516,40 +1536,40 @@ inline TProtoStringType* CodeGeneratorResponse_File::mutable_insertion_point() {
return _s;
}
inline const TProtoStringType& CodeGeneratorResponse_File::_internal_insertion_point() const {
- return insertion_point_.Get();
+ return _impl_.insertion_point_.Get();
}
inline void CodeGeneratorResponse_File::_internal_set_insertion_point(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000002u;
- insertion_point_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.insertion_point_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse_File::_internal_mutable_insertion_point() {
- _has_bits_[0] |= 0x00000002u;
- return insertion_point_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000002u;
+ return _impl_.insertion_point_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse_File::release_insertion_point() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
if (!_internal_has_insertion_point()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000002u;
- auto* p = insertion_point_.Release();
+ _impl_._has_bits_[0] &= ~0x00000002u;
+ auto* p = _impl_.insertion_point_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (insertion_point_.IsDefault()) {
- insertion_point_.Set("", GetArenaForAllocation());
+ if (_impl_.insertion_point_.IsDefault()) {
+ _impl_.insertion_point_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void CodeGeneratorResponse_File::set_allocated_insertion_point(TProtoStringType* insertion_point) {
if (insertion_point != nullptr) {
- _has_bits_[0] |= 0x00000002u;
+ _impl_._has_bits_[0] |= 0x00000002u;
} else {
- _has_bits_[0] &= ~0x00000002u;
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
- insertion_point_.SetAllocated(insertion_point, GetArenaForAllocation());
+ _impl_.insertion_point_.SetAllocated(insertion_point, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (insertion_point_.IsDefault()) {
- insertion_point_.Set("", GetArenaForAllocation());
+ if (_impl_.insertion_point_.IsDefault()) {
+ _impl_.insertion_point_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
@@ -1557,15 +1577,15 @@ inline void CodeGeneratorResponse_File::set_allocated_insertion_point(TProtoStri
// optional string content = 15;
inline bool CodeGeneratorResponse_File::_internal_has_content() const {
- bool value = (_has_bits_[0] & 0x00000004u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
return value;
}
inline bool CodeGeneratorResponse_File::has_content() const {
return _internal_has_content();
}
inline void CodeGeneratorResponse_File::clear_content() {
- content_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000004u;
+ _impl_.content_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
inline const TProtoStringType& CodeGeneratorResponse_File::content() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content)
@@ -1574,8 +1594,8 @@ inline const TProtoStringType& CodeGeneratorResponse_File::content() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void CodeGeneratorResponse_File::set_content(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000004u;
- content_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.content_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
inline TProtoStringType* CodeGeneratorResponse_File::mutable_content() {
@@ -1584,40 +1604,40 @@ inline TProtoStringType* CodeGeneratorResponse_File::mutable_content() {
return _s;
}
inline const TProtoStringType& CodeGeneratorResponse_File::_internal_content() const {
- return content_.Get();
+ return _impl_.content_.Get();
}
inline void CodeGeneratorResponse_File::_internal_set_content(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000004u;
- content_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ _impl_.content_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse_File::_internal_mutable_content() {
- _has_bits_[0] |= 0x00000004u;
- return content_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000004u;
+ return _impl_.content_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse_File::release_content() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content)
if (!_internal_has_content()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000004u;
- auto* p = content_.Release();
+ _impl_._has_bits_[0] &= ~0x00000004u;
+ auto* p = _impl_.content_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (content_.IsDefault()) {
- content_.Set("", GetArenaForAllocation());
+ if (_impl_.content_.IsDefault()) {
+ _impl_.content_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void CodeGeneratorResponse_File::set_allocated_content(TProtoStringType* content) {
if (content != nullptr) {
- _has_bits_[0] |= 0x00000004u;
+ _impl_._has_bits_[0] |= 0x00000004u;
} else {
- _has_bits_[0] &= ~0x00000004u;
+ _impl_._has_bits_[0] &= ~0x00000004u;
}
- content_.SetAllocated(content, GetArenaForAllocation());
+ _impl_.content_.SetAllocated(content, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (content_.IsDefault()) {
- content_.Set("", GetArenaForAllocation());
+ if (_impl_.content_.IsDefault()) {
+ _impl_.content_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content)
@@ -1625,15 +1645,15 @@ inline void CodeGeneratorResponse_File::set_allocated_content(TProtoStringType*
// optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16;
inline bool CodeGeneratorResponse_File::_internal_has_generated_code_info() const {
- bool value = (_has_bits_[0] & 0x00000008u) != 0;
- PROTOBUF_ASSUME(!value || generated_code_info_ != nullptr);
+ bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
+ PROTOBUF_ASSUME(!value || _impl_.generated_code_info_ != nullptr);
return value;
}
inline bool CodeGeneratorResponse_File::has_generated_code_info() const {
return _internal_has_generated_code_info();
}
inline const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& CodeGeneratorResponse_File::_internal_generated_code_info() const {
- const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* p = generated_code_info_;
+ const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* p = _impl_.generated_code_info_;
return p != nullptr ? *p : reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&>(
::PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_);
}
@@ -1644,20 +1664,20 @@ inline const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& CodeGeneratorResponse_F
inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_generated_code_info(
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info) {
if (GetArenaForAllocation() == nullptr) {
- delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(generated_code_info_);
+ delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.generated_code_info_);
}
- generated_code_info_ = generated_code_info;
+ _impl_.generated_code_info_ = generated_code_info;
if (generated_code_info) {
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::release_generated_code_info() {
- _has_bits_[0] &= ~0x00000008u;
- ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = generated_code_info_;
- generated_code_info_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = _impl_.generated_code_info_;
+ _impl_.generated_code_info_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
@@ -1671,18 +1691,18 @@ inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::r
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::unsafe_arena_release_generated_code_info() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
- _has_bits_[0] &= ~0x00000008u;
- ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = generated_code_info_;
- generated_code_info_ = nullptr;
+ _impl_._has_bits_[0] &= ~0x00000008u;
+ ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* temp = _impl_.generated_code_info_;
+ _impl_.generated_code_info_ = nullptr;
return temp;
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::_internal_mutable_generated_code_info() {
- _has_bits_[0] |= 0x00000008u;
- if (generated_code_info_ == nullptr) {
+ _impl_._has_bits_[0] |= 0x00000008u;
+ if (_impl_.generated_code_info_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo>(GetArenaForAllocation());
- generated_code_info_ = p;
+ _impl_.generated_code_info_ = p;
}
- return generated_code_info_;
+ return _impl_.generated_code_info_;
}
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::mutable_generated_code_info() {
::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* _msg = _internal_mutable_generated_code_info();
@@ -1692,7 +1712,7 @@ inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::m
inline void CodeGeneratorResponse_File::set_allocated_generated_code_info(::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* generated_code_info) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
- delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(generated_code_info_);
+ delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.generated_code_info_);
}
if (generated_code_info) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
@@ -1702,11 +1722,11 @@ inline void CodeGeneratorResponse_File::set_allocated_generated_code_info(::PROT
generated_code_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, generated_code_info, submessage_arena);
}
- _has_bits_[0] |= 0x00000008u;
+ _impl_._has_bits_[0] |= 0x00000008u;
} else {
- _has_bits_[0] &= ~0x00000008u;
+ _impl_._has_bits_[0] &= ~0x00000008u;
}
- generated_code_info_ = generated_code_info;
+ _impl_.generated_code_info_ = generated_code_info;
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.generated_code_info)
}
@@ -1716,15 +1736,15 @@ inline void CodeGeneratorResponse_File::set_allocated_generated_code_info(::PROT
// optional string error = 1;
inline bool CodeGeneratorResponse::_internal_has_error() const {
- bool value = (_has_bits_[0] & 0x00000001u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
return value;
}
inline bool CodeGeneratorResponse::has_error() const {
return _internal_has_error();
}
inline void CodeGeneratorResponse::clear_error() {
- error_.ClearToEmpty();
- _has_bits_[0] &= ~0x00000001u;
+ _impl_.error_.ClearToEmpty();
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const TProtoStringType& CodeGeneratorResponse::error() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.error)
@@ -1733,8 +1753,8 @@ inline const TProtoStringType& CodeGeneratorResponse::error() const {
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void CodeGeneratorResponse::set_error(ArgT0&& arg0, ArgT... args) {
- _has_bits_[0] |= 0x00000001u;
- error_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.error_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
}
inline TProtoStringType* CodeGeneratorResponse::mutable_error() {
@@ -1743,40 +1763,40 @@ inline TProtoStringType* CodeGeneratorResponse::mutable_error() {
return _s;
}
inline const TProtoStringType& CodeGeneratorResponse::_internal_error() const {
- return error_.Get();
+ return _impl_.error_.Get();
}
inline void CodeGeneratorResponse::_internal_set_error(const TProtoStringType& value) {
- _has_bits_[0] |= 0x00000001u;
- error_.Set(value, GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ _impl_.error_.Set(value, GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse::_internal_mutable_error() {
- _has_bits_[0] |= 0x00000001u;
- return error_.Mutable(GetArenaForAllocation());
+ _impl_._has_bits_[0] |= 0x00000001u;
+ return _impl_.error_.Mutable(GetArenaForAllocation());
}
inline TProtoStringType* CodeGeneratorResponse::release_error() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error)
if (!_internal_has_error()) {
return nullptr;
}
- _has_bits_[0] &= ~0x00000001u;
- auto* p = error_.Release();
+ _impl_._has_bits_[0] &= ~0x00000001u;
+ auto* p = _impl_.error_.Release();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (error_.IsDefault()) {
- error_.Set("", GetArenaForAllocation());
+ if (_impl_.error_.IsDefault()) {
+ _impl_.error_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
return p;
}
inline void CodeGeneratorResponse::set_allocated_error(TProtoStringType* error) {
if (error != nullptr) {
- _has_bits_[0] |= 0x00000001u;
+ _impl_._has_bits_[0] |= 0x00000001u;
} else {
- _has_bits_[0] &= ~0x00000001u;
+ _impl_._has_bits_[0] &= ~0x00000001u;
}
- error_.SetAllocated(error, GetArenaForAllocation());
+ _impl_.error_.SetAllocated(error, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (error_.IsDefault()) {
- error_.Set("", GetArenaForAllocation());
+ if (_impl_.error_.IsDefault()) {
+ _impl_.error_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error)
@@ -1784,26 +1804,26 @@ inline void CodeGeneratorResponse::set_allocated_error(TProtoStringType* error)
// optional uint64 supported_features = 2;
inline bool CodeGeneratorResponse::_internal_has_supported_features() const {
- bool value = (_has_bits_[0] & 0x00000002u) != 0;
+ bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline bool CodeGeneratorResponse::has_supported_features() const {
return _internal_has_supported_features();
}
inline void CodeGeneratorResponse::clear_supported_features() {
- supported_features_ = arc_ui64{0u};
- _has_bits_[0] &= ~0x00000002u;
+ _impl_.supported_features_ = arc_ui64{0u};
+ _impl_._has_bits_[0] &= ~0x00000002u;
}
inline arc_ui64 CodeGeneratorResponse::_internal_supported_features() const {
- return supported_features_;
+ return _impl_.supported_features_;
}
inline arc_ui64 CodeGeneratorResponse::supported_features() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.supported_features)
return _internal_supported_features();
}
inline void CodeGeneratorResponse::_internal_set_supported_features(arc_ui64 value) {
- _has_bits_[0] |= 0x00000002u;
- supported_features_ = value;
+ _impl_._has_bits_[0] |= 0x00000002u;
+ _impl_.supported_features_ = value;
}
inline void CodeGeneratorResponse::set_supported_features(arc_ui64 value) {
_internal_set_supported_features(value);
@@ -1812,32 +1832,32 @@ inline void CodeGeneratorResponse::set_supported_features(arc_ui64 value) {
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
inline int CodeGeneratorResponse::_internal_file_size() const {
- return file_.size();
+ return _impl_.file_.size();
}
inline int CodeGeneratorResponse::file_size() const {
return _internal_file_size();
}
inline void CodeGeneratorResponse::clear_file() {
- file_.Clear();
+ _impl_.file_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.file)
- return file_.Mutable(index);
+ return _impl_.file_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >*
CodeGeneratorResponse::mutable_file() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file)
- return &file_;
+ return &_impl_.file_;
}
inline const ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::_internal_file(int index) const {
- return file_.Get(index);
+ return _impl_.file_.Get(index);
}
inline const ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.file)
return _internal_file(index);
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::_internal_add_file() {
- return file_.Add();
+ return _impl_.file_.Add();
}
inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() {
::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* _add = _internal_add_file();
@@ -1847,7 +1867,7 @@ inline ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGenera
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >&
CodeGeneratorResponse::file() const {
// @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorResponse.file)
- return file_;
+ return _impl_.file_;
}
#ifdef __GNUC__
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/python/generator.cc
index 7c723febb3..d1e4de467b 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/python/generator.cc
@@ -42,7 +42,7 @@
// performance-minded Python code leverage the fast C++ implementation
// directly.
-#include <google/protobuf/compiler/python/python_generator.h>
+#include <google/protobuf/compiler/python/generator.h>
#include <algorithm>
#include <limits>
@@ -54,15 +54,15 @@
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/python/python_helpers.h>
-#include <google/protobuf/compiler/python/python_pyi_generator.h>
-#include <google/protobuf/io/printer.h>
-#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/descriptor.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/stringprintf.h>
#include <google/protobuf/stubs/substitute.h>
+#include <google/protobuf/compiler/python/helpers.h>
+#include <google/protobuf/compiler/python/pyi_generator.h>
+#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
+#include <google/protobuf/io/printer.h>
+#include <google/protobuf/io/zero_copy_stream.h>
namespace google {
namespace protobuf {
@@ -91,11 +91,6 @@ TProtoStringType ModuleAlias(const TProtoStringType& filename) {
const char kDescriptorKey[] = "DESCRIPTOR";
-// Does the file have top-level enums?
-inline bool HasTopLevelEnums(const FileDescriptor* file) {
- return file->enum_type_count() > 0;
-}
-
// file output by this generator.
void PrintTopBoilerplate(io::Printer* printer, const FileDescriptor* file,
bool descriptor_proto) {
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/python/generator.h
index 359d802aee..8111bf733f 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/python/generator.h
@@ -37,8 +37,8 @@
#include <string>
-#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/stubs/mutex.h>
+#include <google/protobuf/compiler/code_generator.h>
// Must be included last.
#include <google/protobuf/port_def.inc>
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_helpers.cc b/contrib/libs/protoc/src/google/protobuf/compiler/python/helpers.cc
index 7a9721c02c..ee7461bc83 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_helpers.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/python/helpers.cc
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/python/python_helpers.h>
+#include <google/protobuf/compiler/python/helpers.h>
#include <algorithm>
+#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/descriptor.h>
-#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/descriptor.pb.h>
namespace google {
@@ -69,7 +69,7 @@ const char* const kKeywords[] = {
"del", "elif", "else", "except", "finally", "for",
"from", "global", "if", "import", "in", "is",
"lambda", "nonlocal", "not", "or", "pass", "raise",
- "return", "try", "while", "with", "yield", "print",
+ "return", "try", "while", "with", "yield",
};
const char* const* kKeywordsEnd =
kKeywords + (sizeof(kKeywords) / sizeof(kKeywords[0]));
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/python/helpers.h
index 8745698acf..8745698acf 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_helpers.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/python/helpers.h
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_pyi_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/python/pyi_generator.cc
index 89cfbf86fe..242cdd71f2 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_pyi_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/python/pyi_generator.cc
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <google/protobuf/compiler/python/python_pyi_generator.h>
+#include <google/protobuf/compiler/python/pyi_generator.h>
#include <string>
-#include <google/protobuf/compiler/python/python_helpers.h>
-#include <google/protobuf/io/printer.h>
-#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/descriptor.h>
#include <google/protobuf/stubs/strutil.h>
+#include <google/protobuf/compiler/python/helpers.h>
+#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
+#include <google/protobuf/io/printer.h>
+#include <google/protobuf/io/zero_copy_stream.h>
namespace google {
namespace protobuf {
@@ -64,12 +64,21 @@ void PyiGenerator::PrintItemMap(
}
template <typename DescriptorT>
-TProtoStringType PyiGenerator::ModuleLevelName(const DescriptorT& descriptor) const {
+TProtoStringType PyiGenerator::ModuleLevelName(
+ const DescriptorT& descriptor,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const {
TProtoStringType name = NamePrefixedWithNestedTypes(descriptor, ".");
if (descriptor.file() != file_) {
- TProtoStringType module_name = ModuleName(descriptor.file()->name());
- std::vector<TProtoStringType> tokens = Split(module_name, ".");
- name = "_" + tokens.back() + "." + name;
+ TProtoStringType module_alias;
+ TProtoStringType filename = descriptor.file()->name();
+ if (import_map.find(filename) == import_map.end()) {
+ TProtoStringType module_name = ModuleName(descriptor.file()->name());
+ std::vector<TProtoStringType> tokens = Split(module_name, ".");
+ module_alias = "_" + tokens.back();
+ } else {
+ module_alias = import_map.at(filename);
+ }
+ name = module_alias + "." + name;
}
return name;
}
@@ -82,9 +91,22 @@ struct ImportModules {
bool has_extendable = false; // _python_message
bool has_mapping = false; // typing.Mapping
bool has_optional = false; // typing.Optional
- bool has_union = false; // typing.Uion
+ bool has_union = false; // typing.Union
+ bool has_well_known_type = false;
};
+// Checks whether a descriptor name matches a well-known type.
+bool IsWellKnownType(const TProtoStringType& name) {
+ // LINT.IfChange(wktbases)
+ return (name == "google.protobuf.Any" ||
+ name == "google.protobuf.Duration" ||
+ name == "google.protobuf.FieldMask" ||
+ name == "google.protobuf.ListValue" ||
+ name == "google.protobuf.Struct" ||
+ name == "google.protobuf.Timestamp");
+ // LINT.ThenChange(//depot/google3/net/proto2/python/internal/well_known_types.py:wktbases)
+}
+
// Checks what modules should be imported for this message
// descriptor.
void CheckImportModules(const Descriptor* descriptor,
@@ -95,6 +117,9 @@ void CheckImportModules(const Descriptor* descriptor,
if (descriptor->enum_type_count() > 0) {
import_modules->has_enums = true;
}
+ if (IsWellKnownType(descriptor->full_name())) {
+ import_modules->has_well_known_type = true;
+ }
for (int i = 0; i < descriptor->field_count(); ++i) {
const FieldDescriptor* field = descriptor->field(i);
if (IsPythonKeyword(field->name())) {
@@ -129,23 +154,44 @@ void CheckImportModules(const Descriptor* descriptor,
}
}
+void PyiGenerator::PrintImportForDescriptor(
+ const FileDescriptor& desc,
+ std::map<TProtoStringType, TProtoStringType>* import_map,
+ std::set<TProtoStringType>* seen_aliases) const {
+ const TProtoStringType& filename = desc.name();
+ TProtoStringType module_name = StrippedModuleName(filename);
+ size_t last_dot_pos = module_name.rfind('.');
+ TProtoStringType import_statement;
+ if (last_dot_pos == TProtoStringType::npos) {
+ import_statement = "import " + module_name;
+ } else {
+ import_statement = "from " + module_name.substr(0, last_dot_pos) +
+ " import " + module_name.substr(last_dot_pos + 1);
+ module_name = module_name.substr(last_dot_pos + 1);
+ }
+ TProtoStringType alias = "_" + module_name;
+ // Generate a unique alias by adding _1 suffixes until we get an unused alias.
+ while (seen_aliases->find(alias) != seen_aliases->end()) {
+ alias = alias + "_1";
+ }
+ printer_->Print("$statement$ as $alias$\n", "statement",
+ import_statement, "alias", alias);
+ (*import_map)[filename] = alias;
+ seen_aliases->insert(alias);
+}
+
void PyiGenerator::PrintImports(
- std::map<TProtoStringType, TProtoStringType>* item_map) const {
+ std::map<TProtoStringType, TProtoStringType>* item_map,
+ std::map<TProtoStringType, TProtoStringType>* import_map) const {
// Prints imported dependent _pb2 files.
+ std::set<TProtoStringType> seen_aliases;
for (int i = 0; i < file_->dependency_count(); ++i) {
- const TProtoStringType& filename = file_->dependency(i)->name();
- TProtoStringType module_name = StrippedModuleName(filename);
- size_t last_dot_pos = module_name.rfind('.');
- TProtoStringType import_statement;
- if (last_dot_pos == TProtoStringType::npos) {
- import_statement = "import " + module_name;
- } else {
- import_statement = "from " + module_name.substr(0, last_dot_pos) +
- " import " + module_name.substr(last_dot_pos + 1);
- module_name = module_name.substr(last_dot_pos + 1);
+ const FileDescriptor* dep = file_->dependency(i);
+ PrintImportForDescriptor(*dep, import_map, &seen_aliases);
+ for (int j = 0; j < dep->public_dependency_count(); ++j) {
+ PrintImportForDescriptor(
+ *dep->public_dependency(j), import_map, &seen_aliases);
}
- printer_->Print("$statement$ as _$module_name$\n", "statement",
- import_statement, "module_name", module_name);
}
// Checks what modules should be imported.
@@ -177,6 +223,11 @@ void PyiGenerator::PrintImports(
"from google.protobuf.internal import python_message"
" as _python_message\n");
}
+ if (import_modules.has_well_known_type) {
+ printer_->Print(
+ "from google.protobuf.internal import well_known_types"
+ " as _well_known_types\n");
+ }
printer_->Print(
"from google.protobuf import"
" descriptor as _descriptor\n");
@@ -190,21 +241,18 @@ void PyiGenerator::PrintImports(
" _service\n");
}
printer_->Print("from typing import ");
- printer_->Print("ClassVar");
+ printer_->Print("ClassVar as _ClassVar");
if (import_modules.has_iterable) {
- printer_->Print(", Iterable");
+ printer_->Print(", Iterable as _Iterable");
}
if (import_modules.has_mapping) {
- printer_->Print(", Mapping");
+ printer_->Print(", Mapping as _Mapping");
}
if (import_modules.has_optional) {
- printer_->Print(", Optional");
- }
- if (file_->service_count() > 0) {
- printer_->Print(", Text");
+ printer_->Print(", Optional as _Optional");
}
if (import_modules.has_union) {
- printer_->Print(", Union");
+ printer_->Print(", Union as _Union");
}
printer_->Print("\n\n");
@@ -229,7 +277,7 @@ void PyiGenerator::PrintImports(
const EnumDescriptor* enum_descriptor = public_dep->enum_type(i);
for (int j = 0; j < enum_descriptor->value_count(); ++j) {
(*item_map)[enum_descriptor->value(j)->name()] =
- ModuleLevelName(*enum_descriptor);
+ ModuleLevelName(*enum_descriptor, *import_map);
}
}
// Top level extensions for public imports
@@ -248,9 +296,10 @@ void PyiGenerator::PrintEnum(const EnumDescriptor& enum_descriptor) const {
// Adds enum value to item map which will be ordered and printed later.
void PyiGenerator::AddEnumValue(
const EnumDescriptor& enum_descriptor,
- std::map<TProtoStringType, TProtoStringType>* item_map) const {
+ std::map<TProtoStringType, TProtoStringType>* item_map,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const {
// enum values
- TProtoStringType module_enum_name = ModuleLevelName(enum_descriptor);
+ TProtoStringType module_enum_name = ModuleLevelName(enum_descriptor, import_map);
for (int j = 0; j < enum_descriptor.value_count(); ++j) {
const EnumValueDescriptor* value_descriptor = enum_descriptor.value(j);
(*item_map)[value_descriptor->name()] = module_enum_name;
@@ -275,13 +324,15 @@ void PyiGenerator::AddExtensions(
const FieldDescriptor* extension_field = descriptor.extension(i);
TProtoStringType constant_name = extension_field->name() + "_FIELD_NUMBER";
ToUpper(&constant_name);
- (*item_map)[constant_name] = "ClassVar[int]";
+ (*item_map)[constant_name] = "_ClassVar[int]";
(*item_map)[extension_field->name()] = "_descriptor.FieldDescriptor";
}
}
// Returns the string format of a field's cpp_type
-TProtoStringType PyiGenerator::GetFieldType(const FieldDescriptor& field_des) const {
+TProtoStringType PyiGenerator::GetFieldType(
+ const FieldDescriptor& field_des, const Descriptor& containing_des,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const {
switch (field_des.cpp_type()) {
case FieldDescriptor::CPPTYPE_INT32:
case FieldDescriptor::CPPTYPE_UINT32:
@@ -294,29 +345,48 @@ TProtoStringType PyiGenerator::GetFieldType(const FieldDescriptor& field_des) co
case FieldDescriptor::CPPTYPE_BOOL:
return "bool";
case FieldDescriptor::CPPTYPE_ENUM:
- return ModuleLevelName(*field_des.enum_type());
+ return ModuleLevelName(*field_des.enum_type(), import_map);
case FieldDescriptor::CPPTYPE_STRING:
if (field_des.type() == FieldDescriptor::TYPE_STRING) {
return "str";
} else {
return "bytes";
}
- case FieldDescriptor::CPPTYPE_MESSAGE:
- return ModuleLevelName(*field_des.message_type());
+ case FieldDescriptor::CPPTYPE_MESSAGE: {
+ // If the field is inside a nested message and the nested message has the
+ // same name as a top-level message, then we need to prefix the field type
+ // with the module name for disambiguation.
+ TProtoStringType name = ModuleLevelName(*field_des.message_type(), import_map);
+ if ((containing_des.containing_type() != nullptr &&
+ name == containing_des.name())) {
+ TProtoStringType module = ModuleName(field_des.file()->name());
+ name = module + "." + name;
+ }
+ return name;
+ }
default:
- GOOGLE_LOG(FATAL) << "Unsuppoted field type.";
+ GOOGLE_LOG(FATAL) << "Unsupported field type.";
}
return "";
}
-void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
- bool is_nested) const {
+void PyiGenerator::PrintMessage(
+ const Descriptor& message_descriptor, bool is_nested,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const {
if (!is_nested) {
printer_->Print("\n");
}
TProtoStringType class_name = message_descriptor.name();
- printer_->Print("class $class_name$(_message.Message):\n", "class_name",
- class_name);
+ TProtoStringType extra_base;
+ // A well-known type needs to inherit from its corresponding base class in
+ // net/proto2/python/internal/well_known_types.
+ if (IsWellKnownType(message_descriptor.full_name())) {
+ extra_base = ", _well_known_types." + message_descriptor.name();
+ } else {
+ extra_base = "";
+ }
+ printer_->Print("class $class_name$(_message.Message$extra_base$):\n",
+ "class_name", class_name, "extra_base", extra_base);
printer_->Indent();
printer_->Indent();
@@ -361,7 +431,7 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
for (const auto& entry : nested_enums) {
PrintEnum(*entry);
// Adds enum value to item_map which will be ordered and printed later
- AddEnumValue(*entry, &item_map);
+ AddEnumValue(*entry, &item_map, import_map);
}
// Prints nested messages
@@ -374,7 +444,7 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
SortByName<Descriptor>());
for (const auto& entry : nested_messages) {
- PrintMessage(*entry, true);
+ PrintMessage(*entry, true, import_map);
}
// Adds extensions to item_map which will be ordered and printed later
@@ -384,7 +454,7 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
for (int i = 0; i < message_descriptor.field_count(); ++i) {
const FieldDescriptor& field_des = *message_descriptor.field(i);
item_map[ToUpper(field_des.name()) + "_FIELD_NUMBER"] =
- "ClassVar[int]";
+ "_ClassVar[int]";
if (IsPythonKeyword(field_des.name())) {
continue;
}
@@ -395,16 +465,16 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
field_type = (value_des->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE
? "_containers.MessageMap["
: "_containers.ScalarMap[");
- field_type += GetFieldType(*key_des);
+ field_type += GetFieldType(*key_des, message_descriptor, import_map);
field_type += ", ";
- field_type += GetFieldType(*value_des);
+ field_type += GetFieldType(*value_des, message_descriptor, import_map);
} else {
if (field_des.is_repeated()) {
field_type = (field_des.cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE
? "_containers.RepeatedCompositeFieldContainer["
: "_containers.RepeatedScalarFieldContainer[");
}
- field_type += GetFieldType(field_des);
+ field_type += GetFieldType(field_des, message_descriptor, import_map);
}
if (field_des.is_repeated()) {
@@ -437,26 +507,31 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
printer_->Print(", $field_name$: ", "field_name", field_name);
if (field_des->is_repeated() ||
field_des->cpp_type() != FieldDescriptor::CPPTYPE_BOOL) {
- printer_->Print("Optional[");
+ printer_->Print("_Optional[");
}
if (field_des->is_map()) {
const Descriptor* map_entry = field_des->message_type();
- printer_->Print("Mapping[$key_type$, $value_type$]", "key_type",
- GetFieldType(*map_entry->field(0)), "value_type",
- GetFieldType(*map_entry->field(1)));
+ printer_->Print(
+ "_Mapping[$key_type$, $value_type$]", "key_type",
+ GetFieldType(*map_entry->field(0), message_descriptor, import_map),
+ "value_type",
+ GetFieldType(*map_entry->field(1), message_descriptor, import_map));
} else {
if (field_des->is_repeated()) {
- printer_->Print("Iterable[");
+ printer_->Print("_Iterable[");
}
if (field_des->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
- printer_->Print("Union[$type_name$, Mapping]", "type_name",
- GetFieldType(*field_des));
+ printer_->Print(
+ "_Union[$type_name$, _Mapping]", "type_name",
+ GetFieldType(*field_des, message_descriptor, import_map));
} else {
if (field_des->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
- printer_->Print("Union[$type_name$, str]", "type_name",
- ModuleLevelName(*field_des->enum_type()));
+ printer_->Print("_Union[$type_name$, str]", "type_name",
+ ModuleLevelName(*field_des->enum_type(), import_map));
} else {
- printer_->Print("$type_name$", "type_name", GetFieldType(*field_des));
+ printer_->Print(
+ "$type_name$", "type_name",
+ GetFieldType(*field_des, message_descriptor, import_map));
}
}
if (field_des->is_repeated()) {
@@ -478,8 +553,9 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,
printer_->Outdent();
}
-void PyiGenerator::PrintMessages() const {
- // Order the descriptors by name to have same output with proto_to_pyi.py
+void PyiGenerator::PrintMessages(
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const {
+ // Deterministically order the descriptors.
std::vector<const Descriptor*> messages;
messages.reserve(file_->message_type_count());
for (int i = 0; i < file_->message_type_count(); ++i) {
@@ -488,7 +564,7 @@ void PyiGenerator::PrintMessages() const {
std::sort(messages.begin(), messages.end(), SortByName<Descriptor>());
for (const auto& entry : messages) {
- PrintMessage(*entry, false);
+ PrintMessage(*entry, false, import_map);
}
}
@@ -517,9 +593,6 @@ bool PyiGenerator::Generate(const FileDescriptor* file,
MutexLock lock(&mutex_);
// Calculate file name.
file_ = file;
- // proto_to_pyi.py may set the output file name directly. To replace
- // proto_to_pyi.py in google3, protoc also accept --pyi_out to set
- // the output file name.
TProtoStringType filename =
parameter.empty() ? GetFileName(file, ".pyi") : parameter;
@@ -534,17 +607,22 @@ bool PyiGenerator::Generate(const FileDescriptor* file,
// Adds "DESCRIPTOR" into item_map.
item_map["DESCRIPTOR"] = "_descriptor.FileDescriptor";
- PrintImports(&item_map);
+
+ // import_map will be a mapping from filename to module alias, e.g.
+ // "google3/foo/bar.py" -> "_bar"
+ std::map<TProtoStringType, TProtoStringType> import_map;
+
+ PrintImports(&item_map, &import_map);
// Adds top level enum values to item_map.
for (int i = 0; i < file_->enum_type_count(); ++i) {
- AddEnumValue(*file_->enum_type(i), &item_map);
+ AddEnumValue(*file_->enum_type(i), &item_map, import_map);
}
// Adds top level extensions to item_map.
AddExtensions(*file_, &item_map);
// Prints item map
PrintItemMap(item_map);
- PrintMessages();
+ PrintMessages(import_map);
PrintTopLevelEnums();
if (HasGenericServices(file)) {
PrintServices();
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_pyi_generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/python/pyi_generator.h
index d7f5437e49..c9bf296166 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/python/python_pyi_generator.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/python/pyi_generator.h
@@ -36,10 +36,11 @@
#define GOOGLE_PROTOBUF_COMPILER_PYTHON_PYI_GENERATOR_H__
#include <map>
+#include <set>
#include <string>
-#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/stubs/mutex.h>
+#include <google/protobuf/compiler/code_generator.h>
// Must be included last.
#include <google/protobuf/port_def.inc>
@@ -65,26 +66,41 @@ class PROTOC_EXPORT PyiGenerator : public google::protobuf::compiler::CodeGenera
~PyiGenerator() override;
// CodeGenerator methods.
+ uint64_t GetSupportedFeatures() const override {
+ // Code generators must explicitly support proto3 optional.
+ return CodeGenerator::FEATURE_PROTO3_OPTIONAL;
+ }
bool Generate(const FileDescriptor* file, const TProtoStringType& parameter,
GeneratorContext* generator_context,
TProtoStringType* error) const override;
private:
- void PrintImports(std::map<TProtoStringType, TProtoStringType>* item_map) const;
+ void PrintImportForDescriptor(const FileDescriptor& desc,
+ std::map<TProtoStringType, TProtoStringType>* import_map,
+ std::set<TProtoStringType>* seen_aliases) const;
+ void PrintImports(std::map<TProtoStringType, TProtoStringType>* item_map,
+ std::map<TProtoStringType, TProtoStringType>* import_map) const;
void PrintEnum(const EnumDescriptor& enum_descriptor) const;
void AddEnumValue(const EnumDescriptor& enum_descriptor,
- std::map<TProtoStringType, TProtoStringType>* item_map) const;
+ std::map<TProtoStringType, TProtoStringType>* item_map,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const;
void PrintTopLevelEnums() const;
template <typename DescriptorT>
void AddExtensions(const DescriptorT& descriptor,
std::map<TProtoStringType, TProtoStringType>* item_map) const;
- void PrintMessages() const;
- void PrintMessage(const Descriptor& message_descriptor, bool is_nested) const;
+ void PrintMessages(
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const;
+ void PrintMessage(const Descriptor& message_descriptor, bool is_nested,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const;
void PrintServices() const;
void PrintItemMap(const std::map<TProtoStringType, TProtoStringType>& item_map) const;
- TProtoStringType GetFieldType(const FieldDescriptor& field_des) const;
+ TProtoStringType GetFieldType(
+ const FieldDescriptor& field_des, const Descriptor& containing_des,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const;
template <typename DescriptorT>
- TProtoStringType ModuleLevelName(const DescriptorT& descriptor) const;
+ TProtoStringType ModuleLevelName(
+ const DescriptorT& descriptor,
+ const std::map<TProtoStringType, TProtoStringType>& import_map) const;
// Very coarse-grained lock to ensure that Generate() is reentrant.
// Guards file_ and printer_.
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/ruby/ruby_generator.cc b/contrib/libs/protoc/src/google/protobuf/compiler/ruby/ruby_generator.cc
index 0e85c22f1e..4a26b6d951 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/ruby/ruby_generator.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/ruby/ruby_generator.cc
@@ -158,7 +158,7 @@ TProtoStringType DefaultValueForField(const FieldDescriptor* field) {
for (int i = 0; i < default_str.length(); ++i) {
// Write the hex form of each byte.
os << "\\x" << std::hex << std::setw(2)
- << ((uint16)((unsigned char)default_str.at(i)));
+ << ((uint16_t)((unsigned char)default_str.at(i)));
}
os << "\".force_encoding(\"ASCII-8BIT\")";
}
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/subprocess.cc b/contrib/libs/protoc/src/google/protobuf/compiler/subprocess.cc
index 1d01fb7e83..d09ceed9dc 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/subprocess.cc
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/subprocess.cc
@@ -45,8 +45,8 @@
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/message.h>
#include <google/protobuf/stubs/substitute.h>
+#include <google/protobuf/message.h>
namespace google {
namespace protobuf {
@@ -167,7 +167,11 @@ bool Subprocess::Communicate(const Message& input, Message* output,
GOOGLE_CHECK(child_handle_ != nullptr) << "Must call Start() first.";
- TProtoStringType input_data = input.SerializeAsString();
+ TProtoStringType input_data;
+ if (!input.SerializeToString(&input_data)) {
+ *error = "Failed to serialize request.";
+ return false;
+ }
TProtoStringType output_data;
int input_pos = 0;
@@ -369,7 +373,11 @@ bool Subprocess::Communicate(const Message& input, Message* output,
// Make sure SIGPIPE is disabled so that if the child dies it doesn't kill us.
SignalHandler* old_pipe_handler = signal(SIGPIPE, SIG_IGN);
- TProtoStringType input_data = input.SerializeAsString();
+ TProtoStringType input_data;
+ if (!input.SerializeToString(&input_data)) {
+ *error = "Failed to serialize request.";
+ return false;
+ }
TProtoStringType output_data;
int input_pos = 0;
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/zip_writer.h b/contrib/libs/protoc/src/google/protobuf/compiler/zip_writer.h
index 1ebb2e2508..c25a1e096a 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/zip_writer.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/zip_writer.h
@@ -29,6 +29,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: kenton@google.com (Kenton Varda)
+#ifndef GOOGLE_PROTOBUF_COMPILER_ZIP_WRITER_H__
+#define GOOGLE_PROTOBUF_COMPILER_ZIP_WRITER_H__
#include <cstdint>
#include <vector>
@@ -63,3 +65,5 @@ class ZipWriter {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#endif // GOOGLE_PROTOBUF_COMPILER_ZIP_WRITER_H__
diff --git a/contrib/libs/protoc/ya.make b/contrib/libs/protoc/ya.make
index b882a28457..95b81598a2 100644
--- a/contrib/libs/protoc/ya.make
+++ b/contrib/libs/protoc/ya.make
@@ -9,9 +9,9 @@ LICENSE(
PROVIDES(protoc)
-VERSION(3.20.2)
+VERSION(3.21.3)
-ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.20.2.tar.gz)
+ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.21.3.tar.gz)
IF (OPENSOURCE_REPLACE_PROTOBUF AND EXPORT_CMAKE)
OPENSOURCE_EXPORT_REPLACEMENT(
@@ -54,21 +54,21 @@ CFLAGS(
SRCS(
src/google/protobuf/compiler/code_generator.cc
src/google/protobuf/compiler/command_line_interface.cc
- src/google/protobuf/compiler/cpp/cpp_enum.cc
- src/google/protobuf/compiler/cpp/cpp_enum_field.cc
- src/google/protobuf/compiler/cpp/cpp_extension.cc
- src/google/protobuf/compiler/cpp/cpp_field.cc
- src/google/protobuf/compiler/cpp/cpp_file.cc
- src/google/protobuf/compiler/cpp/cpp_generator.cc
- src/google/protobuf/compiler/cpp/cpp_helpers.cc
- src/google/protobuf/compiler/cpp/cpp_map_field.cc
- src/google/protobuf/compiler/cpp/cpp_message.cc
- src/google/protobuf/compiler/cpp/cpp_message_field.cc
- src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc
- src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc
- src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
- src/google/protobuf/compiler/cpp/cpp_service.cc
- src/google/protobuf/compiler/cpp/cpp_string_field.cc
+ src/google/protobuf/compiler/cpp/enum.cc
+ src/google/protobuf/compiler/cpp/enum_field.cc
+ src/google/protobuf/compiler/cpp/extension.cc
+ src/google/protobuf/compiler/cpp/field.cc
+ src/google/protobuf/compiler/cpp/file.cc
+ src/google/protobuf/compiler/cpp/generator.cc
+ src/google/protobuf/compiler/cpp/helpers.cc
+ src/google/protobuf/compiler/cpp/map_field.cc
+ src/google/protobuf/compiler/cpp/message.cc
+ src/google/protobuf/compiler/cpp/message_field.cc
+ src/google/protobuf/compiler/cpp/padding_optimizer.cc
+ src/google/protobuf/compiler/cpp/parse_function_generator.cc
+ src/google/protobuf/compiler/cpp/primitive_field.cc
+ src/google/protobuf/compiler/cpp/service.cc
+ src/google/protobuf/compiler/cpp/string_field.cc
src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
src/google/protobuf/compiler/csharp/csharp_enum.cc
src/google/protobuf/compiler/csharp/csharp_enum_field.cc
@@ -86,37 +86,35 @@ SRCS(
src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
src/google/protobuf/compiler/importer.cc
- src/google/protobuf/compiler/java/java_context.cc
- src/google/protobuf/compiler/java/java_doc_comment.cc
- src/google/protobuf/compiler/java/java_enum.cc
- src/google/protobuf/compiler/java/java_enum_field.cc
- src/google/protobuf/compiler/java/java_enum_field_lite.cc
- src/google/protobuf/compiler/java/java_enum_lite.cc
- src/google/protobuf/compiler/java/java_extension.cc
- src/google/protobuf/compiler/java/java_extension_lite.cc
- src/google/protobuf/compiler/java/java_field.cc
- src/google/protobuf/compiler/java/java_file.cc
- src/google/protobuf/compiler/java/java_generator.cc
- src/google/protobuf/compiler/java/java_generator_factory.cc
- src/google/protobuf/compiler/java/java_helpers.cc
- src/google/protobuf/compiler/java/java_kotlin_generator.cc
- src/google/protobuf/compiler/java/java_map_field.cc
- src/google/protobuf/compiler/java/java_map_field_lite.cc
- src/google/protobuf/compiler/java/java_message.cc
- src/google/protobuf/compiler/java/java_message_builder.cc
- src/google/protobuf/compiler/java/java_message_builder_lite.cc
- src/google/protobuf/compiler/java/java_message_field.cc
- src/google/protobuf/compiler/java/java_message_field_lite.cc
- src/google/protobuf/compiler/java/java_message_lite.cc
- src/google/protobuf/compiler/java/java_name_resolver.cc
- src/google/protobuf/compiler/java/java_primitive_field.cc
- src/google/protobuf/compiler/java/java_primitive_field_lite.cc
- src/google/protobuf/compiler/java/java_service.cc
- src/google/protobuf/compiler/java/java_shared_code_generator.cc
- src/google/protobuf/compiler/java/java_string_field.cc
- src/google/protobuf/compiler/java/java_string_field_lite.cc
- src/google/protobuf/compiler/js/js_generator.cc
- src/google/protobuf/compiler/js/well_known_types_embed.cc
+ src/google/protobuf/compiler/java/context.cc
+ src/google/protobuf/compiler/java/doc_comment.cc
+ src/google/protobuf/compiler/java/enum.cc
+ src/google/protobuf/compiler/java/enum_field.cc
+ src/google/protobuf/compiler/java/enum_field_lite.cc
+ src/google/protobuf/compiler/java/enum_lite.cc
+ src/google/protobuf/compiler/java/extension.cc
+ src/google/protobuf/compiler/java/extension_lite.cc
+ src/google/protobuf/compiler/java/field.cc
+ src/google/protobuf/compiler/java/file.cc
+ src/google/protobuf/compiler/java/generator.cc
+ src/google/protobuf/compiler/java/generator_factory.cc
+ src/google/protobuf/compiler/java/helpers.cc
+ src/google/protobuf/compiler/java/kotlin_generator.cc
+ src/google/protobuf/compiler/java/map_field.cc
+ src/google/protobuf/compiler/java/map_field_lite.cc
+ src/google/protobuf/compiler/java/message.cc
+ src/google/protobuf/compiler/java/message_builder.cc
+ src/google/protobuf/compiler/java/message_builder_lite.cc
+ src/google/protobuf/compiler/java/message_field.cc
+ src/google/protobuf/compiler/java/message_field_lite.cc
+ src/google/protobuf/compiler/java/message_lite.cc
+ src/google/protobuf/compiler/java/name_resolver.cc
+ src/google/protobuf/compiler/java/primitive_field.cc
+ src/google/protobuf/compiler/java/primitive_field_lite.cc
+ src/google/protobuf/compiler/java/service.cc
+ src/google/protobuf/compiler/java/shared_code_generator.cc
+ src/google/protobuf/compiler/java/string_field.cc
+ src/google/protobuf/compiler/java/string_field_lite.cc
src/google/protobuf/compiler/objectivec/objectivec_enum.cc
src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
src/google/protobuf/compiler/objectivec/objectivec_extension.cc
@@ -133,9 +131,9 @@ SRCS(
src/google/protobuf/compiler/php/php_generator.cc
src/google/protobuf/compiler/plugin.cc
src/google/protobuf/compiler/plugin.pb.cc
- src/google/protobuf/compiler/python/python_generator.cc
- src/google/protobuf/compiler/python/python_helpers.cc
- src/google/protobuf/compiler/python/python_pyi_generator.cc
+ src/google/protobuf/compiler/python/generator.cc
+ src/google/protobuf/compiler/python/helpers.cc
+ src/google/protobuf/compiler/python/pyi_generator.cc
src/google/protobuf/compiler/ruby/ruby_generator.cc
src/google/protobuf/compiler/subprocess.cc
src/google/protobuf/compiler/zip_writer.cc